Wednesday, 29 January 2014

Clustered ONTAP Daily Health Checks Script

The following post is part based on the earlier post from 1st January: Clustered ONTAP Storage Admins' Health Checks. Here we present a few Clustered ONTAP Storage Admins daily health checks (really there’s too much for a daily checks list …) Please feel free to modify as you see fit. Some of the commands quite nicely display the power of the Clustershell CLI.

Note:

## Two hashes or more is a comment
# One hash you can unhash (for Data ONTAP 8.2+/ where the command needs a date/ where the command needs the local cluster name)

##############################
## CDOT DAILY CHECKS SCRIPT ##
##############################

rows 0
set diag
y

###########################
## Analyze The Event Log ##
###########################

event log show -severity emergency
event log show -severity alert
event log show -severity critical
event log show -severity error
event log show -severity warning
## example for the last 24 hours
# event log show -time "01/21/2014 09:00:00".."01/22/2014 09:00:00" -severity !informational,!notice,!debug

#############################
## Display Some Dashboards ##
#############################

dashboard alarm show
dashboard performance show

####################
## Cluster Checks ##
####################

cluster show
storage failover show
## 2-Node Clusters
# cluster ha show
date
## CDOT 8.2+
# cluster date show

###############################################
## License Checks (not really a daily check) ##
###############################################

system license show -fields expiration-date

#################
## Node Checks ##
#################

node show -fields health
system health alert show -fields indication-time
## ... and if they're old alerts you can delete them with
# system health alert delete -node * -monitor * -alert-id * -alerting-resource *
system node run -node * -command fru_led status

###############################################
## NDMPD check for jobs running and snapshot ##
###############################################

ndmpd status -fields data-state,data-operation,mover-state,mover-mode
snapshot show -snapshot snapshot_for_backup.* -fields create-time

########################
## Autosupport checks ##
########################

system node autosupport show -state !enable
system node autosupport history show -status !ignore -fields status,last-update

###############################
## Aggregate and Disk Checks ##
###############################

storage aggregate show -state !online
storage aggregate show -aggregate * -percent-used >75
storage aggregate show -aggregate * -raidstatus !”raid_dp,normal”
storage disk show -state broken
storage disk show -container unassigned
sto disk show -container-type aggregate -average-latency > 20 -fields average-latency,aggregate

###################
## Volume Checks ##
###################

vol show -state !online
vol show -vserver * -volume * -percent-used >79 -fields state,size,available,percent-used,space-guarantee -type RW
vol show -vserver * -volume * -percent-used <33 -fields state,size,available,percent-used,space-guarantee -type RW 
vol show -snapshot-policy none -type RW -fields volume,size,available,used
vol show -snapshot-space-used > 99 -type RW -fields percent-snapshot-space,snapshot-space-used
vol show -space-guarantee volume -type RW -fields volume,size,available,used
vol show -is-sis-logging-enabled true -type RW -fields volume,sis-space-saved-percent
vol show -is-sis-logging-enabled false -type RW -volume !vol0 -fields volume,size,used
df -i -vserver * -volume * -percent-inodes-used >79
vol efficiency show -fields progress,schedule,policy,last-op-end,state

#####################
## Snapshot Checks ##
#####################

## CDOT 8.2+
# vol show -snapshot-count 0
## CDOT 8.2+
# vol show -snapshot-count > 200
## CHANGE THE DATE - use http://www.timeanddate.com/date/dateadd.html
# vol snap show -create-time <"Wed Oct 09 00:00:00 2013" -fields state,size,create-time,owners
vol snap show -snap !hourly.*,!weekly.*,!daily.*,!snapmirror.*,!*smvi*,!eloginfo*,!exchsnap* -fields state,size,create-time,owners

####################
## Network Checks ##
####################

net port show -link !up
net int show -is-home false
net int show -status-oper !up

################
## SAN Checks ##
################

lun show -mapped unmapped -lun !*rws,!*aux
lun show -lun *.rws # Example - SMBR flexclones
lun show -lun *.aux # Example - failed SME jobs
fcp int show -status-oper !up
iscsi int show -status-oper !up

#######################
## SnapMirror Checks ##
#######################

