NetApp vFiler Command Reference Guide

NetApp General Command Reference Guide

The NetApp has a rich set of commands that allow you to completely manage the filer from the command line. The NetApp Command Line Interface or CLI allows the administrator to manage every single component of this device. Admittedly some aspects of the filer are easier to manage via a web interface, but as a rule, the CLI is the way to go. Below is a generalized reference guide to many of the commands it multiple command arguments. The commands are broken down into there respective organizational areas of interest.

NetApp Diagnostics Commands

Press DEL at boot up during memory test followed by boot_diags and select all – Diagnostic tests for a new install
> priv set diags – Enter diagnostics CLI mode from the Ontap CLI
> priv set – Return to normal CLI mode from diagnostics mode

NetApp SnapMirror Commands

> options snapmirror.enable on – turns on SnapMirror. Replace on with off to toggle
> rdfile /etc/snapmirror.allow – To be performed on the Source Filer. You should see you destination filers in this file.
> wrfile /etc/snapmirror.allow – To be performed on the Source Filer. Overwrites the file with the specified destination filer name and ip address
> vol restrict volume_name – To be performed on the Destination. Makes the destination volume read only which must be done for volume based replication. Don’t use for Qtree based replication
> snapmirror initialize -S srcfiler:source_volume dstfiler:destination_volume – To be performed on the destination. This is for full volume mirror. For example snapmirror initialize -S filer1:vol1 filer2:vol2
> snapmirror initialize -S srcfiler:/vol/vol1/qtree dstfiler:/vol/vol1/qtree – To be performed on the destination. Performs the same as the command above but for Qtree’s only
> snapmirror initialize -S srcfiler/vol/vol1/- dstfiler:/vol/vol1/qtree – To be performed on the destination. Performs volume to qtree replication. Includes all luns, exports on the source volume
> snapmirror status – Shows the status of snapmirror and replicated volumes or qtree’s
> snapmirror status -l – Shows much more detail that the command above, i.e. snapshot name, bytes transferred, progress, etc
> snapmirror quiesce volume_name – To be performed on Destination. Pauses the SnapMirror Replication. If you are removing the snapmirror relationship this is the first step.
> snapmirror break volume_name – To be performed on Destination. Breaks or disengages the SnapMirror Replication. If you are removing the snapmirror relationship this is the second step followed by deleting the snapshot
> snapmirror resync volume_name – To be performed on Destination. When data is out of date, for example working off DR site and wanting to resync back to primary, only performed when SnapMirror relationship is broken
> snapmirror update -S srcfiler:volume_name dstfiler:volume_name – To be performed on Destination. Forces a new snapshot on the source and performs a replication, only if an initial replication baseline has been already done

> snapmirror release volume_name dstfiler:volume_name – To be performed on Destination. Removes a snapmirror destination
/etc/snapmirror.conf – edit or wrfile this file on the destination filer or vfiler to enter in a snapmirror schedule. i.e. srcfiler:vol1 dstfiler:vol1 – 15 * * * This will replicate every 15 minutes. Each * represents a value. Starting from right to left you have day of week, month, day of month, hour minute. Minute 0-59, hours 0-23, day-of-month 1-31, day-of-week 0 for Sunday – 6 Saturday Each value can only be a number.

/vol/vfiler_vol/etc/snapmirror.conf – read or write this file for snapmirror configurations on a vfiler. vfiler_vol being the first volume with the /etc in the vfiler
“priv set diag” followed by “snapmirror break -h ” followed by “priv set”. – If for some reason you snapmirror relationship has been orphaned, meaning it doesn’t exist in snapmirror status on the source but does exist on the destination, you can use these three commands to force the destination to become read/write. You can then do “snap list” and find the baseline snapshot for the destination. Followed by snap delete of the baseline snapshot. This will remove the snapmirror relationship if all else fails. Lastly don’t forget to remove the entry from snapmirror.conf

NetApp Cluster Commands

NetApp vFiler & Multistore Commands

> vfiler limit – To be performed on the host to see what the limit of vfilers is
> vfiler limit 16 – To be performed on the host to change the limit of vfilers to 16 or any number you specify. Check the documentation for Memory Requirements before doing this
> vfiler status – Displays the status of the vfiler i.e. running or stopped
> vfiler status -r – On the host system. Shows which volumes are running on each vfiler
> vfiler rename old_vfiler_name new_vfiler_name – Renames a vfiler
> vfiler run vfiler_name setup – Runs the vfiler setup wizard
> vfiler run vfiler_name cifs setup – Runs the cifs setup wizard for a vfiler
> ipspace create ipspacename – Creates an ipspace – needed when 2 or more vfilers use the same network subnets
> ipspace list – Lists the available ipspace’s
> ipspace assign ipspacename interface_name – Assigns the interface to an ipspace.
> ipspace destroy ipspace_name – Removes/Deletes an ipspace
> vfiler create vfiler_name -s ipspace_name -i 10.10.23.1 /vol/volume_name or qtree_name – Creates a vfiler name with ip address 10.10.23.1 and assigns the volume or qtree to the vfiler. The -s is optionalNOTE: Creating a qtree as the base vfiler does not allow you to enable snapmirror. You must create the base as a volume!
> vfiler add vfiler_name -i 10.10.23.1 /vol/volume_name – Adds an ip address and additional volume – can be qtree to an existing vfiler name
> vfiler remove vfiler_name -i 10.10.23.1 /vol/volume_name – Removes an IP address and volume from an existing vfiler
> vfiler destroy vfiler_name – Deletes/removes a vfiler
> vfiler rename vfiler_name_old vfiler_name_new – Renames a vfiler from old name to new name
> vfiler context vfiler_name – Changes CLI into the context of the vfiler name
> vfiler allow vfiler_name proto=cifs proto=nfs proto=iscsi – Allows the following protocols cifs, nfs and iscsi. Disallows rsh, ssh, ftp and http
> vfiler stop vfiler_name – Stops a vfiler instance
> vfiler start vfiler_name – Starts a vfiler instance
> vfiler run vfiler_name route add default 10.10.23.1 1 – Adds a default route to a vfiler. To be performed from vfiler0
route add 10.10.23.1/10.10.23.1.x 1 – Adds a route in a vfiler

NetApp Vlan & vfiler Commands

Check the ip space that the vfiler is using by typing ipspace list
Create a vlan interface on the host i.e. vif0-110 for vlan 110
Assign an interface to the ip space of the vfiler i.e. ipspace assign ipspace_name vif0-110
Add the ip address you wish to use on the vlan interface to the vfiler i.e. vfiler add vfiler_name -i 10.10.23.1
Once the vfiler has this ip address in it’s config we can add it onto the interface i.e. ifconfig vif0-110 10.10.23.1 netmask 255.255.255.0

NetApp Hot Spares Commands

Any functioning disk which is not assigned or part of an aggregate but is assigned to a controller will function as a hot spare disk
disk show
> vol status -r – displays which disks are allocated as spare