NetApp ONTAP Commands

NetApp ONTAP CLI commands for storage management.

Node Startup Procedure

Step 1: Power on node

Power on the NetApp storage controller

Step 2: Wait for boot

Wait 5-10 minutes for ONTAP to fully boot

Step 3: Verify cluster

Check cluster and node status

cluster show

Display cluster status

system node show

Display cluster nodes

Step 4: Check aggregates

Verify storage aggregates are online

storage aggregate show

Display storage aggregates

Step 5: Check volumes

Verify volumes are online

volume show -state offline

Show any offline volumes

system health status show

Display system health

Node Shutdown Procedure

Step 1: Check HA status

Verify HA partner can take over

storage failover show

Display failover status

Step 2: Takeover (if HA)

Initiate HA takeover if clustered

storage failover takeover -ofnode <node>

Initiate takeover of partner node

Step 3: Halt node

Halt the storage controller

system node halt -node <nodename>

Halt specified node

system node halt -node <nodename> -skip-lif-migration-before-shutdown true

Halt without LIF migration

Step 4: Giveback (after maintenance)

Return resources after maintenance

storage failover giveback -ofnode <node>

Giveback resources to partner

system node reboot -node <nodename>

Reboot specified node

System Information

version

Display ONTAP version and system info

system node show

Display cluster nodes

system node show -instance

Display detailed node information

cluster show

Display cluster status

storage aggregate show

Display storage aggregates

storage disk show

Display all disks

storage shelf show

Display disk shelves

system health status show

Display system health

event log show

Display event logs

Volume Management

volume show

Display all volumes

volume create -vserver <svm> -volume <name> -aggregate <aggr> -size <size>

Create new volume

volume delete -vserver <svm> -volume <name>

Delete volume

volume modify -vserver <svm> -volume <name> -size <newsize>

Resize volume

volume online -vserver <svm> -volume <name>

Bring volume online

volume offline -vserver <svm> -volume <name>

Take volume offline

volume mount -vserver <svm> -volume <name> -junction-path <path>

Mount volume

volume unmount -vserver <svm> -volume <name>

Unmount volume

volume snapshot create -vserver <svm> -volume <vol> -snapshot <name>

Create snapshot

volume snapshot restore -vserver <svm> -volume <vol> -snapshot <name>

Restore from snapshot

volume snapshot delete -vserver <svm> -volume <vol> -snapshot <name>

Delete snapshot

Storage Virtual Machine (SVM)

vserver show

Display all SVMs

vserver create -vserver <name> -rootvolume <vol> -aggregate <aggr>

Create SVM

vserver delete -vserver <name>

Delete SVM

vserver modify -vserver <name> -comment <text>

Modify SVM settings

vserver start -vserver <name>

Start SVM

vserver stop -vserver <name>

Stop SVM

Network Configuration

network interface show

Display network interfaces (LIFs)

network interface create -vserver <svm> -lif <name> -address <ip> -netmask <mask>

Create network interface

network interface modify -vserver <svm> -lif <name> -address <newip>

Modify interface IP

network interface delete -vserver <svm> -lif <name>

Delete network interface

network port show

Display physical network ports

network port ifgrp create -node <node> -ifgrp <name> -distr-func <method>

Create interface group (LAG)

network port vlan create -node <node> -vlan-name <port>-<id>

Create VLAN interface

network route show

Display routing table

network route create -vserver <svm> -destination <network> -gateway <ip>

Add static route

NFS Configuration

nfs show

Display NFS configuration

nfs create -vserver <svm>

Enable NFS on SVM

nfs modify -vserver <svm> -v3 enabled -v4.0 enabled

Enable NFSv3 and v4

export-policy show

Display export policies

export-policy create -vserver <svm> -policyname <name>

Create export policy

export-policy rule create -vserver <svm> -policyname <policy> -clientmatch <ip>

Add export rule

volume modify -vserver <svm> -volume <vol> -policy <policy>