snapmirror show -healthy false
snapmirror show -status !Idle
snapmirror show -state !snapmirrored
## CHANGE THE LOCAL to CLUSTER you're running the command from
## ... for the snapmirror command below since schedule displays on destination cluster only!
# snapmirror show -schedule "-" -fields state,status -source-cluster !LOCAL
## Compare the following two outputs, should roughly have same number of not RW vols as snapmirrors to this cluster
# snapmirror show -destination-cluster LOCAL -fields destination-volume
# vol show -type !RW


Sunday, 19 January 2014

Clustered ONTAP Aggregate Auditor Powershell Script

This script generates an Aggregate Analysis spreadsheet, giving you the % aggregate used, total size of the aggregate, max size of the aggregate (works from Clustered Data ONTAP 8.2 onwards), raid group size, number of disks, number of disks to complete all raid groups, disk type, min and max size of disks in the aggregates, spares, and more … Apologies in advance for the formatting!

### THE START ###

######################################################################
## TITLE: Aggregate Auditor - rev 1.3                               ##
######################################################################

# FIRST: RECOMMEND reducing no. of disk as required to speed up the script
# $diskTypes = @("ATA","BSAS","FCAL","FSAS","MSATA","SAS","SATA","SSD")
$diskTypes = @("ATA","BSAS","FCAL","FSAS","MSATA","SAS","SATA","SSD")
$aggPercWarn = 79
$units = "g"

# User Prompts and Connect
Import-module DataOnTap; ""
$controller = Read-host "Enter IP of cluster-mgmt LIF"
$user = Read-host "Enter username"; ""; "connecting ..."
Connect-NcController $controller -credential $user; ""
$conversion = 1; $unit = "B"
if ($units -eq "k"){ $conversion = 1024; $unit = "KB" }
if ($units -eq "m"){ $conversion = 1048576; $unit = "MB" }
if ($units -eq "g"){ $conversion = 1073741824; $unit = "GB" }; ""

# Initiate Excel Workbook
$xl=New-Object -ComObject "Excel.Application"
$wb=$xl.Workbooks.Add()
$xl.Worksheets.Item("Sheet2").Delete()
$xl.Worksheets.Item("Sheet3").Delete()
$ws=$wb.ActiveSheet; $worksheets=1; $row=1
$cells=$ws.Cells

# The Heading
$cluster = Get-NcCluster
$clusterName = $cluster.ClusterName
$ws.name = "$clusterName"
$cells.item($row,1)="Cluster";
$cells.item($row,2)="$clusterName"
$cells.item($row,3)="Aggregate"
$cells.item($row,4)="Analysis"
$cells.item($row,1).EntireRow.font.bold = $true
$cells.item($row,1).EntireRow.font.size = 16
$cells.item($row,1).EntireRow.Interior.ColorIndex = 37
$row++;$row++

# Checking for unassigned disks
$q = get-ncdisk -template
Initialize-NcObjectProperty -object $q -name DiskRaidInfo
$q.DiskRaidInfo.ContainerType = "unassigned"
"Getting unassigned disks ..."
$unassigned = Get-NcDisk -Query $q
$count = $unassigned.count
if (!$unassigned){$count = 0} # Fixes no 0 count returned
if ($unassigned -and !$count){$count = 1} # Fixes 1 disk returns no value
$cells.item($row,1) = "No. of unassigned disks"
$cells.item($row,1).font.bold = $True
$cells.item($row,2) = $count
$cells.item($row,2).HorizontalAlignment = -4131
if ($unassigned){$cells.item($row,2).Interior.ColorIndex = 6}
$row++;$q=$null

# Checking for broken disks
$q = get-ncdisk -template
Initialize-NcObjectProperty -object $q -name DiskRaidInfo
$q.DiskRaidInfo.ContainerType = "broken"
"Getting broken disks ..."
$broken = Get-NcDisk -Query $q
$count = $broken.count
if (!$broken){$count = 0} # Fixes no 0 count returned
if ($broken -and !$count){$count = 1} # Fixes 1 disk returns no value
$cells.item($row,1) = "No. of broken disks"
$cells.item($row,1).font.bold = $True
$cells.item($row,2) = $count
$cells.item($row,2).HorizontalAlignment = -4131
if ($broken){$cells.item($row,2).font.bold = $True}
if ($broken){$cells.item($row,2).font.ColorIndex = 2}
if ($broken){$cells.item($row,2).Interior.ColorIndex = 3}
$row++;$row++;$q=$null

