Thursday, August 22, 2013

Netapp lun and disk management commands

Netapp Lun and disk management is sometimes required when you need to get down into the hardware and manage storage by shelfs, spares on specific controllers as an example. Netapps have a vast array of disk management commands. (If you can pardon the pun). I don’t think vast is accurate, but there are enough tools to manage disks within the arrays, controllers, shelfs etc.. Below is a quick look with examples.
Turns auto assign of unowned disks to controllers to off or on
> options disk.auto_assign off
> options disk.auto_assign on
 If no options are specified, then the options command prints the current value of all available options. If an option is specified with no corresponding value, then the current value of that option is printed. If only a part of an option is specified with no value, then the list of all options that start with the partial-option string is printed. So below as described, we are turning off a disk property.
Turns auto assign of unowned disks to controllers to on
> options disk.auto_assign on
Displays primary, secondary port, shelf and bay in a metro cluster
> storage show disk -p
Show unowned disks
> disk show -n
Changes ownership from owned to unowned or to other cluster member
> disk assign 0d.02.0 -s unowned
Assigns the disk to the controller you perform the command on
> disk assign 0d.02.0

Netapp LUN Management

Executes the cli lun setup wizard (I wish EMC’s had something this slick).
> lun setup
This reates a lun of 15GB with type Windows 2003 and sets no reservation. The LUN is assigned to the vol_winblows
> lun create -s 15g -t windows_2003R1 -o noreserve /vol/vol_winblows/lun4
Brings a LUN offline
> lun offline lun_path_2user
Brings a LUN online, obviously the opposite of the above example
> lun online lun_path_2use
Verbose listing of the configured LUN’s
> lun show -v
Move a LUN from one place to another
> lun move /lun_path_src /lun_path_dest
Resize a LUN by either adding or subtracting space, with the – or + operators.
> lun resize -f lun_path +|- new_size k|m|g|t
Maps a LUN to a group name
> lun map /vol/vol1/lun1 igroup_name
Shows which LUN’s are aligned or not. I believe this has to be done in the priv set diag mode. *Quite important*
> lun alignment show

No comments:

Post a Comment