Apply export policy to volume

nfs status -vserver <svm>

Check NFS service status

CIFS/SMB Configuration

cifs show

Display CIFS configuration

cifs create -vserver <svm> -cifs-server <name> -domain <domain>

Create CIFS server and join domain

cifs share show

Display CIFS shares

cifs share create -vserver <svm> -share-name <name> -path <path>

Create CIFS share

cifs share delete -vserver <svm> -share-name <name>

Delete CIFS share

cifs share access-control create -vserver <svm> -share <name> -user-or-group <user> -permission <perm>

Set share permissions

cifs options modify -vserver <svm> -is-signing-required true

Enable SMB signing

cifs session show

Display active CIFS sessions

iSCSI & SAN

iscsi show

Display iSCSI configuration

iscsi create -vserver <svm>

Enable iSCSI on SVM

lun show

Display all LUNs

lun create -vserver <svm> -volume <vol> -lun <name> -size <size> -ostype <os>

Create LUN

lun delete -vserver <svm> -volume <vol> -lun <name>

Delete LUN

lun online -vserver <svm> -volume <vol> -lun <name>

Bring LUN online

lun offline -vserver <svm> -volume <vol> -lun <name>

Take LUN offline

lun mapping show

Display LUN mappings

lun mapping create -vserver <svm> -volume <vol> -lun <lun> -igroup <igroup>

Map LUN to igroup

igroup show

Display initiator groups

igroup create -vserver <svm> -igroup <name> -protocol <iscsi|fcp> -ostype <os>

Create igroup

igroup add -vserver <svm> -igroup <name> -initiator <iqn>

Add initiator to igroup

Aggregate Management

storage aggregate show

Display all aggregates

storage aggregate create -aggregate <name> -diskcount <num> -node <node>

Create aggregate

storage aggregate delete -aggregate <name>

Delete aggregate

storage aggregate add-disks -aggregate <name> -diskcount <num>

Add disks to aggregate

storage aggregate online -aggregate <name>

Bring aggregate online

storage aggregate offline -aggregate <name>

Take aggregate offline

storage aggregate show-space

Display aggregate space usage

SnapMirror & Replication

snapmirror show

Display SnapMirror relationships

snapmirror create -source-path <src> -destination-path <dst> -type <type>

Create SnapMirror relationship

snapmirror initialize -destination-path <dst>

Initialize SnapMirror

snapmirror update -destination-path <dst>

Manual SnapMirror update

snapmirror resync -destination-path <dst>

Resync SnapMirror

snapmirror break -destination-path <dst>

Break SnapMirror relationship

snapmirror delete -destination-path <dst>

Delete SnapMirror relationship

snapmirror policy show

Display SnapMirror policies

Performance & Monitoring

statistics show -object workload

Display workload statistics

statistics show -object volume

Display volume statistics

statistics show -object lun

Display LUN statistics

storage aggregate show-space -fields physical-used,physical-used-percent

Show aggregate utilization

node run -node <node> sysstat -x 1

Real-time system statistics

qos statistics show

Display QoS statistics

statistics top show

Display top resource consumers

User & Security

security login show

Display user accounts

security login create -user-or-group-name <user> -application <app> -role <role>

Create user account

security login password -username <user>

Change user password

security login delete -user-or-group-name <user>

Delete user account

security certificate show

Display SSL certificates

security ssh show

Display SSH configuration

security protocol ssh modify -vserver <svm> -ciphers <list>

Configure SSH ciphers

Advanced & Troubleshooting

system node run -node <node> -command <cmd>

Run nodeshell command

set diag

Switch to diagnostic privilege level

set admin

Switch to admin privilege level

storage failover show

Display HA failover status

storage failover giveback -ofnode <node>

Giveback storage to partner node

system controller replace show

Display controller replacement status

system service-processor show

Display SP/BMC information

autosupport invoke -node <node> -type all

Send AutoSupport message

debug vserver cifs show -open-files

Show open CIFS files