# Display Aggr Warning Threshold
$cells.item($row,3) = "Warn % >"
$cells.item($row,3).font.bold = $True
$cells.item($row,1).EntireRow.Interior.ColorIndex = 15
$row++; $cells.item($row,3) = "$aggPercWarn"

# Column Headers
$row++; $col = 1
$cells.item($row,1).EntireRow.Interior.ColorIndex = 15
"Node","Aggregate","% Used","Total Size ($unit)","Max Size ($unit)","RG Size","# Disks","*TCARG","Disk Type","Min Disk Size ($unit)","Max Disk Size ($unit)" | foreach {
$cells.item($row,$col)=$_
$cells.item($row,$col).font.bold=$True
$col++}; $row++; $row++

# Checking for spare disks
$q = get-ncdisk -template
Initialize-NcObjectProperty -object $q -name DiskRaidInfo
$q.DiskRaidInfo.ContainerType = "spare"
"Getting spare disks ..."
$spares = Get-NcDisk -Query $q

# Cycle Through the Nodes
$nodes = Get-NcNode
foreach ($node in $nodes){

# Node Name Output
$nodeName = $node.Node
$cells.item($row,1) = $nodeName; "Scanning node = $nodeName"
$cells.item($row,1).font.bold = $True
$cells.item($row,1).font.size = 14
$cells.item(($row+1),1) = $node.NodeModel
$cells.item(($row+1),1).Font.Italic = $True
$row++

# Get Aggregates for the Node
$aggrQuery = Get-NcAggr -Template
Initialize-NcObjectProperty -object $aggrQuery -name AggrOwnershipAttributes
$aggrQuery.AggrOwnershipAttributes.HomeName = $nodeName
$aggs = Get-NcAggr -Query $aggrQuery

# Ouptut Aggregate, Size, % Used, RaidSize, # Disks, RightSize
foreach ($agg in $aggs){
$aggName = $agg.Name; "Scanning aggregate = $aggName"
$cells.item($row,2)=$aggName
$aggUsed = $agg.used
$cells.item($row,3)=$aggUsed
if ($aggUsed -gt $aggPercWarn){
$cells.item($row,3).font.bold = $True
$cells.item($row,3).font.ColorIndex = 2
$cells.item($row,3).Interior.ColorIndex = 3}
$aggTotal = $agg.TotalSize
$cells.item($row,4)=[int]($aggTotal/$conversion)
$aggMax = $node.MaximumAggregateSize
$cells.item($row,5)=[int]($aggMax/$conversion)
$aggRaidSize = $agg.RaidSize
$cells.item($row,6)=$aggRaidSize
$aggDisks = $agg.Disks
$cells.item($row,7)=$aggDisks
if (!($agg.AggrRaidAttributes.HasLocalRoot)){
$mod = $aggDisks
$mod %= $aggRaidSize
if ($mod -eq 0){$mod = $aggRaidSize} # 0 TCARG for ful RGs
$cells.item($row,8) = ($aggRaidSize - $mod)
if ($mod -ne $aggRaidSize){$cells.item($row,8).Interior.ColorIndex = 6}}
if ($agg.AggrRaidAttributes.HasLocalRoot){$cells.item($row,8)="root"}
$cells.item($row,8).HorizontalAlignment = -4108
# Here we get all the aggregates disks
$queryDisk = Get-NcDisk -Template
$queryDisk.Aggregate = $aggName
$aggrsDisks = Get-NcDisk -Query $queryDisk
$aDisk = $aggrsDisks[0]
# Only the first disk in the aggregate is checked for type (assume all the rest are the same)
$aggDiskType = $aDisk.DiskInventoryInfo.DiskType      
$cells.item($row,9)=$aggDiskType
# Scan through the aggr's disks checking for capacity
$capMin = 0
$capMax = 0
foreach ($disk in $aggrsDisks) {
$diskSize = $disk.DiskInventoryInfo.Capacity
if (!$capMin){$capMin = $diskSize}
if (!$capMax){$capMax = $diskSize}
if ($spareDiskSize -lt $capMin){$capMin = $diskSize}
if ($spareDiskSize -gt $capMax){$capMax = $diskSize}
} # foreach ($disk in $aggrsDisks)
$cells.item($row,10)=[int]($capMin/$conversion)
$cells.item($row,11)=[int]($capMax/$conversion)
$row++
} # foreach ($agg in $aggs)

# Get spares info (reset counters first)
$diskRecord = @(0)*($diskTypes.count)
$capMinRecord = @(0)*($diskTypes.count)
$capMaxRecord = @(0)*($diskTypes.count)
foreach ($spare in $spares){
if (($spare.DiskOwnershipInfo.OwnerNodeName) -eq $nodeName){
$i = 0
foreach ($diskType in $diskTypes){
if (($spare.DiskInventoryInfo.DiskType) -eq $diskType){
$diskRecord[$i]++
$spareDiskSize = $spare.DiskInventoryInfo.Capacity
if (!$capMinRecord[$i]){$capMinRecord[$i] = $spareDiskSize}
if (!$capMaxRecord[$i]){$capMaxRecord[$i] = $spareDiskSize}
if ($spareDiskSize -lt $capMinRecord[$i]){$capMinRecord[$i] = $spareDiskSize}
if ($spareDiskSize -gt $capMaxRecord[$i]){$capMaxRecord[$i] = $spareDiskSize}
}; $i++}}}

# Display spares info
$i = 0
foreach ($diskType in $diskTypes){
if ($diskRecord[$i]){
$cells.item($row,6) = "SPARES:"
$cells.item($row,6).font.bold = $True
$cells.item($row,7) = $diskRecord[$i]
$cells.item($row,9) = $diskType
$cells.item($row,10) = [int]($capMinRecord[$i]/$conversion)
$cells.item($row,11) = [int]($capMaxRecord[$i]/$conversion)
$row++}; $i++};      $row++

} # foreach ($node in $nodes)

