Thursday, October 17, 2013

Netapp SAN Basic commands

SAN-Daily Health Check

 filer> rdfile /etc/messages  
Note: If you want to see old syslog messages, use following commands /etc/messages.0; /etc/messages.1 etc.,
  filer> snapmirror status
  filer> snapvault status
  filer> vol status -f (or) aggr status -f
  filer> environment chassis list-sensors
  filer> vol status
  filer> aggr status
  filer> df -Ah
  filer> df -h
  filer> lun show offline
 filer> sysconfig -a

Managing or monitoring or troubleshooting a Netapp filer.
  • sysconfig -a : shows hardware configuration with more verbose information
  • sysconfig -d : shows information of the disk attached to the filer
  • version : shows the netapp Ontap OS version.
  • uptime : shows the filer uptime
  • dns info : this shows the dns resolvers, the no of hits and misses and other info
  • nis info : this shows the nis domain name, yp servers etc.
  • rdfile : Like “cat” in Linux, used to read contents of text files/
  • wrfile : Creates/Overwrites a file. Similar to “cat > filename” in Linux
  • aggr status : Shows the aggregate status
  • aggr status -r : Shows the raid configuration, reconstruction information of the disks in filer
  • aggr show_space : Shows the disk usage of the aggreate, WAFL reserve, overheads etc.
  • vol status : Shows the volume information
  • vol status -s : Displays the spare disks on the filer
  • vol status -f : Displays the failed disks on the filer
  • vol status -r : Shows the raid configuration, reconstruction information of the disks
  • df -h : Displays volume disk usage
  • df -i : Shows the inode counts of all the volumes
  • df -Ah : Shows “df” information of the aggregate
  • license : Displays/add/removes license on a netapp filer
  • maxfiles : Displays and adds more inodes to a volume
  • aggr create : Creates aggregate
  • vol create : Creates volume in an aggregate
  • vol offline : Offlines a volume
  • vol online : Onlines a volume
  • vol destroy : Destroys and removes an volume
  • vol size [+|-] : Resize a volume in netapp filer
  • vol options : Displays/Changes volume options in a netapp filer
  • qtree create : Creates qtree
  • qtree status : Displays the status of qtrees
  • quota on : Enables quota on a netapp filer
  • quota off : Disables quota
  • quota resize : Resizes quota
  • quota report : Reports the quota and usage
  • snap list : Displays all snapshots on a volume
  • snap create : Create snapshot
  • snap sched : Schedule snapshot creation
  • snap reserve : Display/set snapshot reserve space in volume
  • /etc/exports : File that manages the NFS exports
  • rdfile /etc/exports : Read the NFS exports file
  • wrfile /etc/exports : Write to NFS exports file
  • exportfs -a : Exports all the filesystems listed in /etc/exports
  • cifs setup : Setup cifs
  • cifs shares : Create/displays cifs shares
  • cifs access : Changes access of cifs shares
  • lun create : Creates iscsi or fcp luns on a netapp filer
  • lun map : Maps lun to an igroup
  • lun show : Show all the luns on a filer
  • igroup create : Creates netapp igroup
  • lun stats : Show lun I/O statistics
  • disk show : Shows all the disk on the filer
  • disk zero spares : Zeros the spare disks
  • disk_fw_update : Upgrades the disk firmware on all disks
  • options : Display/Set options on netapp filer
  • options nfs : Display/Set NFS options
  • options timed : Display/Set NTP options on netapp.
  • options autosupport : Display/Set autosupport options
  • options cifs : Display/Set cifs options
  • options tcp : Display/Set TCP options
  • options net : Display/Set network options
  • ndmpcopy : Initiates ndmpcopy
  • ndmpd status : Displays status of ndmpd
  • ndmpd killall : Terminates all the ndmpd processes.
  • ifconfig : Displays/Sets IP address on a network/vif interface
  • vif create : Creates a VIF (bonding/trunking/teaming)
  • vif status : Displays status of a vif
  • netstat : Displays network statistics
  • sysstat -us 1 : begins a 1 second sample of the filer’s current utilization (crtl – c to end)
  • nfsstat : Shows nfs statistics
  • nfsstat -l : Displays nfs stats per client
  • nfs_hist : Displays nfs historgram
  • statit : beings/ends a performance workload sampling [-b starts / -e ends]
  • stats : Displays stats for every counter on netapp. Read stats man page for more info
  • ifstat : Displays Network interface stats
  • qtree stats : displays I/O stats of qtree
  • environment : display environment status on shelves and chassis of the filer
  • storage show : Shows storage component details
  • snapmirror intialize : Initialize a snapmirror relation
  • snapmirror update : Manually Update snapmirror relation
  • snapmirror resync : Resyns a broken snapmirror
  • snapmirror quiesce : Quiesces a snapmirror bond
  • snapmirror break : Breakes a snapmirror relation
  • snapmirror abort : Abort a running snapmirror
  • snapmirror status : Shows snapmirror status
  • lock status -h : Displays locks held by filer
  • sm_mon : Manage the locks
  • storage download shelf : Installs the shelf firmware
  • software get : Download the Netapp OS software
  • software install : Installs OS
  • download : Updates the installed OS
  • cf status : Displays cluster status
  • cf takeover : Takes over the cluster partner
  • cf giveback : Gives back control to the cluster partner
  • reboot : Reboots a filer
