Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
NetApp command2

NetApp command2

Here are a few Data Ontap 7-Mode CLI commands that i窶况e put together for reference. I will continuously add to this list

General Commands
setup (Re-Run initial setup)
halt (Reboots controller into bootrom)
reboot (Reboots controller back to Data Ontap)
sysconfig -a (System configuration and information)
java netapp.cmds.jsh (limited freebsd cli)
storage show disk (show physical information about disks)
passwd (Change password for logged in user)
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)
options trusted.hosts * (Allows all hosts to the above command)
sysstat -s 5 (Displays operating statistics every 5 seconds i.e. CPU, NFS, CIFS, NET, DISK, etc)
reallocate measure /vol/volname (Measure the amount of fragmentation in a volume)
options autologout.console.enable on (Turns on autologout for the console)
options autologout.console.timeout 300 (300 second autologout for the console)
options autologout.telnet.enable on (Turns on autologout for telnet)
options autologout.telnet.timeout 300 (300 second autologout for the console)
environment shelf (Shows information about the shelves including model numbers)

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)

software list (Lists software in the /etc/software directory)
software getツhttp://x.x.x.x/8.0_e_image.zipツ software from http to software directory)
software delete (Deletes software in the /etc/software directory)
software updateツ8.0_e_image.zipツ-r (Install software. The -r prevents it rebooting afterwards)

Baseboard Management Controller BMC
bmc status (shows the status of the BMC remote management interface)
bmc setup (BMC remote management interface setup)

Service Port SP
sp status (shows the status of the SP remote management interface)
sp setup (SP remote management setup)

ACP (Alternate Control Path)
options acp.enabled on (Turns on ACP)
storage show acp -a (show ACP status)

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.

aggr createツaggregate_nameツ(Creates an Aggregate)
aggr destroyツaggregate_nameツ(removes an Aggregate)
aggr offlineツaggregate_nameツ(takes an Aggregate offline)
aggr onlineツaggregate_nameツ(bring an Aggregate online)
aggr optionsツaggregate_nameツroot (makes an Aggregate root|Only use if your Root Aggregate is damanged)
aggr status (shows status of all aggregates)
aggr statusツaggregate_nameツ(show status of a specific Aggregate)
aggr status -r aggr0 (shows the root volume on aggr0 and the disk layout)
aggr status -s aggr0 (shows spare disks on aggr0)
aggr status -v aggr0 (MUST BE DONE IN PRIV SET DIAG MODE. Shows more detailed information of the aggregate status)
aggr show_spaceツaggregate_nameツ(shows specific aggregate space information)
aggr optionsツaggregate_nameツnosnap=on (Disable snapshot autocreation)
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 list -Aツaggregate_nameツ(Lists snapshots on specified aggregate)
snap delete -Aツaggregate_nameツ(Deletes a snapshot on a specified aggregate)
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)

vol createツvolume_nameツ(Creates a volume)
vol autosizeツvolume_nameツ(Shows autosize settings for a given volume)
vol autosizeツvolume_nameツon|off (Turns Volume autosize on or off)
vol optionsツvolume_nameツ(Lists volume options)
vol sizeツvolume_nameツ+ sizeツk|m|g|tツ(increase volume size by KB, MB, GB or TB)
vol status -f (lists broken or failed disks)
vol status -s (lists spare disks)
vol status -r (lists raid groups)
vol scrub status -v (Shows the scrubbing status of volumes)
vol options nosnapdir on|off (enables or disables snapshot visibility from the volume or LUN level)

qtree createツ/vol/volume_name/qtree_nameツ(Create a qtree within a volume)
qtree securityツ/vol/volume_name/qtree_nameunix|ntfs|mixed (Change security settings of a qtree)
qtree statsツqtree_nameツ(Shows CIFS or NFS ops/sec for a given qtree)
qtree status (Displays all your Qtree窶冱)