# Autofit Excel Columns and Name
$range = $ws.UsedRange
$range.EntireColumn.Autofit() | out-null

# Explain TCARG
$cells.item($row,1) = "*TCARG is: number of disks 'To Complete All RAID Groups'"
$cells.item($row,1).Font.Italic = $True

# Display the Excel Workbook
$xl.Visible=$True

### THE END ###

Image: An Example of Aggregate Auditor in action! (Note: “The Max Size (GB)” - max size of aggregate column - works from Clustered Data ONTAP 8.2 onwards)

PowerShell Color Codes and Formatting Notes for Excel

Now for something totally different!

For reference, a list of color codes and formatting options - essentially for producing nicely formatted and colored Microsoft Excel spreadsheets via PowerShell.

Some Formatting Options in PowerShell for Excell

$cells.item($row,$column) = ”Output”
$cells.item($row,$column)
.font.bold = $True
.font.Italic = $True
.font.size = 16
.font.ColorIndex = 2
.Interior.ColorIndex = 3
.HorizontalAlignment = -4108 # $xlCenter
.HorizontalAlignment = -4131 # $xlLeft
.HorizontalAlignment = -4152 # $xlRight
.EntireRow.+

The Top 16 Colors with Codes for working with Excel via in PowerShell

1 = black
2 = white
3 = red
4 = lime
5 = blue
6 = yellow
7 = fuchsia
8 = aqua
9 = maroon
10 = green
11 = navy
12 = olive
13 = purple
14 = teal
15 = silver
16 = gray

Image: The Colors
Credits: http://gallery.technet.microsoft.com/office/6c8f0604-ebe1-473a-b35c-31c49890abef and Kent Finkle with his List-ExcelColorValues.ps1 PowerShell script.

SEO: Why this post? It directly answers the question “what number is the color red in PowerShell for Microsoft Excel?”

Saturday, 18 January 2014

Presenting Video Files Over HTTP on CIFS

Note: This could be any file really, just happens to be video files for this post.

It has been a long time coming, but here’s a post that is more Microsoft based than what I normally write about …

Essentially, we have a CIFS share with videos in, and to test if there’s any difference in behaviour accessing videos over the share, we want to setup IIS 6 (Windows 2003 R2 SP2) and IIS 7 (in Windows 2008 R2 SP1) to allow web-based delivery of these video files.

The IIS 6 Setup

Note: We can leave the Default Web Site with the default settings (which include anonymous authentication enabled and no directory browsing.)

