NetApp Command Line Cheatsheet
NetApp Command Line Cheatsheet
NetApp Command Line Cheatsheet
This is a quick and dirty NetApp commandline cheatsheet on most of the common commands
used, this is not extensive so check out the man pages and NetApp documentation. I will be
updating this document as I become more familar with the NetApp application.
Server
boot_ontap - boots the current Data ONTAP software release stored on the b
boot primary - boots the Data ONTAP release stored on the boot device as t
boot_backup - boots the backup Data ONTAP release from the boot device
startup modes
boot_diags - boots a Data ONTAP diagnostic kernel
Note: there are other options but NetApp will provide these as when necessary
halt [-t <mins>] [-f]
shutdown
-t = shutdown after minutes specified
-f = used with HA clustering, means that the partner filer does not take over
reboot [-t <mins>] [-s] [-r] [-f]
## Now you should be able to access the systemshell and use all the standard Unix
## commands
systemshell
login: diag
password: ********
Licensing and Version
## display licenses
license
## Adding a license
licenses (commandline) license add <code1> <code2>
## Disabling a license
license delete <service>
version [-b]
Data ONTAP version -b = include name and version information for the primary, secondary and diagnost
firmware
System Configuration
sysconfig
General information sysconfig -v
sysconfig -a (detailed)
Configuration errors sysconfig -c
sysconfig -d
Display disk devices sysconfig -A
Display Raid group information sysconfig -V
Display arregates and plexes sysconfig -r
Display tape devices sysconfig -t
Display tape libraries sysconfig -m
Environment Information
General information environment status
environment shelf [adapter]
Disk enclosures (shelves) environment shelf_power_status
environment chassis all
environment chassis list-sensors
environment chassis Fans
Chassis environment chassis CPU_Fans
environment chassis Power
environment chassis Temperature
environment chassis [PS1|PS2]
Fibre Channel Information
fcstat link_status
Fibre Channel stats fcstat fcal_stat
fcstat device_map
SAS Adapter and Expander Information
sasstat shelf
Shelf information sasstat shelf_short
sasstat expander
Expander information sasstat expander_map
sasstat expander_phy_state
Disk information sasstat dev_stats
Adapter information sasstat adapter_state
Statistical Information
System stats show system
Processor stats show processor
Disk stats show disk
Volume stats show volume
LUN stats show lun
Aggregate stats show aggregate
FC stats show fcp
iSCSI stats show iscsi
CIFS stats show cifs
Network stats show ifnet
Storage
Storage Commands
storage show adapter
storage show disk [-a|-x|-p|-T]
storage show expander
storage show fabric
storage show fault
storage show hub
storage show initiators
storage show mc
storage show port
Display storage show shelf
storage show switch
storage show tape [supported]
storage show acp
Disks
Disk Information
This is the physical disk itself, normally the disk will reside in a disk enclosure, the disk will have a pathname
type of disk enclosure
2a = SCSI adapter
Disk name
17 = disk SCSI ID
Any disks that are classed as spare will be used in any group to replace failed disks. They can also be assigned
assigned to a specific pool.
Disk Types
Data holds data stored within the RAID group
Spare Does not hold usable data but is available to be added to a RAID group in an aggregate, also known as a hot sp
Parity Store data reconstruction information within the RAID group
dParity Stores double-parity information within the RAID group, if RAID-DP is enabled
Disk Commands
disk show
disk show <disk_name>
disk_list
sysconfig -r
Display sysconfig -d
Note: the release modifies the state of the disk from sanitize to spare. Sanitize requir
disk maint start -d <disk_list>
disk maint abort <disk_list>
disk maint list
Maintanence disk maint status
## Example
ontap1> disk simpush -l
The following pulled disks are available for pushing:
v0.16:NETAPP__:VD-1000MB-FZ-520:14161400:2104448
Aggregates
Aggregate States
Online Read and write access to volumes is allowed
Restricted Some operations, such as parity reconstruction are allowed, but data access is not allowed
Offline No access to the aggregate is allowed
Aggregate Status Values
32-bit This aggregate is a 32-bit aggregate
64-bit This aggregate is a 64-bit aggregate
aggr This aggregate is capable of contain FlexVol volumes
copying This aggregate is currently the target aggregate of an active copy operation
degraded This aggregate is contains at least one RAID group with single disk failure that is not being reconstr
double degraded This aggregate is contains at least one RAID group with double disk failure that is not being reconst
foreign Disks that the aggregate contains were moved to the current storage system from another storage s
growing Disks are in the process of being added to the aggregate
initializing The aggregate is in the process of being initialized
invalid The aggregate contains no volumes and none can be added. Typically this happend only after an ab
ironing A WAFL consistency check is being performewd on the aggregate
mirror degraded The aggregate is mirrored and one of its plexes is offline or resynchronizing
mirrored The aggregate is mirrored
needs check WAFL consistency check needs to be performed on the aggregate
normal The aggregate is unmirrored and all of its RAID groups are functional
out-of-date The aggregate is mirrored and needs to be resynchronized
partial At least one disk was found for the aggregate, but two or more disks are missing
raid0 The aggrgate consists of RAID 0 (no parity) RAID groups
raid4 The agrregate consists of RAID 4 RAID groups
raid_dp The agrregate consists of RAID-DP RAID groups
reconstruct At least one RAID group in the aggregate is being reconstructed
Aggregate reallocation or file reallocation with the "-p" option has been started on the aggregate, r
redirect
degraded
resyncing One of the mirror aggregates plexes is being resynchronized
snapmirror The aggregate is a SnapMirror replica of another aggregate (traditional volumes only)
trad The aggregate is a traditional volume and cannot contain FlexVol volumes.
verifying A mirror operation is currently running on the aggregate
wafl inconsistent The aggregate has been marked corrupted; contact techincal support
Aggregate Commands
aggr status
Displaying aggr status -r
aggr status <aggregate> [-v]
Check you have spare disks aggr status -s
Adding (creating) ## Syntax - if no option is specified then the defult is used
aggr create <aggr_name> [-f] [-m] [-n] [-t {raid0 |raid4 |raid_dp}] [-r raid_si
rpm>] [-L] [-B {32|64}] <disk_list>
## create aggregate called newaggr that can have a maximum of 8 RAID groups
aggr create newaggr -r 8 -d 8a.16 8a.17 8a.18 8a.19
## create aggrgate called newFCALaggr (note SAS and FC disks may bge used)
aggr create newFCALaggr -T FCAL 15
Note:
-f = overrides the default behavior that does not permit disks in a plex to bel
pools
-m = specifies the optional creation of a SyncMirror
-n = displays the results of the command but does not execute it
-r = maximum size (number of disks) of the RAID groups for this aggregate
-T = disk type ATA, SATA, SAS, BSAS, FCAL or LUN
-R = rpm which include 5400, 7200, 10000 and 15000
aggr offline <aggregate>
Remove(destroying) aggr destroy <aggregate>
Unremoving(undestroying) aggr undestroy <aggregate>
Rename aggr rename <old name> <new name>
## Syntax
aggr add <aggr_name> [-f] [-n] [-g {raid_group_name | new |all}] <disk_list>
## add an additonal disk to aggregate pfvAggr, use "aggr status" to get group n
Increase size aggr status pfvAggr -r
aggr add pfvAggr -g rg0 -d v5.25
## Start a copy
aggr copy start <aggregate source> <aggregate destination>
Copy from one agrregate to
another ## Abort a copy - obtain the operation number by using "aggr copy status"
aggr copy abort <operation number>
Note: Starts parity scrubbing on the named online aggregate. Parity scrubbing c
the
parity disk(s) in their RAID group, correcting the parity disk’s contents as ne
given, parity scrubbing is started on all online aggregates. If an aggregate na
started on all RAID groups contained in the aggregate. If a plex name is given,
all RAID groups contained in the plex.
raid.scrub.duration 360
raid.scrub.enable on
raid.scrub.perf_impact low
raid.scrub.schedule
## verify status
aggr verify status
Note: Starts RAID mirror verification on the named online mirrored aggregate. I
RAID mirror verification is started on all online mirrored aggregates. Verifica
both plexes of a mirrored aggregate. In the default case, all blocks that diffe
changes
are made.
aggr media_scrub status
Note: Prints the media scrubbing status of the named aggregate, plex, or group.
then
status is printed for all RAID groups currently running a media scrub. The stat
percent-complete and whether it is suspended.
Media Scrub
Look at the following system options:
raid.media_scrub.enable on
raid.media_scrub.rate 600
raid.media_scrub.spares.enable on
Volumes
Volume States
Online Read and write access to this volume is allowed.
Restricted Some operations, such as parity reconstruction, are allowed, but data access is not allowed.
Offline No access to the volume is allowed.
Volume Status Values
The origin system is not allowing access. (FlexCache volumes
access denied
only.)
The volume's containing aggregate is undergoing reallocation (with the -p option specified). Read performan
active redirect
volume is in this state.
connecting The caching system is trying to connect to the origin system. (FlexCache volumes only.)
copying The volume is currently the target of an active vol copy or snapmirror operation.
degraded The volume's containing aggregate contains at least one degraded RAID group that is not being reconstructe
double degraded The volume's containing aggregate contains at least one degraded RAID-DP group that is not being reconstru
flex The volume is a FlexVol volume.
flexcache The volume is a FlexCache volume.
foreign Disks used by the volume's containing aggregate were moved to the current storage system from another sto
growing Disks are being added to the volume's containing aggregate.
initializing The volume's containing aggregate is being initialized.
invalid The volume does not contain a valid file system.
ironing A WAFL consistency check is being performed on the volume's containing aggregate.
lang mismatch The language setting of the origin volume was changed since the caching volume was created. (FlexCache v
mirror degraded The volume's containing aggregate is mirrored and one of its plexes is offline or resynchronizing.
mirrored The volume's containing aggregate is mirrored.
needs check A WAFL consistency check needs to be performed on the volume's containing aggregate.
out-of-date The volume's containing aggregate is mirrored and needs to be resynchronized.
partial At least one disk was found for the volume's containing aggregate, but two or more disks are missing.
raid0 The volume's containing aggregate consists of RAID0 (no parity) groups (array LUNs only).
raid4 The volume's containing aggregate consists of RAID4 groups.
raid_dp The volume's containing aggregate consists of RAID-DP groups.
reconstruct At least one RAID group in the volume's containing aggregate is being reconstructed.
The volume's containing aggregate is undergoing aggregate reallocation or file reallocation with the -p optio
redirect
volumes in the aggregate might be degraded.
The origin volume was deleted and re-created with the same name. Re-create the FlexCache volume to ree
rem vol changed
relationship. (FlexCache volumes only.)
rem vol unavail The origin volume is offline or has been deleted. (FlexCache volumes only.)
remote nvram err The origin system is experiencing problems with its NVRAM. (FlexCache volumes only.)
resyncing One of the plexes of the volume's containing mirrored aggregate is being resynchronized.
snapmirrored The volume is in a SnapMirror relationship with another volume.
trad The volume is a traditional volume.
unrecoverable The volume is a FlexVol volume that has been marked unrecoverable; contact technical support.
The origin system is running a version of Data ONTAP the does not support FlexCache volumes or is not com
unsup remote vol
on the caching system. (FlexCache volumes only.)
verifying RAID mirror verification is running on the volume's containing aggregate.
wafl inconsistent The volume or its containing aggregate has been marked corrupted; contact technical support .
General Volume Operations (Traditional and FlexVol)
vol status
vol status -v (verbose)
Displaying
vol status -l (display language)
vol offline <vol_name>
Remove (destroying) vol destroy <vol_name>
Rename vol rename <old_name> <new_name>
online vol online <vol_name>
offline vol offline <vol_name>
restrict vol restrict <vol_name>
vol decompress status
decompress vol decompress start <vol_name>
vol decompress stop <vol_name>
vol mirror volname [-n][-v victim_volname][-f][-d <disk_list>]
Note:
Mirrors the currently-unmirrored traditional volume volname, either with the specified
Mirroring contents of another unmirrored traditional volume victim_volname, which will be destro
The vol mirror command fails if either the chosen volname or victim_volname are flexib
volumes require that any operations having directly to do with their containing aggreg
new aggr command suite.
Change language vol lang <vol_name> <language>
## Display maximum number of files
maxfiles <vol_name>
Change maximum
number of files ## Change maximum number of files
maxfiles <vol_name> <max_num_files>
Change root volume vol options <vol_name> root
vol media_scrub status [volname|plexname|groupname -s disk-name][-v]
Note: Prints the media scrubbing status of the named aggregate, volume, plex, or group
then
status is printed for all RAID groups currently running a media scrub. The status incl
percent-complete and whether it is suspended.
Media Scrub
Look at the following system options:
raid.media_scrub.enable on
raid.media_scrub.rate 600
raid.media_scrub.spares.enable on
FlexVol Volume Operations (only)
## Syntax
vol create vol_name [-l language_code] [-s {volume|file|none}] <aggr_name> size{k|m|g|
Adding (creating) ## Create a 200MB volume using the english character set
vol create newvol -l en aggr1 200M
If you specify snap_delete, Data ONTAP attempts to create more free space by deleting
increasing the size of the volume. Data ONTAP deletes Snapshot copies based on the spe
using the snap autodelete command.
display a FlexVol
volume's containing vol container <vol_name>
aggregate
vol clone create clone_vol [-s none|file|volume] -b parent_vol [parent_snap]
Note: The vol clone create command creates a flexible volume named clone_vol on the lo
of a "backing" flexible volume named par_ent_vol. A clone is a volume that is a writab
volume. Initially, the clone and its parent share the same storage; more storage space
volume or the other changes.
vol copy start [-S|-s snapshot] <vol_source> <vol_destination>
vol copy status
## Example - Copies the nightly snapshot named nightly.1 on volume vol0 on the local f
on remote ## filer named toaster1.
vol copy start -s nightly.1 vol0 toaster1:vol0
Copying Note: Copies all data, including snapshots, from one volume to another. If the -S flag
copies all snapshots in the source volume to the destination volume. To specify a part
use the -s flag followed by the name of the snapshot. If neither the -S nor -s flag is
filer automatically creates a distinctively-named snapshot at the time the vol copy st
and copies only that snapshot to the destination volume.
The source and destination volumes must either both be traditional volumes or both be
copy command will abort if an attempt is made to copy between different volume types.
The source and destination volumes can be on the same filer or on different filers. If
destination volume is on a filer other than the one on which the vol copy start comman
the volume name in the filer_name:volume_name format.
Traditional Volume Operations (only)
adding (creating) vol|aggr create vol_name -v [-l language_code] [-f] [-m] [-n] [-v] [-t {raid4|raid_dp}
type] -R rpm] [-L] disk-list
## Create traditional volume using 20 disks, each RAID group can have 10 disks
vol create vol1 -r 10 20
vol add volname[-f][-n][-g <raidgroup>]{ ndisks[@size]|-d <disk_list> }
additional disks ## add another disk to the already existing traditional volume
vol add tradvol1 -d v5.28
splitting aggr split <volname/plexname> <new_volname>
## The more new "aggr scrub " command is preferred
Note: Print the status of parity scrubbing on the named traditional volume, plex or RA
provided, the status is given on all RAID groups currently undergoing parity scrubbing
percent-complete as well as the scrub’s suspended status (if any).
## The more new "aggr verify" command is preferred
## verify status
vol verify status
Note: Starts RAID mirror verification on the named online mirrored aggregate. If no na
RAID mirror verification is started on all online mirrored aggregates. Verification co
both plexes of a mirrored aggregate. In the default case, all blocks that differ are l
are made.
FlexCache Volumes
FlexCache Consistency
You can think of a delegation as a contract between the origin system and the caching volume; as long as the ca
delegation, the file has not changed. Delegations are used only in certain situations.
Delegations
When data from a file is retrieved from the origin volume, the origin system can give a delegation for that file to
that file is modified on the origin volume, whether due to a request from another caching volume or due to dire
system revokes the delegation for that file from all caching volumes that have that delegation.
When data is retrieved from the origin volume, the file that contains that data is considered valid in the FlexCac
delegation exists for that file. If no delegation exists, the file is considered valid for a certain length of time, sp
Attribute cache timeout.
timeouts
If a client requests data from a file for which there are no delegations, and the attribute cache timeout has bee
volume compares the file attributes of the cached file with the attributes of the file on the origin system.
If a client modifies a file that is cached, that operation is passed back, or proxied through, to the origin system,
cache.
write operation
proxy
When the write is proxied, the attributes of the file on the origin volume are changed. This means that when an
that file, any other FlexCache volume that has that data cached will re-request the data after the attribute cach
FlexCache Status Values
access denied The origin system is not allowing FlexCache access. Check the setting of the flexcache.access option on the orig
connecting The caching system is trying to connect to the origin system.
lang mismatch The language setting of the origin volume was changed since the FlexCache volume was created.
rem vol changed The origin volume was deleted and re-created with the same name. Re-create the FlexCache volume to reenable
rem vol unavail The origin volume is offline or has been deleted.
remote nvram err The origin system is experiencing problems with its NVRAM.
The origin system is running a version of Data ONTAP that either does not support FlexCache volumes or is not co
unsup remote vol
running on the caching system.
FlexCache Commands
vol status
vol status -v <flexcache_name>
Display ## How to display the options available and what they are set to
vol help options
vol options <flexcache_name>
Display free space df -L
## Syntax
vol create <flexcache_name> <aggr> [size{k|m|g|t}] -S origin:source_vol
Adding (Create) ## Create a FlexCache volume called flexcache1 with autogrow in aggr1 aggregate with the
## on storage netapp1 server
vol create flexcache1 aggr1 -S netapp1:vol1
vol offline < flexcache_name>
Removing (destroy) vol destroy <flexcache_name>
## Server stats
Statistics flexcache stats -S <volume_name> -c <client>
## File stats
flexcache fstat <path>
FlexClone Volumes
FlexClone Commands
vol status
vol status <flexclone_name> -v
Display
df -Lh
## Syntax
vol clone create clone_name [-s {volume|file|none}] -b parent_name [parent_snap]
adding (create)
## create a flexclone called flexclone1 from the parent flexvol1
vol clone create flexclone1 -b flexvol1
vol offline <flexclone_name>
Removing (destroy) vol destroy <flexclone_name>
splitting ## Determine the free space required to perform the split
vol clone split estimate <flexclone_name>
Deduplication
Deduplication Commands
sis start -s <path>
Note: schedule lists the days and hours of the day when deduplication runs. The sche
following forms:
QTrees
QTree Commands
qtree status [-i] [-v]
Display Note:
The -i option includes the qtree ID number in the display.
The -v option includes the owning vFiler unit, if the MultiStore license is
adding (create) ## Syntax - by default wafl.default_qtree_mode option is used
qtree create path [-m mode]
## create a news qtree in the /vol/users volume using 770 as permissions
qtree create /vol/users/news -m 770
Remove rm -Rf <directory>
Rename mv <old_name> <new_name>
## Move the directory to a different directory
mv /n/joel/vol1/dir1 /n/joel/vol1/olddir
Quotas
Quota Commands
Quotas configuration file /mroot/etc/quotas
## hard limit | thres |soft limit
##Quota Target type disk files| hold |disk file
##------------- ----- ---- ----- ----- ----- ----
* tree@/vol/vol0 - - - - - # moni
/vol/vol2/qtree tree 1024K 75k - - - # enfo
tinh user@/vol/vol2/qtree1 100M - - - - # enfo
Example quota file dba group@/vol/ora/qtree1 100M - - - - # enfo
# * = default user/group/qtree
# - = placeholder, no limit enforced, just enable stats collection