snap createツvolume_namesnapshot_nameツ(create a snapshot)
snap listツvolume_nameツ(List snapshots for a volume)
snap deleteツvolume_name snapshot_nameツ(delete a snapshot on a volume)
snap delete -aツvolume_nameツ(Deletes all snapshots for a volume)
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 schedvolumeツ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)
options cifs.show_snapshot on (Allows snapshot directory to be browse-able via CIFS)
options nfs.hide_snapshot off (Allows snapshot directory to be visible via NFS)

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窶冲 use for Qtree based replication)
snapmirror initialize -S srcfiler:source_volume dstfiler:destination_volume (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 (Performed on the destination. Performs the same as the command above but for Qtree窶冱 only)
snapmirror initialize -S srcfiler/vol/vol1/- dstfiler:/vol/vol1/qtree (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窶冱)
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 breakツvolume_nameツ(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ツ(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 (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 (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)
窶徘riv set diag窶 followed by 窶徭napmirror break -h 窶 followed by 窶徘riv set窶. (If for some reason you snapmirror relationship has been orphaned, meaning it doesn窶冲 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 窶徭nap 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窶冲 forget to remove the entry from snapmirror.conf)

cf enable (enable cluster)
cf disable (disable cluster)
cf takeover (take over resources from other controller)
cf giveback (give back controller resources after a take over)

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 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窶冱)
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 x.x.x.x /vol/volume_nameツorツqtree_nameツ(Creates a vfiler name with ip address x.x.x.x and assigns the volume or qtree to the vfiler. The -s is optional)NOTE:ツ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 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 destroyツvfiler_nameツ(Deletes/removes a vfiler)
vfiler renameツvfiler_name_oldvfiler_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 x.x.x.x 1 (Adds a default route to a vfiler. Performed from vfiler0)
route add x.x.x.x/x x.x.x.x 1 (Adds a route in a vfiler)

To add extra vlans to a vfiler you must do the following:
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
Once the vfiler has this ip address in it窶冱 config we can add it onto the interface i.e. ifconfig vif0-360 netmask

options on (Turns Autosupport on)
options off (Turns Autosupport off)
autosupport.doit 窶彭escription窶 (creates an autosupport alert with a user defined description)

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
vol status -r (displays which disks are allocated as spare)

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)

lun setup (runs the cli lun setup wizard)
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 offlineツlun_pathツ(takes a lun offline)
lun onlineツlun_pathツ(brings a lun online)
lun show -v (Verbose listing of luns)
lun moveツ/lun_path_source /lun_path_destinationツ(Move lun from source to destination)
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窶冱 original size)
lun map /vol/vol1/lun1ツigroup_nameツ(Maps lun1 to the igroup_name)

lun alignment show (MUST BE DONE IN PRIV SET DIAG MODE. Shows which luns are aligned and which are not)

Fiber FCP
fcadmin config -t taget 0a (Changes adapter from initiator to target)
fcadmin config (lists adapter state)
fcadmin start (Start the FCP service)
fcadmin stop (Stop the FCP service)
fcp show adapters (Displays adapter type, status, FC Nodename, FC Portname and slot number)
fcp nodename (Displays fiber channel nodename)
fcp show initiators (Show fiber channel initiators)
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)
igroup show (Displays initiator groups with WWN窶冱)

iscsi start (Start the iscsi service)
iscsi stop (Stop the iscsi server)
iscsi status (Show whether iscsi server is running or not running)
iscsi interface show (Show which interfaces are enabled or disabled for iscsi)
iscsi interface enableツinterface_nameツ(Enable an interface for iscsi)
iscsi interface disableinterface_nameツ(Disable an interface for iscsi)
iscsi nodename (Display the controllers iscsi nodename)
igroup show (Displays iSCSI initiators)
igroup create -i -t vmware sqlcluster_igroup (Creates an Initiator Group called sqlcluster_igroup with OS type vmware)
igroup add sqlcluster_igroupツ (Assigns the following iscsi initiator to the sqlcluster_igroup. This can also be FCP addresses)

