Netapp Cheatsheet
NetApp Commandline 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
Startup and Shutdown |
|
Boot Menu | 1) Normal Boot. 2) Boot without /etc/rc.Selection (1-8)?
|
startup modes |
Note: there are other options but NetApp will provide these as when necessary |
shutdown | halt [-t <mins>] [-f] -t = shutdown after minutes specified |
restart | reboot [-t <mins>] [-s] [-r] [-f]-f = used with HA clustering, means that the partner filer does not take over |
System Privilege and System shell |
|
Privilege | priv set [-q] [admin | advanced] Note: by default you are in administrative mode |
Access the systemshell | ## First obtain the advanced privileges priv set advancedpassword: ******** |
Licensing and Version |
|
licenses (commandline) | ## display licenses licenselicense add <code1> <code2> ## Disabling a license |
Data ONTAP version | version [-b]-b = include name and version information for the primary, secondary and diagnostic kernels and the firmware |
Useful Commands |
|
read the messages file | rdfile /etc/messages |
write to a file | wrfile -a <file> <text>wrfile -a /etc/test1 "This is line \"15\"." |
System Configuration |
|
General information | sysconfigsysconfig -vsysconfig -a (detailed) |
Configuration errors | sysconfig -c |
Display disk devices | sysconfig -d 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 |
Disk enclosures (shelves) | environment shelf [adapter] environment shelf_power_status |
Chassis | environment chassis all environment chassis list-sensorsenvironment chassis [PS1|PS2] |
Fibre Channel Information |
|
Fibre Channel stats | fcstat link_statusfcstat fcal_statfcstat device_map |
SAS Adapter and Expander Information |
|
Shelf information | sasstat shelf sasstat shelf_short |
Expander information | sasstat expandersasstat expander_mapsasstat 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 |
|
Display | storage show adapterstorage show disk [-a|-x|-p|-T]storage array show-config |
Enable | storage enable adapter |
Disable | storage disable adapter |
Rename switch | storage rename <oldname> <newname> |
Remove port | storage array remove-port <array_name> -p <WWPN> |
Load Balance | storage load balance |
Power Cycle | storage power_cycle shelf -hstorage power_cycle shelf start -c <channel name>storage power_cycle shelf completed |
Disks
Disk Information |
|
Disk name | This is the physical disk itself, normally the disk will reside in a disk enclosure, the disk will have a pathname like 2a.17 depending on the type of disk enclosure
Any disks that are classed as spare will be used in any group to replace failed disks. They can also be assigned to any aggregate. Disks are 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 spare |
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 |
|
Display | disk show disk show <disk_name>sysconfig -d ## list all unnassigned/assigned disks |
Adding (assigning) | ## Add a specific disk to pool1 the mirror pool disk assign <disk_name> -p 1disk assign all -p 0 |
Remove (spin down disk) | disk remove <disk_name> |
Reassign | disk reassign -d <new_sysid> |
Replace | disk replace start <disk_name> <spare_disk_name>disk replace stop <disk_name>Note: uses Rapid RAID Recovery to copy data from the specified file system to the specified spare disk, you can stop this process using the stop command |
Zero spare disks | disk zero spares |
fail a disk | disk fail <disk_name> |
Scrub a disk | disk scrub start disk scrub stop |
Sanitize | disk sanitize start <disk list>disk sanitize abort <disk_list> |
Maintanence | disk maint start -d <disk_list>disk maint abort <disk_list>Note: you can test the disk using maintain mode |
swap a disk | disk swapdisk unswapNote: it stalls all SCSI I/O until you physically replace or add a disk, can used on SCSI disk only. |
Statisics | disk_stat <disk_name> |
Simulate a pulled disk | disk simpull <disk_name> |
Simulate a pushed disk | disk simpush -ldisk simpush <complete path of disk obtained from above command> v0.16:NETAPP__:VD-1000MB-FZ-520:14161400:2104448 ontap1> disk simpush 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 reconstructed |
double degraded | This aggregate is contains at least one RAID group with double disk failure that is not being reconstructed (RAID-DP aggregate only) |
foreign | Disks that the aggregate contains were moved to the current storage system from another storage system |
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 aborted "aggr copy" operation |
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 |
redirect | Aggregate reallocation or file reallocation with the "-p" option has been started on the aggregate, read performance will be 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 |
|
Displaying | aggr statusaggr status -raggr 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_size] [-T disk_type] [-R rpm>] [-L] [-B {32|64}] <disk_list>aggr create newaggr -r 8 -d 8a.16 8a.17 8a.18 8a.19 ## create aggregated called newfastaggr using 20 x 15000rpm disks Note: -f = overrides the default behavior that does not permit disks in a plex to belong to different disk pools |
Remove(destroying) | aggr offline <aggregate> aggr destroy <aggregate> |
Unremoving(undestroying) | aggr undestroy <aggregate> |
Rename | aggr rename <old name> <new name> |
Increase size | ## Syntax aggr add <aggr_name> [-f] [-n] [-g {raid_group_name | new |all}] <disk_list>aggr add aggr1 4@300 |
offline | aggr offline <aggregate> |
online | aggr online <aggregate> |
restricted state | aggr restrict <aggregate> |
Change an aggregate options | ## to display the aggregates options aggr options <aggregate>aggr options <aggregate> raidsize 4 |
show space usage | aggr show_space <aggregate> |
Mirror | aggr mirror <aggregate> |
Split mirror | aggr split <aggregate/plex> <new_aggregate> |
Copy from one agrregate to another | ## Obtain the statusaggr copy status |
Scrubbing (parity) | ## Media scrub status aggr media_scrub statusaggr scrub resume [ aggrname | plexname | groupname ] Note: Starts parity scrubbing on the named online aggregate. Parity scrubbing compares the data disks to the Look at the following system options: raid.scrub.duration 360 |
Verify (mirroring) | ## verify status aggr verify statusaggr verify resume [ aggrname ] Note: Starts RAID mirror verification on the named online mirrored aggregate. If no name is given, then |
Media Scrub | aggr media_scrub status percent-complete and whether it is suspended. Look at the following system options: |
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 |
|
access denied | The origin system is not allowing access. (FlexCache volumes only.) |
active redirect | The volume's containing aggregate is undergoing reallocation (with the -p option specified). Read performance may be reduced while the 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 reconstructed after single disk failure. |
double degraded | The volume's containing aggregate contains at least one degraded RAID-DP group that is not being reconstructed after double disk failure. |
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 storage system. |
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 volumes only.) |
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. |
redirect | The volume's containing aggregate is undergoing aggregate reallocation or file reallocation with the -p option. Read performance to volumes in the aggregate might be degraded. |
rem vol changed | The origin volume was deleted and re-created with the same name. Re-create the FlexCache volume to reenable the FlexCache 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. |
unsup remote vol | The origin system is running a version of Data ONTAP the does not support FlexCache volumes or is not compatible with the version running 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) |
|
Displaying | vol status vol status -l (display language) |
Remove (destroying) | vol offline <vol_name> 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> |
decompress | vol decompress status vol decompress start <vol_name>vol decompress stop <vol_name> |
Mirroring | vol mirror volname [-n][-v victim_volname][-f][-d <disk_list>] Note: |
Change language | vol lang <vol_name> <language> |
Change maximum number of files | ## Display maximum number of filesmaxfiles <vol_name>maxfiles <vol_name> <max_num_files> |
Change root volume | vol options <vol_name> root |
Media Scrub | vol media_scrub status [volname|plexname|groupname -s disk-name][-v] percent-complete and whether it is suspended. Look at the following system options: |
FlexVol Volume Operations (only) |
|
Adding (creating) | ## Syntax ## Create a 200MB volume using the english character set |
additional disks | ## add an additional disk to aggregate flexvol1, use "aggr status" to get group name aggr status flexvol1 -raggr add flexvol1 -g rg0 -d v5.25 |
Resizing | vol size <vol_name> [+|-] n{k|m|g|t}vol size flexvol1 + 100m |
Automatically resizing | vol autosize vol_name [-m size {k|m|g|t}] [-I size {k|m|g|t}] onvol autosize flexvol1 -m 500m -I 10m on |
Determine free space and Inodes | df -Ah df -I |
Determine size | vol size <vol_name> |
automatic free space preservation | vol options <vol_name> try_first [volume_grow|snap_delete] Note: |
display a FlexVol volume's containing aggregate | vol container <vol_name> |
Cloning | vol clone create clone_vol [-s none|file|volume] -b parent_vol [parent_snap] vol clone split status Note: The vol clone create command creates a flexible volume named clone_vol on the local filer that is a clone of a "backing" flexible volume named par_ent_vol. A clone is a volume that is a writable snapshot of another volume. Initially, the clone and its parent share the same storage; more storage space is consumed only as one volume or the other changes. |
Copying | vol copy start [-S|-s snapshot] <vol_source> <vol_destination> vol copy statusvol copy throttle <operation_number> <throttle value 10-1> ## Example - Copies the nightly snapshot named nightly.1 on volume vol0 on the local filer to the volume vol0 on remote ## filer named toaster1. Note: Copies all data, including snapshots, from one volume to another. If the -S flag is used, the command copies all snapshots in the source volume to the destination volume. To specify a particular snapshot to copy, use the -s flag followed by the name of the snapshot. If neither the -S nor -s flag is used in the command, the filer automatically creates a distinctively-named snapshot at the time the vol copy start command is executed and copies only that snapshot to the destination volume. |
Traditional Volume Operations (only) |
|
adding (creating) | vol|aggr create vol_name -v [-l language_code] [-f] [-m] [-n] [-v] [-t {raid4|raid_dp}] [-r raidsize] [-T disk-type] -R rpm] [-L] disk-listvol create vol1 -r 10 20 |
additional disks | vol add volname[-f][-n][-g <raidgroup>]{ ndisks[@size]|-d <disk_list> }vol add tradvol1 -d v5.28 |
splitting | aggr split <volname/plexname> <new_volname> |
Scrubing (parity) | ## The more new "aggr scrub " command is preferred
|
Verify (mirroring) | ## The more new "aggr verify" command is preferred vol verify resume [ aggrname ] Note: Starts RAID mirror verification on the named online mirrored aggregate. If no name is given, then |
FlexCache Volumes
FlexCache Consistency |
|
Delegations | You can think of a delegation as a contract between the origin system and the caching volume; as long as the caching volume has the delegation, the file has not changed. Delegations are used only in certain situations.When data from a file is retrieved from the origin volume, the origin system can give a delegation for that file to the caching volume. Before that file is modified on the origin volume, whether due to a request from another caching volume or due to direct client access, the origin system revokes the delegation for that file from all caching volumes that have that delegation. |
Attribute cache timeouts | When data is retrieved from the origin volume, the file that contains that data is considered valid in the FlexCache volume as long as a delegation exists for that file. If no delegation exists, the file is considered valid for a certain length of time, specified by the attribute cache timeout.If a client requests data from a file for which there are no delegations, and the attribute cache timeout has been exceeded, the FlexCache volume compares the file attributes of the cached file with the attributes of the file on the origin system. |
write operation proxy | If a client modifies a file that is cached, that operation is passed back, or proxied through, to the origin system, and the file is ejected from the cache.When the write is proxied, the attributes of the file on the origin volume are changed. This means that when another client requests data from that file, any other FlexCache volume that has that data cached will re-request the data after the attribute cache timeout is reached. |
FlexCache Status Values |
|
access denied | The origin system is not allowing FlexCache access. Check the setting of the flexcache.access option on the origin system. |
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 the FlexCache relationship. |
rem vol unavail | The origin volume is offline or has been deleted. |
remote nvram err | The origin system is experiencing problems with its NVRAM. |
unsup remote vol | The origin system is running a version of Data ONTAP that either does not support FlexCache volumes or is not compatible with the version running on the caching system. |
FlexCache Commands |
|
Display | vol statusvol status -v <flexcache_name>vol options <flexcache_name> |
Display free space | df -L |
Adding (Create) | ## Syntaxvol create <flexcache_name> <aggr> [size{k|m|g|t}] -S origin:source_volvol create flexcache1 aggr1 -S netapp1:vol1 |
Removing (destroy) | vol offline < flexcache_name> vol destroy <flexcache_name> |
Automatically resizing | vol options <flexcache_name> flexcache_autogrow [on|off] |
Eject file from cache | flexcache eject <path> [-f] |
Statistics | ## Client stats flexcache stats -C <flexcache_name>flexcache fstat <path> |
FlexClone Volumes
FlexClone Commands |
|
Display | vol statusvol status <flexclone_name> -vdf -Lh |
adding (create) | ## Syntaxvol clone create clone_name [-s {volume|file|none}] -b parent_name [parent_snap]vol clone create flexclone1 -b flexvol1 |
Removing (destroy) | vol offline <flexclone_name> vol destroy <flexclone_name> |
splitting | ## Determine the free space required to perform the split vol clone split estimate <flexclone_name>vol clone split stop <flexclone_name> |
log file | /etc/log/clone
• Cloning operation ID |
Deduplication
Deduplication Commands |
|
start/restart deduplication operation | sis start -s <path>sis start -sp <path> |
stop deduplication operation | sis stop <path> |
schedule deduplication | sis config -s <schedule> <path> Note: schedule lists the days and hours of the day when deduplication runs. The schedule can be of the following forms:
|
enabling | sis on <path> |
disabling | sis off <path> |
status | sis status -l <path> |
Display saved space | df -s <path> |
QTrees
QTree Commands |
|
Display | qtree status [-i] [-v]The -v option includes the owning vFiler unit, if the MultiStore license is enabled. |
adding (create) | ## Syntax - by default wafl.default_qtree_mode option is used qtree create path [-m mode]qtree create /vol/users/news -m 770 |
Remove | rm -Rf <directory> |
Rename | mv <old_name> <new_name> |
convert a directory into a qtree directory | ## Move the directory to a different directory mv /n/joel/vol1/dir1 /n/joel/vol1/olddirrmdir /n/joel/vol1/olddir |
stats | qtree stats [-z] [vol_name]-z = zero stats |
Change the security style | ## Syntax ## Change the security style of /vol/users/docs to mixed |
Quotas
Quota Commands |
|
Quotas configuration file | /mroot/etc/quotas |
Example quota file | ## hard limit | thres |soft limit ##Quota Target type disk files| hold |disk file ##------------- ----- ---- ----- ----- ----- ----<br>* tree@/vol/vol0 - - - - - # monitor usage on all qtrees in vol0<br>/vol/vol2/qtree tree 1024K 75k - - - # enforce qtree quota using kb<br>tinh user@/vol/vol2/qtree1 100M - - - - # enforce users quota in specified qtree<br>dba group@/vol/ora/qtree1 100M - - - - # enforce group quota in specified qtree # * = default user/group/qtree # - = placeholder, no limit enforced, just enable stats collection Note: you have lots of permutations, so checkout the documentation |
Displaying | quota report [<path>] |
Activating | quota on [-w] <vol_name>
|
Deactivitating | quota off [-w] <vol_name> |
Reinitializing | quota off [-w] <vol_name> quota on [-w] <vol_name> |
Resizing | quota resize <vol_name>Note: this commands rereads the quota file |
Deleting | edit the quota filequota resize <vol_name> |
log messaging | quota logmsg |
LUNs, igroups and LUN mapping
LUN configuration |
|
Display | lun show lun show -mlun show -v |
Initialize/Configure LUNs, mapping | lun setup Note: follow the prompts to create and configure LUN's |
Create | lun create -s 100m -t windows /vol/tradvol1/lun1 |
Destroy | lun destroy [-f] /vol/tradvol1/lun1 Note: the "-f" will force the destroy |
Resize | lun resize <lun path> <size> lun resize /vol/tradvol1/lun1 75m |
Restart block protocol access | lun online /vol/tradvol1/lun1 |
Stop block protocol access |
lun offline /vol/tradvol1/lun1 |
Map a LUN to an initiator group | lun map /vol/tradvol1/lun1 win_hosts_group1 0 lun map -f /vol/tradvol1/lun2 linux_host_group1 1lun show -m Note: use "-f" to force the mapping |
Remove LUN mapping | lun show -m lun offline /vol/tradvol1lun unmap /vol/tradvol1/lun1 win_hosts_group1 0 |
Displays or zeros read/write statistics for LUN | lun stats /vol/tradvol1/lun1 |
Comments | lun comment /vol/tradvol1/lun1 "10GB for payroll records" |
Check all lun/igroup/fcp settings for correctness | lun config_check -v |
Manage LUN cloning | # Create a Snapshot copy of the volume containing the LUN to be cloned by entering the following command # Create the LUN clone by entering the following command |
Show the maximum possible size of a LUN on a given volume or qtree | lun maxsize /vol/tradvol1 |
Move (rename) LUN | lun move /vol/tradvol1/lun1 /vol/tradvol1/windows_lun1 |
Display/change LUN serial number | lun serial -x /vol/tradvol1/lun1 |
Manage LUN properties | lun set reservation /vol/tradvol1/hpux/lun0 |
Configure NAS file-sharing properties | lun share <lun_path> { none | read | write | all } |
Manage LUN and snapshot interactions | lun snap usage -s <volume> <snapshot> |
igroup configuration |
|
display | igroup showigroup show -vigroup show iqn.1991-05.com.microsoft:xblade |
create (iSCSI) | igroup create -i -t windows win_hosts_group1 iqn.1991-05.com.microsoft:xblade |
create (FC) | igroup create -i -f windows win_hosts_group1 iqn.1991-05.com.microsoft:xblade |
destroy | igroup destroy win_hosts_group1 |
add initiators to an igroup | igroup add win_hosts_group1 iqn.1991-05.com.microsoft:laptop |
remove initiators to an igroup | igroup remove win_hosts_group1 iqn.1991-05.com.microsoft:laptop |
rename | igroup rename win_hosts_group1 win_hosts_group2 |
set O/S type | igroup set win_hosts_group1 ostype windows |
Enabling ALUA | igroup set win_hosts_group1 alua yes Note: ALUA defines a standard set of SCSI commands for discovering and managing multiple paths to LUNs on Fibre Channel and iSCSI SANs. ALUA enables the initiator to query the target about path attributes, such as primary path and secondary path. It also enables the target to communicate events back to the initiator. As long as the host supports the ALUA standard, multipathing software can be developed to support any array. Proprietary SCSI commands are no longer required. |
iSCSI commands |
|
display | iscsi initiator showiscsi session show [-t]iscsi security show |
status | iscsi status |
start | iscsi start |
stop | iscsi stop |
stats | iscsi stats |
nodename | iscsi nodename iscsi nodename <new name> |
interfaces | iscsi interface showiscsi interface disable e0b |
portals | iscsi portal showNote: Use the iscsi portal show command to display the target IP addresses of the storage system. The storage system's target IP addresses are the addresses of the interfaces used for the iSCSI protocol |
accesslists | iscsi interface accesslist showNote: you can add or remove interfaces from the list |
Port Sets |
|
display | portset show igroup show linux-igroup1 |
create | portset create -f portset1 SystemA:4b |
destroy | igroup unbind linux-igroup1 portset1 portset destroy portset1 |
add | portset add portset1 SystemB:4b |
remove | portset remove portset1 SystemB:4b |
binding | igroup bind linux-igroup1 portset1 igroup unbind linux-igroup1 portset1 |
FCP service |
|
display | fcp show adapter -v |
daemon status | fcp status |
start | fcp start |
stop | fcp stop |
stats | fcp stats -i interval [-c count] [-a | adapter] fcp stats -i 1 |
target expansion adapters | fcp config <adapter> [down|up]fcp config 4a down |
target adapter speed | fcp config <adapter> speed [auto|1|2|4|8] fcp config 4a speed 8 |
set WWPN # | fcp portname set [-f] adapter wwpn fcp portname set -f 1b 50:0a:09:85:87:09:68:ad |
swap WWPN # | fcp portname swap [-f] adapter1 adapter2 fcp portname swap -f 1a 1b |
change WWNN | # display nodename fcp nodenamefcp nodename [-f]nodename fcp nodename 50:0a:09:80:82:02:8d:ff Note: The WWNN of a storage system is generated by a serial number in its NVRAM, but it is stored ondisk. If you ever replace a storage system chassis and reuse it in the same Fibre Channel SAN, it is possible, although extremely rare, that the WWNN of the replaced storage system is duplicated. In this unlikely event, you can change the WWNN of the storage system. |
WWPN Aliases - display | fcp wwpn-alias show fcp wwpn-alias show -a my_alias_1fcp wwpn-alias show -w 10:00:00:00:c9:30:80:2 |
WWPN Aliases - create | fcp wwpn-alias set [-f] alias wwpnfcp wwpn-alias set my_alias_1 10:00:00:00:c9:30:80:2f |
WWPN Aliases - remove | fcp wwpn-alias remove [-a alias ... | -w wwpn] fcp wwpn-alias remove -a my_alias_1 |
Snapshotting and Cloning
Snapshot and Cloning commands |
|
Display clones | snap list |
create clone | # Create a LUN by entering the following command # Create a Snapshot copy of the volume containing the LUN to be cloned by entering the following command # Create the LUN clone by entering the following command |
destroy clone | # display the snapshot copies # Delete all the LUNs in the active file system that are displayed by the lun snap usage command by entering the following command # Delete all the Snapshot copies that are displayed by the lun snap usage command in the order they appear |
clone dependency | vol options <vol_name> <snapshot_clone_dependency> on Note: Prior to Data ONTAP 7.3, the system automatically locked all backing Snapshot copies when Snapshot copies of LUN clones were taken. Starting with Data ONTAP 7.3, you can enable the system to only lock backing Snapshot copies for the active LUN clone. If you do this, when you delete the active LUN clone, you can delete the base Snapshot copy without having to first delete all of the more recent backing Snapshot copies. |
Restoring snapshot | snap restore -s payroll_lun_backup.2 -t vol /vol/payroll_lun |
splitting the clone | lun clone split start lun_pathlun clone split status lun_path |
stop clone splitting | lun clone split stop lun_path |
delete snapshot copy | snap delete vol-name snapshot-namesnap delete -a -f <vol-name> |
disk space usage | lun snap usage tradvol1 mysnap |
Use Volume copy to copy LUN's | vol copy start -S source:source_volume dest:dest_volumevol copy start -S /vol/vol0 filerB:/vol/vol1 |
The estimated rate of change of data between Snapshot copies in a volume |
snap delta /vol/tradvol1 tradvol1_snapshot_08122010 |
The estimated amount of space freed if you delete the specified Snapshot copies |
snap reclaimable /vol/tradvol1 tradvol1_snapshot_08122010 |
File Access using NFS
Export Options |
|||||||||||
actual=<path> | Specifies the actual file system path corresponding to the exported file system path. | ||||||||||
anon=<uid>|<name> | Specifies the effective user ID (or name) of all anonymous or root NFS client users that access the file system path. | ||||||||||
nosuid | Disables setuid and setgid executables and mknod commands on the file system path. | ||||||||||
ro | ro=clientid | Specifies which NFS clients have read-only access to the file system path. | ||||||||||
rw | rw=clientid | Specifies which NFS clients have read-write access to the file system path. | ||||||||||
root=clientid | Specifies which NFS clients have root access to the file system path. If you specify the root= option, you must specify at least one NFS client identifier. To exclude NFS clients from the list, prepend the NFS client identifiers with a minus sign (-). | ||||||||||
sec=sectype | Specifies the security types that an NFS client must support to access the file system path. To apply the security types to all types of access, specify the sec= option once. To apply the security types to specific types of access (anonymous, non-super user, read-only, read-write, or root), specify the sec= option at least twice, once before each access type to which it applies (anon, nosuid, ro, rw, or root, respectively). security types could be one of the following:
|
||||||||||
Examples | rw=10.45.67.0/24 ro,root=@trusted,rw=@friendlyrw,root=192.168.0.80,nosuid |
||||||||||
Export Commands |
|||||||||||
Displaying | exportfs |
||||||||||
create | # create export in memory and write to /etc/exports (use default options) # create export in memory and write to /etc/exports (use specific options) |
||||||||||
remove | # Memory onlyexportfs -u <path>exportfs -z <path> |
||||||||||
export all | exportfs -a | ||||||||||
check access | exportfs -c 192.168.0.80 /vol/nfs1 | ||||||||||
flush | exportfs -f exportfs -f <path> |
||||||||||
reload | exportfs -r | ||||||||||
storage path | exportfs -s <path> | ||||||||||
Write export to a file | exportfs -w <path/export_file> | ||||||||||
fencing | # Suppose /vol/vol0 is exported with the following export options: -rw=pig:horse:dog,ro=cat:duck,anon=0 |
||||||||||
stats | nfsstat |
File Access using CIFS
Useful CIFS options |
|
change the security style | options wafl.default_security_style {ntfs | unix | mixed} |
timeout | options cifs.idle_timeout time |
Performance | options cifs.oplocks.enable onNote: Under some circumstances, if a process has an exclusive oplock on a file and a second process attempts to open the file, the first process must invalidate cached data and flush writes and locks. The client must then relinquish the oplock and access to the file. If there is a network failure during this flush, cached write data might be lost. |
CIFS Commands |
|
useful files | /etc/cifsconfig_setup.cfg
/etc/usermap.cfs
/etc/passwd
/etc/cifsconfig_share.cfg
Note: use "rdfile" to read the file |
CIFS setup | cifs setupNote: you will be prompted to answer a number of questions based on what requirements you need. |
start | cifs restart |
stop | cifs terminatecifs terminate <client_name>|<IP Address> |
sessions | cifs sessionscifs sessions <user>cifs session -s |
Broadcast message | cifs broadcast * "message" cifs broadcast <client_name> "message" |
permissions | cifs access <share> <user|group> <permission> cifs access -delete releases ENGINEERING\mary Note: rights can be Unix-style combinations of r w x - or NT-style "No Access", "Read", "Change", and "Full Control" |
stats | cifs stat <interval> cifs stat <user>cifs stat <IP Address> |
create a share | # create a volume in the normal way # then using qtrees set the style of the volume {ntfs | unix | mixed} # Now you can create your share |
change share characteristics | cifs shares -change sharename {-browse | -nobrowse} {-comment desc | - nocomment} {-maxusers userlimit | -nomaxusers} {-forcegroup groupname | -noforcegroup} {-widelink | -nowidelink} {-symlink_strict_security | - nosymlink_strict_security} {-vscan | -novscan} {-vscanread | - novscanread} {-umask mask | -noumask {-no_caching | -manual_caching | - auto_document_caching | -auto_program_caching}cifs shares -change <sharename> -novscan |
home directories | # Display home directoriescifs homedirNote: make sure the directory exists |
domain controller | # add a domain controller # delete a domain controller # List the preferred controllers |
change filers domain password | cifs changefilerpwd |
Tracing permission problems | sectrace add [-ip ip_address] [-ntuser nt_username] [-unixuser unix_username] [-path path_prefix] [-a] #Examples # To remove |
File Access using FTP
Useful Options |
|
Enable | options ftpd.enable on |
Disable | options ftpd.enable off |
File Locking | options ftpd.locking deleteoptions ftpd.locking noneNote: To prevent users from modifying files while the FTP server is transferring them, you can enable FTP file locking. Otherwise, you can disable FTP file locking. By default, FTP file locking is disabled. |
Authenication Style | options ftpd.auth_style {unix | ntlm | mixed} |
bypassing of FTP traverse checking | options ftpd.bypass_traverse_checking on options ftpd.bypass_traverse_checking offNote: If the ftpd.bypass_traverse_checking option is set to off, when a user attempts to access a file using FTP, Data ONTAP checks the traverse (execute) permission for all directories in the path to the file. If any of the intermediate directories does not have the "X" (traverse permission), Data ONTAP denies access to the file. If the ftpd.bypass_traverse_checking option is set to on, when a user attempts to access a file, Data ONTAP does not check the traverse permission for the intermediate directories when determining whether to grant or deny access to the file. |
Restricting FTP users to a specific directory | options ftpd.dir.restriction on |
Restricting FTP users to their home directories or a default directory | options ftpd.dir.override "" |
Maximum number of connections | options ftpd.max_connections n options ftpd.max_connections_threshold n |
idle timeout value | options ftpd.idle_timeout n s | m | h |
anonymous logins | options ftpd.anonymous.enable onoptions ftpd.anonymous.enable offoptions ftpd.anonymous.home_dir homedir |
FTP Commands |
|
Log files | /etc/log/ftp.cmd/etc/log/ftp.xferNote: use rdfile to view |
Restricting access | /etc/ftpusersNote: using rdfile and wrfile to access /etc/ftpusers |
stats | ftp statftp stat -z |
File Access using HTTP
HTTP Options |
|
enable | options httpd.enable on |
disable | options httpd.enable off |
Enabling or disabling the bypassing of HTTP traverse checking | options httpd.bypass_traverse_checking onoptions httpd.bypass_traverse_checking offNote: this is similar to the FTP version |
root directory | options httpd.rootdir /vol0/home/users/pages |
Host access | options httpd.access host=Host1 AND if=e3 options httpd.admin.access host!=Host1 |
HTTP Commands |
|
Log files | /etc/log/httpd.logNote: use rdfile to view |
redirects | redirect /cgi-bin/* http://cgi-host/* |
pass rule | pass /image-bin/* |
fail rule | fail /usr/forbidden/* |
mime types | /etc/httpd.mimetypesNote: use rdfile and wrfile to edit |
interface firewall | ifconfig f0 untrusted |
stats | httpstat [-dersta]httpstat -z[derta] |
Network Interfaces
Display | ifconfig -a ifconfig <interface> |
IP address | ifconfig e0 <IP Address> ifconfig e0a <IP Address>ifconfig e3 0 |
subnet mask | ifconfig e0a netmask <subnet mask address> |
broadcast | ifconfig e0a broadcast <broadcast address> |
media type | ifconfig e0a mediatype 100tx-fd |
maximum transmission unit (MTU) | ifconfig e8 mtusize 9000 |
Flow control | ifconfig <interface_name> <flowcontrol> <value> ifconfig e8 flowcontrol none Note: value is the flow control type. You can specify the following values for the flowcontrol option: |
trusted | ifconfig e8 untrustedNote: You can specify whether a network interface is trustworthy or untrustworthy. When you specify an interface as untrusted (untrustworthy), any packets received on the interface are likely to be dropped. |
HA Pair | ifconfig e8 partner <IP Address> ifconfig interface_name {nfo|-nfo} nfo — Enables negotiated failover Note: In an HA pair, you can assign a partner IP address to a network interface. The network interface takes over this IP address when a failover occurs |
Alias | # Create aliasifconfig e0 alias 192.0.2.30ifconfig e0 -alias 192.0.2.30 |
Block/Unblock protocols | # Block options interface.blocked.cifs e9options interface.blocked.cifs "" |
Stats | ifstatnetstatNote: there are many options to both these commands so I will leave to the man pages |
bring up/down an interface | ifconfig <interface> up ifconfig <interface> down |
Routing
default route | # using wrfile and rdfile edit the /etc/rc file with the belowroute add default 192.168.0.254 1routed on |
enable/disable fast path | options ip.fastpath.enable {on|off}off — Disables fast path |
enable/disable routing daemon | routed {on|off}off — Turns off the routed daemon |
Display routing table | netstat -rnroute -srouted status |
Add to routing table |
route add 192.168.0.15 gateway.com 1 |
Hosts and DNS
Hosts | # use wrfile and rdfile to read and edit /etc/hosts file , it basically use the sdame rules as a Unix |
nsswitch file | # use wrfile and rdfile to read and edit /etc/nsswitch.conf file , it basically uses the same rules as a |
DNS | # use wrfile and rdfile to read and edit /etc/resolv.conf file , it basically uses the same rules as a# Unix resolv.conf fileoff — Disables DNS |
Domain Name | options dns.domainname <domain> |
DNS cache | options dns.cache.enableoptions dns.cache.disabledns info |
DNS updates | options dns.update.enable {on|off|secure} Note: |
time-to-live (TTL) | options dns.update.ttl <time> # Example |
VLAN
Create | vlan create [-g {on|off}] ifname vlanid vlan create e4 10 20 30 # Configure the VLAN interface e4-10 by using the following command |
Add | vlan add e4 40 50 |
Delete | # Delete specific VLAN vlan delete e4 30vlan delete e4 |
Enable/Disable GRVP on VLAN | vlan modify -g {on|off} ifname |
Stat | vlan stat <interface_name> <vlan_id>vlan stat e4 10 |
Interface Groups
Create (single-mode) | # To create a single-mode interface group, enter the following command: # To configure an IP address of 192.168.0.10 and a netmask of 255.255.255.0 on the singlemode interface group SingleTrunk1 # To specify the interface e1 as preferred |
Create ( multi-mode) | # To create a static multimode interface group, comprising interfaces e0, e1, e2, and e3 and using MAC # address load balancingifgrp create multi MultiTrunk1 -b mac e0 e1 e2 e3 # To create a dynamic multimode interface group, comprising interfaces e0, e1, e2, and e3 and using IP |
Create second level intreface group | # To create two interface groups and a second-level interface group. In this example, IP address load # balancing is used for the multimode interface groups.ifgrp create single Secondlev Firstlev1 Firstlev2 # To enable failover to a multimode interface group with higher aggregate bandwidth when one or more of Note: You can create a second-level interface group by using two multimode interface groups. Secondlevel interface groups enable you to provide a standby multimode interface group in case the primary multimode interface group fails. |
Create second level intreface group in a HA pair | # Use the following commands to create a second-level interface group in an HA pair. In this example, # IP-based load balancing is used for the multimode interface groups.ifconfig Secondlev2 partner Secondlev1 |
Favoured/non-favoured interface | # select favoured interface # select a non-favoured interface |
Add | ifgrp add MultiTrunk1 e4 |
Delete | ifconfig MultiTrunk1 downifgrp delete MultiTrunk1 e4from the interface group |
Destroy | ifconfig ifgrp_name down Note: You must configure the interface group to the down state before you can delete a network interface |
Enable/disable a interface group | ifconfig ifgrp_name up ifconfig ifgrp_name down |
Status | ifgrp status [ifgrp_name] |
Stat | ifgrp stat [ifgrp_name] [interval] |
Diagnostic Tools
Useful options |
|
Ping thottling | # Throttle ping options ip.ping_throttle.drop_level <packets_per_second>options ip.ping_throttle.drop_level 0 |
Forged IMCP attacks | options ip.icmp_ignore_redirect.enable onNote: You can disable ICMP redirect messages to protect your storage system against forged ICMP redirect attacks. |
Useful Commands |
|
netdiag | The netdiag command continuously gathers and analyzes statistics, and performs diagnostic tests. These diagnostic tests identify and report problems with your physical network or transport layers and suggest remedial action. |
ping | You can use the ping command to test whether your storage system can reach other hosts on your network. |
pktt | You can use the pktt command to trace the packets sent and received in the storage system's network. |