Firstly, right-click the Default Web Site, and choose New > Virtual Directory... (saves reconfiguring the Default Web Site - leaves it untouched)

Image: IIS 6 New Virtual Directory

Follow through the wizard giving an alias of say ‘videos’:

Image: IIS 6 VDCW Virtual Directory Alias

For the web site content directory we enter the share path name:
Note: Test you can get to this share first via Windows Explorer.

Image: IIS 6 VDCW Web Site Content Directory

For the credentials, since this is going to be a video repository that anyone can get to, un-tick the ‘Always use the authenticated user’s credentials’ and enter a user name and password which has access to the share, and NTFS permissions to the files

Image: IIS 6 VDCW Security Credentials

All we need is read permissions (we’ll add browse too, this isn’t a requirement though.)

Image: IIS 6 VDCW Virtual Directory Access Permissions

And Finish!

That’s pretty much it. If we have a video called movie.mpg and our web server is called IIS6, the following link should open up with the movie:

http://IIS6/videos/movie.jpg

The IIS 7 Setup

The IIS 7 setup is pretty much identical.

Firstly, right-click the Default Web Site, and choose Add Virtual Directory...

Image: IIS 7 Add Virtual Directory

Enter ‘videos’ for alias, enter the physical path (the share), click on ‘Connect as...’ and provide the login.

Image: IIS 7 Configure Virtual Directory

And that’s it (we don’t even need directory browsing, and by default it selects anonymous authentication.) A link like the below should deliver our movie.

http://IIS8/videos/movie.jpg

Miscellaneous Bits

Titbit 1:

Unrelated note (but we like it anyway) - just something discovered in the process of writing this - take it for a spin:

To create a local windows user in Windows with a random password (displayed on screen) via the DOS shell>
net user “xerxes” /add /random

Titbit 2:

No post can escape without a little of my passion for NetApp ... Of course, the CIFS share in question was on NetApp storage, and the main purpose of my lab was to convince myself a problem was an IIS configuration issue ...

Some commands to investigate CIFS share permissions, and more, on NetApp Clustered ONTAP:

set diag
cifs options show -vserver svm1
export-policy rule show -vserver svm1 -policyname default -instance
vserver name-mapping show -vserver svm1 -direction win-unix
vserver name-mapping show -vserver svm1 -direction unix-win
cifs share show
vol show -fields policy,junction-path,junction-parent

Note i: Volumes/Qtrees acting as just CIFS shares would usually have the default export-policy.
Note ii: Only using set diag here because it usually gives more detail in the output.

Simulating a Headswap on the NetApp Simulator (8.1.3 7-Mode)

Firstly, if you’re planning for doing a real-life head swap, these documents from support.netapp.com and kb.netapp.com are worth reading:

Q: As a training exercise, is it possible to simulate a headswap on the Data ONTAP 8.1.2/3 7-Mode Simulator?
A: My conclusion is NO!

The reason? I was unable to change the sys-id even after editing CFCARD and setting boot loader options.
Note: If you change the sys-id via the boot loader on the first ever boot of the simulator, it works, but if you’ve already setup your sim, then the sys-id cannot be changed (unless there’s another way …)

But … I present my research for if it helps - perhaps someone reading knows how to do it J

My original answer before reaching the conclusion above:

A: HA is out of the question with the SIM, but simulating a single-controller head swap might be possible - that is - we can simulate a situation where we change the serial number, system ID (this is where I failed), and even motherboard serial number.

And here’s how I tried to do it!

Note: Here, the SIM we’re using is called n701 and running 8.1.3 7-mode.

n701> sysconfig
        NetApp Release 8.1.3 7-Mode: Sat Jun  8 08:11:51 PDT 2013
        System ID: 4061490662 (n701)
        System Serial Number: 4061490-66-2 (n701)
n701> aggr status
           Aggr State
          aggr1 online
          aggr0 online
n701> vol status
         Volume State
           vol0 online
          vol01 online
          vol02 online
          vol03 online

Performing a “Headswap” on the Simulator

Step 1) Removing Reservations

Logged in to the CLI as root (or equivalent), remove disk reservations via the systemshell and then halt the SIM:

priv set advanced
useradmin diaguser unlock
useradmin diaguser password
systemshell
Login with user = diag and the password set above
setenv PATH "${PATH}:/usr/sbin"
echo $PATH
cd /sim/dev/,disks
ls
sudo rm ,reservations
exit
halt

Note: If you don’t do this, then after you’ve changed serial and system ID, on trying to boot into maintenance mode (5) you’ll get:
PANIC: Can’t find device with WWN 0x1649826048. Remove ‘/sim/dev/,disks/,reservations’ and restart …

Step 2) Editing the CFCARD

Note: In my ignorance, I thought this might get around the “System Id Mismatch” error, it doesn’t!

With the SIM powered off, we first edit the CFCARD with our new serial number, system ID, and motherboard serial number (the mobo serial number isn’t really required to be changed, just doing it because we can). In the working directory of the simulator, navigate to:

cfcard > env

And edit the env file with notepad (notepad++ even better)

Image: The env file in VM > cfcard > env
 
The default 7-mode SIM has these entries in the env file:

setenv SYS_SERIAL_NUM 4061490-66-2
setenv bootarg.nvram.sysid 4061490662
setenv MOBO_SERIAL_NUM 999999

We’ll change them to say:

setenv SYS_SERIAL_NUM 1234567-89-0
setenv bootarg.nvram.sysid 1234567890
setenv MOBO_SERIAL_NUM 123456

Save the edited env file and close.

Note: It was hoped that this might get around the following error after we set the system-id via the boot loader:
WARNING: System id mismatch. This usually occurs when replacing CF or NVRAM cards!
Unfortunately it didn’t work.

Step 3) Changing environment variables via the boot loader

Boot the SIM and at the:

Hit [Enter] to boot immediately, or any other key for command prompt.

Press any key other then Enter!

At the boot loader (VLOADER>) prompt, run these commands:

printenv
setenv MOBO_SERIAL_NUM 123456
setenv SYS_SERIAL_NUM 1234567-89-0
setenv bootarg.nvram.sysid 1234567890
printenv
boot

Step 4) Booting into Maintenance Mode

At the:

* Press Ctrl-C for Boot Menu *

Press Ctrl-C for Boot Menu

When you encounter the below error:

WARNING: System id mismatch. This usually occurs when replacing CF or NVRAM cards!
Override system id?

And this is where I’ve hit a brick wall. It’s picking up the system id from where I don’t know. Reading from an old communities.netapp.com article there was mention of a ,sys-serial-num file (https://communities.netapp.com/message/37126), trying to find it with the command below came up unsuccessful:

n701% find . -name "sys*"

If you choose: y
It overrides your newly chosen system-id, so the system still has its old system-id. You cannot re-assign disks to your “new” controller system-id as you would in a head swap procedure.

If you choose: n
It halts with - ERROR: Please correct the problem and restart.

Thursday, 16 January 2014

How to Correct the Name in the Service Processor Prompt

Scenario

You have a NetApp filer running in production with:

SP>

- or -

SP WRONG-NAME>

Fix*

system node run -node NODENAME -command sp status
system node run -node NODENAME -command sp setup
system node run -node NODENAME -command sp reboot

*This is from then Clustered ONTAP clustershell - if 7-Mode then just run the commands direct from the nodeshell.

Note

Typically, you might see this if you’ve had a head-swap, motherboard replacement, or repurposed controller. The SP will normally pick up its name from the controller and cannot be renamed differently. Only rebooting the service processor via sp reboot, or a complete power down of the system (a giveback/takeover is not sufficient since the SP never gets power-cycled.)

The obligatory image: No image for the wrong name, so it’s an excuse for a bit of Wallace and Gromit, and the wrong trousers!

Credit to Mr Chammt!

Sunday, 5 January 2014

Two Methods to Obtain the Contents of a System Folder in Clustered ONTAP

Method 1: Using WGET for Windows

Note > This assumes you’ve set up the SPI (Service Processor Infrastructure) for web access already - if not see Part 1 of this article and/or Method 3 from here - and that the files you want to get are available via this method.

1) Download Wget for Windows from:

2) Double-click the wget-XXX-setup.exe to install and follow through the Wizard.

3) Browse to the install directory which is (by default on a 64-bit system):
C:\Program Files (x86)\GnuWin32\