cifs setup (cifs setup wizard)
cifs terminate (terminate the cifs service)
cifs restart (restarts cifs)
cifs shares (displays cifs shares)
cifs status (show status of cifs)
cifs lookup SID|name (Either displays the SID if you type in the name or name if you type in the SID)
cifs sessions (Show you current cifs sessions)
cifs sessions -sツusernameツ(Shows the current session for a user)
cifs broadbast -vツvolume_nameツ窶徇essage窶 (Broadcast a message to all users connected to volume_name)
cifs shares -add share_name/vol/volume_name/qtree_nameツ(Create a cifs share on a specific volume or qtree)
cifs shares -deleteツshare_nameツ(Deletes a share name)
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_nameuser_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 (Displays configured preferred Windows Domain Controllers)
cifs prefdc addツdomain address_listツ(Adds a preferred dc for a specific domain i.e. cifs prefdc add netapplab.local
cifs prefdc deleteツdomainツ(Delete a preferred Windows Domain Controllers)
cifs gpresult (Displays which Windows Group Policies apply to this filer)
cifs gpupdate (Forces an update of Windows Group Policy)
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)
vscan off (Turns virus scanning off)
vscan reset (Resets virus scanning)

nfs setup (Runs the NFS setup wizard)
/etc/export (Enter in your export information here and save the file. Then proceed with exportfs -a to update memory buffer)
exportfs (Displays current exports)
exportfs -pツpathツ(Adds exports to the /etc/exports file)
exportfs -uav (Unexports all current exports)
exportfs -uツpathツ(Unexports a specific export from memory)
exportfs -zツpathツ(Unexports a specific export and also removes it from /etc/exports)
exportfs -a (Updates memory buffer with contents in /etc/exports)
nfsstat -d (Displays NFS statistics)

HTTP Admin
options httpd.admin.enable on (Turns on http web admin, na_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 status (Show SIS status)
sis config (Show SIS config)
sis onツ/vol/vol1ツ(Turn on deduplication on vol1)
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)
sis status -lツ/vol/vol1ツ(Display deduplication status on vol1)
df -sツvol1ツ(View space savings with deduplication)
sis stopツ/vol/vol1ツ(Stop deduplication on vol1)
sis offツ/vol/vol1ツ(Disables deduplication on vol1)

User Accounts
useradmin user addツuser_nameツ-gツgroup_nameツ(Adds a user to a group)
useradmin user list (Lists current users)
useradmin user listツuser_nameツ(List specific user information)
useradmin group list (Lists current groups)
useradmin group deleteツgroup_nameツ(Deletes a specific group name)
useradmin group modifyツgroup_nameツ-gツnew_group_name(Modify group name)
useradmin user deleteツuser_nameツ(Delete a specific user)
useradmin user modifyツuser_nameツ-gツgroup_nameツ(Adds a user to a group)
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 flush (Flushes the DNS cache)
/etc/resolv.conf (edit this file to change your dns servers)

ndmpd status (check status)
ndmpd on|off (turns ndmpd on or off)
ndmpd version (displays version information)
ndmpd version 4 (set ndmpd version to 4)
options ndmpd (Display ndmpd options)

Reading and Writing Files (Deduplication)
rdfileツpath/fileツ(Reads a file)
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窶冲 used this before try on the simulator.)
wrfile -aツpath/fileツ(Writes to a file by appending the changes)

/etc/messages (All logging is for the system is stored here)

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)

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 1 (Adds a default route of with metric 1)

sysstat -x 1 (displays per second statistics for CPU, iSCSI, FCP, CIFS, NFS, Disk Util, etc)
sysstat -m 1 (displays per second statistics for each CPU)
sysstat -M 1 (MUST BE DONE IN PRIV SET DIAG MODE. Displays per second statictics for CPU窶冱, 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)

If you have any technical questions about this tutorial or any other tutorials on this site, pleaseツopen a new thread in the forumsツand the community will be able to help you out.

All the tutorials included on this site are performed in a lab environment to simulate a real world production scenario. As everything is done to provide the most accurate steps to date, we take no responsibility if you implement any of these steps in a production environment.


0 #1 Guest 2018-11-10 00:09
I wanted to thank you for this fantastic
read!! I absolutely loved every bit of it. I havge got you saved as a favorite to check out new stuff you

Here is my homepage yingyangtwinsringtonemblple.Bl

Category Database

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email