NetApp SMcli commands for Security Analytics storage
search cancel

NetApp SMcli commands for Security Analytics storage


Article ID: 172468


Updated On:


Security Analytics


There are many Netapp SMcli commands to configure, manage, and monitor the NetApp storage arrays.  

If the system fails to communicate with the storage array on its status, the storage manager daemons may need to be restarted.

systemctl restart smagent
systemctl restart smmonitor


NOTE:  array_name is case sensitive

Create storage array support bundle

This has the details needed by NetApp to troubleshoot issues 

SMcli -n array_name -c 'save storageArray supportData file="/home/supportbundle";'

Grep interesting events in the major-event-log file in the support bundle

egrep "Date|Description|Priority" major-event-log.txt | paste - - - | egrep -v "Informational" | less

Find out the management IP addresses for each controller

This will display a few IP addresses.  The management IP address should be the first one listed.

SMcli -n array_name -S -c 'show controller [a];' | grep "IP address"
SMcli -n array_name -S -c 'show controller [b];' | grep "IP address"

Find out what arrays are attached

This will Auto discover the arrays and populate the local data base of arrays.

SMcli -A localhost

What arrays are connected

Typically named hostname_array0

SMcli -d

Shows the wwid number

SMcli -d -w

Show health of storage array

SMcli -n array_name -c 'show storagearray healthstatus;'

Status of FC Links

Will be either linkdown or online

cat /sys/class/fc_host/host?/port_state

Show host ports

SMcli -n array_name -S -c 'show allHostPorts;'

Show all volumes

SMcli -n array_name -c 'show allvolumes;'
SMcli -n array_name -c 'show allvolumes;'| grep owner
SMcli -n array_name -c 'show allvolumes;'| grep "Volume name"
SMcli -n array_name -c 'show volume [volume_name];'| grep -i owner

Show volume rebuild progress

SMcli -n array_name -c 'show volume [volume_name] actionprogress;'

List all available volumes with corresponding sizes

multipath -ll | egrep -A 1 "NETAPP" | paste - - - | sort -k 4 | sed -e 's/feat.*$//g'

Move all volumes to their preferred controller

SMcli -n array_name -c 'reset storageArray volumeDistribution;'

Show all Drives

SMcli -n array_name -c 'show alldrives;'
SMcli -n array_name -c 'show alldrives;'| grep Status

Show drive location

SMcli -n array_name -c 'start drive [99,drawer_number,slot_number] locate;'

Stop drive locator beacons

SMcli -n array_name -c 'stop drive locate;'

Show the drive status

SMcli -n array_name -c 'show drive [99,drawer_number,slot_number] summary;'

Revive a failed drive

SMcli -n array_name -c 'revive drive [99,drawer_number,slot_number];'

Show storage profile

Will also show the chassis serial number

SMcli -n array_name -c 'show storagearray profile;'

Show storage array chassis(serial) number

SMcli -n array_name -c 'show storagearray profile;' | grep Chassis

Show storage autoSupport configuration

SMcli -autoSupportconfig show

Show storage summary

SMcli -n array_name -c 'show storagearray summary;'

Show drive channel stats

(used when a degraded drive channel error is seen)

SMcli -n array_name -c 'show alldrivechannels stats;'

Show information about controller A or B

SMcli -n array_name -S -c 'show controller [a];'
SMcli controller_ip_address -S -c 'show controller [a];'

Show long running operations like initialization

SMcli -n array_name -c 'show storageArray longRunningOperations;'

Save all events to a file

SMcli -n array_name -c 'save storageArray allevents file="./all.txt";'

Scan or autodiscover arrays on full network and add to host configuration

SMcli -A -S

Clear volume Groups and leave the premium feature keys alone

WARNING: This command is destructive

SMcli -n array_name -S -c 'clear storagearray configuration volumeGroups;'

Clear configuration

WARNING: This command is destructive

SMcli -n array_name -S -c 'clear storagearray configuration all;'

Clear old name after clear configuration

Must use after clear configuration

SMcli -X -n array_name

Set ethernet IP for controller 'a'

SMcli -n array_name -S -c 'set controller [a] ethernetport [1] enableIPv4=True IPv4Address=ip_address IPv4SubnetMask=subnet_mask IPv4GatewayIP=gateway_ip;'

Change owner of volumegroup to controller 'b'

SMcli -n array_name -c 'set volumegroup [volume_name] owner=b;'

Clear drive channel stats

Used when a degraded drive channel error is seen

SMcli -n array_name -c 'clear alldrivechannels stats;'

Set drive channel to optimal

Used when a degraded drive channel error is seen

SMcli -n array_name -c 'set drivechannel [4] status=optimal;'

Set modification priority of all volumes to lowest

Causes background initialization to have minimal performance impact

SMcli -n array_name -c 'set allVolumes modificationPriority=lowest;'

Clear the hot spares

SMcli -n array_name -S -c 'set drive[99,drawer_number,slot_number] hotSpare=False;'

Set the blue allowed indicator light to on or off

This is used to identify PSU during canister replacement.

SMcli -n array_name -c 'set tray [99] powerfan [top] serviceAllowedIndicator=on;'
SMcli -n array_name -c 'set tray [99] powerfan [top] serviceAllowedIndicator=off;'

Show and set the time to the sensor time

SMcli -n array_name -c 'set storageArray time;'
SMcli -n array_name -c 'show storageArray time;'

Show NTP servers

SMcli controller_IP -c 'show storagearray profile;' | grep NTP

Configure NTP servers

SMcli controller_IP -c 'set controller[A] NTPServers=("" "");'
SMcli controller_IP -c 'set controller[B] NTPServers=("" "");'

Set name on array

SMcli -n array_name -c 'set storageArray userLabel="array1";'

Set password for array

SMcli -n array_name -c 'set storageArray Password="newpasswordhere";'

Remove the storage controller password

SMcli -n array_name -p old_password -c 'set storageArray Password="";'

Set controller to offline/online

SMcli -n array_name -c 'set controller[X] availability=offline;'
SMcli -n array_name -c 'set controller[X] availability=online;'

Clear drive encryption

This must be done one drive at a time. You will need the PSID number from the drive label 

SMcli -n array_name -c 'set drive [99,drawer_number,slot_number] securityID="PSID_from_drive_sticker";'