Useful NetApp commands
I have an aging 2020 in my lab, which gradually eats drives and isn't lightning fast due to being configured with 7200RPM 500GB drives, lack of cache, etc. That said it is rock solid apart from the disks, having proper failover, LACP to the network, snapshots and dedupe - this makes it difficult for me to make a decision to replace it with a prosumer level NAS. One day I'll get organized and replace it with VSAN in my hosts, but it's going to be tricky to replace the controllers in my hosts with supported ones and migrate the data as I don't have the power to run both solutions at once, so it's going to need a long outage and taking a copy of all the data to a big SATA drive.
To unassign a disk:
disk assign 0b.30 0b.29 0b.28 0b.27 -s unowned -f
disk show (Show disk information)
disk show -n (Show unowned disks)
disk assign 0d.02.0 -s unowned (Changes ownership from owned to unowned or to other cluster member)
disk assign 0d.02.0 (assigns the disk to the controller you perform the command on)
options disk.auto_assign off (turns auto assign of unowned disks to controllers to off)
options disk.auto_assign on (turns auto assign of unowned disks to controllers to on)
storage show disk -p (displays primary, secondary port, shelf and bay in a metro cluster)
To remove fractional reservation:
vol options vol1 fractional_reserve 0
For lab use, change to a single spare - disables disk maintenance center:
options raid.min_spare_count 1
Display stats:
sysstat -s 5 # s is for summary
sysstat -x 1 # x is for extended
VIF
vif status (Displays the status of VIF interfaces)
vif create lacp vif0 ip e0a,e0b,e0c,e0d (Create a vif interface named VIF0 using lacp and a load balancing method of IP, bundled with interface e0a, e0b, e0c, e0d)
vif add vif0 e0a (Adds a down interface into an existing VIF)
vif destroy vif0 (deletes a VIF interface)
Network
vlan create vif0 10 (create a vlan on interface vif0. The interface will be vifo-10)
vlan delete vif0 10 (deletes the vlan interface vif0-10)
ifconfig vif0-10 x.x.x.x netmask x.x.x.x partner vif0-10 (Sets IP information on the interface named vif0-10 with a partner interface of vif0-10)
route add default 192.168.1.1 1 (Adds a default route of 192.168.1.1 with metric 1)
Nice sizing tool:
http://www.storagebyte.com/netapp.html
Growing a volume past 1TB (2020) or 2TB limit for SIS
If SIS has deduped the volume you will need to inflate the blocks again with undo sis from the privileged mode CLI.
priv set advanced
sis undo /vol/vol3
Manual snap restore:
snap restore -s .nightly.1 -r /vol/vol2/utility01/utility01-flat.vmdk /vol/vol2/utility01/utility01-flat.vmdk
The above is getting a little dated now, my hands-on with NetApp has been limited since I retired my lab 2020 (as a VMware employee VSAN is no cost to me and all flash is massively faster than the 26 7200RPM disks). Part of the issue with the 2020 is that it only runs OnTap 7 - which works fine, but I hit an issue several times where the internal SAS drives were failing with regularity and I'd get replacements on eBay, only so find they'd been used on an OnTap 8 system. There's no way from an OnTap 7 system to downgrade them so I'd have to send them right back...
Now OnTap 9 is current and 9.1 imminent, the simulator is probably the only way I'll get any hands on, Neil Anderson has handily written a detailed guide to building a virtual lab, http://www.flackbox.com/netapp-simulator/
No comments:
Post a Comment