Netapp Data Ontap 7
Netapp Data Ontap 7
sasadmin shelf (shows a graphical layout of your shelves with occupied disk slots)
options trusted.hosts x.x.x.x or x.x.x.x/nn (hosts that are allowed telnet, http, https and ssh admin
access. x.x.x.x = ip address, /nn is network bits)
sysstat -s 5 (Displays operating statistics every 5 seconds i.e. CPU, NFS, CIFS, NET, DISK, etc)
environment shelf (Shows information about the shelves including model numbers)
Diagnostics
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)
bmc status (shows the status of the BMC remote management interface)
Service Port SP
Root Volume
If you have a 32-bit root volume that you wish to convert to 64-bit, the best way I found is to snapmirror
the root volume to a 64-bit aggregate, break the snapmirror, set the new root volume as root, and
either failover and failback the filer, or reboot.
Aggregates
aggr options aggregate_name root (makes an Aggregate root|Only use if your Root Aggregate is
damanged)
aggr status -r aggr0 (shows the root volume on aggr0 and the disk layout)
aggr status -v aggr0 (MUST BE DONE IN PRIV SET DIAG MODE. Shows more detailed information of the
aggregate status)
aggr options aggregate_name raidsize=x (x being the number of drives in the RAID)
aggr scrub status -v (MUST BE DONE IN PRIV SET DIAG MODE. Shows scrub status of the aggregate)
aggr scrub resume (MUST BE DONE IN PRIV SET DIAG MODE. Resumes a susepended scrub)
aggr scrub suspend (MUST BE DONE IN PRIV SET DIAG MODE. Suspends a current scrub process)
aggr scrub start (MUST BE DONE IN PRIV SET DIAG MODE. Starts a new scrub process)
reallocate start -f -p /vol/volname (Run in priv set advanced, used after adding disks to an aggregate to
evenly distribute blocks amongst raid groups)
snap reserve -A aggregate_name 0 (Set Aggregate snap reserve to 0% or any number you enter)
snap sched -A aggregate_name x x x@x,x,x (Creates a snapshot shedule in weeks days hours@time ie 0
2 1@9 means no weekly snaps, 2 daily, 1 hourly @ 9am)
Volumes
vol size volume_name + size k|m|g|t (increase volume size by KB, MB, GB or TB)
vol options nosnapdir on|off (enables or disables snapshot visibility from the volume or LUN level)
Qtree’s
qtree stats qtree_name (Shows CIFS or NFS ops/sec for a given qtree)
Snapshots
snap autodelete volume_name show (Shows snapshot autodelete settings for a volume)
snap restore -s snapshot_name volume_name (Restores a snapshot on the specified volume name)
snap sched volume_name weeks days hours@time (Creates a snapshot schedule on a volume i.e. snap
sched volume 4 5 1@07 Weekly Snapshots are created at midnight on each Sunday, Daily snapshots are
created each day except Sunday at midnight)
snap delta volume_name (Shows delta changes between snapshots for a given volume)
snap reserve volume_name (Shows the snap reserve for a given volume)
snap reclaimable volume_name snapshot_name (Shows the amount of space reclaimable if you remove
this snapshot from the volume)
SnapMirror
options snapmirror.enable on (turns on SnapMirror. Replace on with off to toggle)
rdfile /etc/snapmirror.allow (Performed on the Source Filer. You should see you destination filers in this
file.)
wrfile /etc/snapmirror.allow (Performed on the Source Filer. Overwrites the file with the specified
destination filer name and ip address)
vol restrict volume_name (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 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 (Performed on Destination. Pauses the SnapMirror Replication. If you
are removing the snapmirror relationship this is the first step.)
snapmirror resync volume_name (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)
/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.)
“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)
Cluster
cf enable (enable cluster)
vFiler – Multistore
vfiler limit (Performed on the host to see what the limit of vfilers is)
vfiler limit 16 (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 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)
vfiler add vfiler_name -i x.x.x.x /vol/volume_name (Adds an ip address and additional volume (can be
qtree) to an existing vfiler name)
vfiler remove vfiler_name -i x.x.x.x /vol/volume_name (Removes an IP address and volume from an
existing 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 run vfiler_name route add default x.x.x.x 1 (Adds a default route to a vfiler. Performed from
vfiler0)
Check the ip space that the vfiler is using by typing ipspace list
Create the vlan interface on the host i.e. vif0-360 for vlan 360
Assign the interface to the ip space of the vfiler i.e. ipspace assign ipspace_name vif0-360
Add the ip address you wish to use on the vlan interface to the vfiler i.e. vfiler add vfiler_name -i
192.168.1.1
Once the vfiler has this ip address in it’s config we can add it onto the interface i.e. ifconfig vif0-360
192.168.1.1 netmask 255.255.255.0
Autosupport
Hot Spares
Any functioning disk that is not assigned to an aggregate but is assigned to a controller functions as a
hot spare disk
disk show
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)
storage show disk -p (displays primary, secondary port, shelf and bay in a metro cluster)
Luns
lun create -s 10g -t windows_2008 -o noreserve /vol/vol1/lun1 (creates a lun of 10GB with type
Windows 2008, sets no reservation and places it in the following volume or qtree)
lun resize -f lun_path +|- new_size k|m|g|t (Resizes a lun by adding space (+) or subtracting space (-)
Note: a lun can only ever grow 10x it’s original size)
lun alignment show (MUST BE DONE IN PRIV SET DIAG MODE. Shows which luns are aligned and which
are not)
Fiber FCP
fcp show adapters (Displays adapter type, status, FC Nodename, FC Portname and slot number)
fcp wwpn-alias set alias_name (Set a fiber channel alias name for the controller)
fcp wwpn-alias remove -a alias_name (Remove a fiber channel alias name for the controller)
iSCSI
iscsi interface show (Show which interfaces are enabled or disabled for iscsi)
igroup create -i -t vmware sqlcluster_igroup (Creates an Initiator Group called sqlcluster_igroup with OS
type vmware)
cifs lookup SID|name (Either displays the SID if you type in the name or name if you type in the SID)
cifs shares -add share_name /vol/volume_name/qtree_name (Create a cifs share on a specific volume or
qtree)
cifs shares share_name (Displays full path and permissions of the share)
cifs access share_name -g user_rights (Grants specific user rights to the share)
cifs access share_name user_name permission (Grants a specific permission to a user for a share.
Permissions = Full Control, Change, Read, No Access)
cifs domain info (Lists information about the filers connected Windows Domain)
cifs testdc ip_address (Test a specific Windows Domain Controller for connectivity)
cifs prefdc add domain address_list (Adds a preferred dc for a specific domain i.e. cifs prefdc add
netapplab.local 10.10.10.1)
cifs gpresult (Displays which Windows Group Policies apply to this filer)
cifs top (Performance data for cifs. cifs.per_client_stats.enable option must be on to use this feature)
vscan on (Turns virus scanning on)
NFS
/etc/export (Enter in your export information here and save the file. Then proceed with exportfs -a to
update memory buffer)
exportfs -z path (Unexports a specific export and also removes it from /etc/exports)
HTTP Admin
options httpd.admin.access host=x.x.x.x,x.x.x.x (Allows admin access for specific hosts separated by a
comma)
SIS (Deduplication)
sis config -s mon-fri@23 /vol/vol1 (Configure deduplication to run every monday – Friday at 11pm on
vol1)
sis start -s /vol/vol1 (Run deduplication manually on vol1)
User Accounts
useradmin domain user add user_name -g group_name (Adds a Windows Domain user to a local group)
useradmin domain user list -g group_name (List Windows Domain users in a specific group)
DNS
NDMPD
wrfile path/file (Writes to a file. Warning this method overwrites the file. Make sure you copy out
original contents if you wish to keep it. If you haven’t used this before try on the simulator.)
Logging
VIF
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)
Network
vlan create vif0 10 (create a vlan on interface vif0. The interface will be vifo-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)
Performance
sysstat -x 1 (displays per second statistics for CPU, iSCSI, FCP, CIFS, NFS, Disk Util, etc)
sysstat -M 1 (MUST BE DONE IN PRIV SET DIAG MODE. Displays per second statictics for CPU’s, Kahuna,
WAFL, etc)
statit b (MUST BE DONE IN PRIV SET DIAG MODE. Starts a performance snapshot)
statit e (MUST BE DONE IN PRIV SET DIAG MODE. Stops a performance snapshot and displays the stats
on screen. TIP: Turn on logging in your terminal program before running this command