4) Then shift and right-click the bin folder - as in the image below - and select ‘Open command window here’:

Image: Open DOS command prompt at a specified folder using shift and right-click

5) And from the command prompt run a line like in the below example:

wget -r -l 1 https://10.0.1.60/spi/nac3-01/etc/log/stats/archive/ --no-check-certificate --user=admin --password=Pa55word

Which recursively (hence the r) to a depth of 1 (hence the ‘ell’ -l 1 or level 1) - so as not to start recursively grabbing stuff from other directories - grabs all the files in the web folder path specified (here a Cluster with Cluster Management IP Address of 10.0.1.60, node nac3-01, and the stats > archive folder), ignores SSL certificate issues, and uses the specified credentials to log into the web server.

Method 2: Using FTP

1) If you don’t have a FTP server already, download Filezilla FTP server from:

Image: FileZilla Server Interface shortcut

Note 1 > Locally, the ‘Connect to Server’ details default to this: Server Address = 127.0.0.1, Port = 14147, with no Administration Password!
Note 2 > If this is your first time using FileZilla Server, you’ll want to create a user (Edit > General > Add User) with password (for the FTP session we’ll establish next), and a shared folder (Edit > Shared Folders > Add Folder), and give the user file and folder create permissions in this folder, and set the folder as home directory for this user.

2) Then run the commands as in the example below (again we’re grabbing the contents of the stats > archive folder):

::> security login unlock -username diag
::> security login password -username diag
::> set -privilege advanced
::*> systemshell -node naclus1-01
% cd /mroot/etc/log/stats/archive
% ftp
ftp> open
(to) 10.0.0.1
Name: ftpUser
Password: Passw0rd
ftp> binary
ftp> prompt
ftp> mput *.*
ftp> exit
% exit
::*> set -privilege admin
::> security login lock -username diag


THE END

Saturday, 4 January 2014

How to Hot-Add a SAS Shelf - Updated!

A minor update and re-format of this post “How to Hot Add a DS4243 Shelf - A Quick Guide” from 5th March 2013, for NetApp’s Clustered Data ONTAP!

Section 1: Commands Reference

Clustershell commands worth knowing:

::> system health node-connectivity disk show -node NODENAME
::> system health node-connectivity shelf show -node NODENAME

## START ##

Connected to both nodes via their serial port, run these commands on both controllers:

::> system health alert show -node NODENAME
::> storage disk option show -node NODENAME
::> storage disk option modify -autoassign off -node NODENAME
::> system node autosupport invoke -type all -message "SHELF HOT ADD" -node NODENAME
::> system node run local

> sasadmin expander_map

{Note which adapters the stack of shelves you’re working on is attached to.}

> storage show disk -p

## CABLING WORK for IOM A's (see Section 2A) ##

> storage show disk -p

## CABLING WORK for IOM B'S (see Section 2B) ##

> storage show disk -p

## CABLING WORK for ACP (see Section 3) ##

> options acp.enabled off
> options acp.enabled on
> storage show acp

{Wait for ACP to sort itself out.}

> exit

::> system node autosupport invoke -type all -message "SHELF HOT ADD COMPLETE!" -node NODENAME

Then run config advisor!

## FINISH ##

Section 2A: CABLING WORK for IOM A’s

1) Unplug the “long” cable from the IOM A circle port from the final shelf in the stack, and then plug this cable into the IOM A circle port on the new final shelf
2) Connect from the now empty IOM A circle port on the original final shelf to the IOM A square port on the new shelf (or shelves)

 Continue with section 1...

Section 2B: CABLING WORK IOM B’s

1) Unplug the “long” cable from the IOM B circle port from the final shelf in the stack, and then plug this cable into the IOM B circle port on the new final shelf
2) Connect from the now empty IOM B circle port on the original final shelf to the IOM B square port on the new shelf (or shelves)

 Continue with section 1...

Section 3: CABLING WORK ACP

Simply move the two ACP cables from circle ports on the original last shelf in the stack, into the respective ACP circle ports on the new shelf (or shelves), and “daisy chain” from circle to square the remaining ACP ports.

THE END

And finally … some images courtesy of the original post!

Image 1: Shelf SAS cabling with shelf numbering descending downwards

Image 2: Shelf SAS cabling with shelf numbering ascending upwards