Here are some of the useful functions of “storage” command in Netapp.
1) To show all disks on the system : Use “storage show disk -T” to display all the disks attached to the filer, the disk serial number, vendor, model, disk firmware version and type of disk (SATA/ATA/FCAL)
# rsh filer12 storage show disk -T
DISK                  SHELF BAY SERIAL           VENDOR   MODEL      REV TYPE
——————— ——— —————- ——– ———- —- ——
0d.16                   1    0  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.17                   1    1  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.18                   1    2  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.19                   1    3  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.20                   1    4  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.21                   1    5  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
0d.22                   1    6  xxxxxxxxxxxxxxxx NETAPP   X276 NA07 FCAL
2) To see complete information of a particular disk : Use “storage show disk -a ” to view complete information of a netapp disk. This command gives you the shelf, bay, serial number of disk, disk speed and many other.
# rsh filer12 storage show disk -a 0d.99
Disk:             0d.99
Shelf:            5
Bay:              13
Serial:           xxxxxxxxxxxxxxxxxxxx
Vendor:           NETAPP
Model:            X276
Rev:              NA07
RPM:              10000
WWN:              xxxxxxxxxxxxxxxxxxa
UID:              xxxxxxxxxxxxxxxxx:00000000:00000000:00000000:00000000
Downrev:          no
Pri Port:         B
Power-on Hours:   N/A
Blocks read:      0
Blocks written:   0
Time interval:    00:00:00
Glist count:      0
Scrub last done:  00:00:00
Scrub count:      0
LIP count:        0
Dynamically qualified:  No
#
3) To list all storage adapters on the filer : Use “storage show adapter -a” command to display all the storage adapters (hba) on the filer.
# rsh filer12 storage show adapter -a
Slot:            0a
Description:     Fibre Channel Host Adapter 0a (Dual-channel, QLogic 2322 rev. 3)
Firmware Rev:    3.3.25
FC Node Name:    xxxxxxxxxxxxxxxxxxx
FC Packet Size:  2048
Link Data Rate:  2 Gbit
SRAM Parity:     Yes
External GBIC:   No
State:           Enabled
In Use:          No
Redundant:       Yes
Slot:            0b
Description:     Fibre Channel Host Adapter 0b (Dual-channel, QLogic 2322 rev. 3)
Firmware Rev:    3.3.25
FC Node Name:    xxxxxxxxxxxxxxxxxxx
..
4) To get shelf details of filer : Use “storage show shelf ” command to display the details of the shelf and its partner shelf.
# rsh filer12 storage show shelf 0c.shelf2
Shelf name:    0c.shelf2
Channel:       0c
Module:        A
Shelf id:      2
Shelf UID:     xxxxxxxxxxxxxxxxxxxxxxx
Term switch:   N/A
Shelf state:   ONLINE
Module state:  OK
                               Loop  Invalid  Invalid  Clock  Insert  Stall  Util    LIP
Disk    Disk     Port            up      CRC     Word  Delta   Count  Count  Percent Count
  Id     Bay    State         Count    Count    Count
—————————————————————————————-
[IN  ]          OK                0        0        0      8       0      0    71     0
[OUT ]          OK                0        0        0      0       0      0    52     0
[  32]     0    OK                0        0        0     32       0      0     0     0
[  33]     1    OK                0        0        0     32       0      0     2     0
[  34]     2    OK                0        0        0     24       0      0     0     0
[  35]     3    OK                0        0        0     24       0      0     1     0
[  36]     4    OK                0        0        0      8       0      0     2     0
[  37]     5    OK                0        0        0     24       0      0     4     0


No comments:

Post a Comment