NetApp Clustered ONTAP CLI Cheat Sheet

Thumb

NetApp Clustered ONTAP CLI Cheat Sheet

NetApp is popular for its cloud data storage and data management systems. As a Fortune 500 company since 2012, it has remained an important leader in cloud computing and storage devices. In 2020, NetApp was the leader in cost optimization and compute management in public clouds. ONTAP helps you manage clusters through commands, such as the ones found below. Common storage tasks like qtrees and volumes are discussed as well.

However, these commands are found in many places across the web, and this cheat sheet only has some of the many NetApp commands. To learn about NetApp, our NetApp courses at QuickStart will guide you through every detail to ensure full competency. If you would like full access to over 900 self-paced IT certification training and courses, start your free trial with QuickStart today!

Boot Menu

1) Normal Boot.

2) Boot without /etc/rc.

3) Change password.

4) Clean configuration and initialize all disks.

5) Maintenance mode boot.

6) Update flash from backup config.

7) Install new software first.

8) Reboot node.

Selection (1-8)?

•  Normal Boot - continue with the normal boot operation

•  Boot without /etc/rc - boot with only default options and disable some services

•  Change Password - change the storage systems password

•  Clean configuration and initialize all disks - cleans all disks and reset the filer to factory default settings

•  Maintenance mode boot - file system operations are disabled with limited set of commands

•  Update flash from backup config - restore the configuration information if corrupted on the boot device

•  Install new software first - use this if the filer does not include support for the storage array

•  Reboot node - restart the filer

startup modes

•  boot_ontap - boots the current Data ONTAP software release stored on the boot device

•  boot primary - boots the Data ONTAP release stored on the boot device as the primary kernel

•  boot_backup - boots the backup Data ONTAP release from the boot device

•  boot_diags - boots a Data ONTAP diagnostic kernel

 

shutdown

halt [-t <mins>] [-f]

-t = shutdown after minutes specified

-f = used with HA clustering, means that the partner filer does not take over

restart

reboot [-t <mins>] [-s] [-r] [-f]

 

-t = reboot in specified minutes

-s = clean reboot but also power cycle the filer (like pushing the off button)

-r = bypasses the shutdown (not clean) and power cycles the filer

-f = used with HA clustering and 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

 

-q = quiet suppresses warning messages

Access the systemshell

## First obtain the advanced privileges

priv set advanced

 

## Then unlock and reset the diag users password

useradmin diaguser unlock

useradmin diaguser password

 

## Now you should be able to access the systemshell and use all the standard Unix

## commands

systemshell

login: diag

password: ********

Licensing and Version

licenses (commandline)

## display licenses

license

 

## Adding a license

license add <code1> <code2>

## Disabling a license

license delete <service>

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>

 

# Examples

wrfile -a /etc/test1 This is line 6 # comment here

wrfile -a /etc/test1 "This is line \"15\"."

System Configuration

General information

sysconfig

sysconfig -v

sysconfig -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-sensors

environment chassis Fans

environment chassis CPU_Fans

environment chassis Power

environment chassis Temperature

environment chassis [PS1|PS2]

Fibre Channel Information

Fibre Channel stats

fcstat link_status

fcstat fcal_stat

fcstat device_map

SAS Adapter and Expander Information

Shelf information

sasstat shelf

sasstat shelf_short

Expander information

sasstat expander

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

Display

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

storage show shelf

storage show switch

storage show tape [supported]

storage show acp

 

storage array show

storage array show-ports

storage array show-luns

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 -h

storage power_cycle shelf start -c <channel name>

storage power_cycle shelf completed

 

Aggregates

Aggregate States

Online

Read and write access to volumes is allowed

Restricted

Some operations, like 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 containing FlexVol volumes

copying

This aggregate is currently the target aggregate of an active copy operation

degraded

This aggregate contains at least one RAID group with single disk failure that is not being reconstructed

double degraded

This aggregate 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. Usually, this happens only after an aborted "aggr copy" operation

ironing

A WAFL consistency check is being performed 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 aggregate consists of RAID 0 (no parity) RAID groups

raid4

The aggregate consists of RAID 4 RAID groups

raid_dp

The aggregate 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 as corrupted; contact technical support

Aggregate Commands

Displaying

aggr status

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_size] [-T disk_type] [-R 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 aggregated called newfastaggr using 20 x 15000rpm disks

aggr create newfastaggr -R 15000 20

 

## 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 belong to different disk 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

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>

 

## add an additonal disk to aggregate pfvAggr, use "aggr status" to get group name

aggr status pfvAggr -r

aggr add pfvAggr -g rg0 -d v5.25

 

## Add 4 300GB disk to aggregate aggr1

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>

 

## change a aggregates raid group

aggr options <aggregate> raidtype raid_dp

 

## change a aggregates raid size

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 status

aggr copy status

 

## Start a copy

aggr copy start <aggregate source> <aggregate destination>

 

## Abort a copy - obtain the operation number by using "aggr copy status"

aggr copy abort <operation number>

 

## Throttle the copy 10=full speed, 1=one-tenth full speed

aggr copy throttle <operation number> <throttle speed>

Scrubbing (parity)

## Media scrub status

aggr media_scrub status

aggr scrub status

 

## start a scrub operation

aggr scrub start [ aggrname | plexname | groupname ]

 

## stop a scrub operation

aggr scrub stop [ aggrname | plexname | groupname ]

 

## suspend a scrub operation

aggr scrub suspend [ aggrname | plexname | groupname ]

 

## resume a scrub operation

aggr scrub resume [ aggrname | plexname | groupname ]

Note: Starts parity scrubbing on the named online aggregate. Parity scrubbing compares the data disks to the

parity disk(s) in their RAID group, correcting the parity disk’s contents as necessary. If no name is

given, parity scrubbing is started on all online aggregates. If an aggregate name is given, scrubbing is

started on all RAID groups contained in the aggregate. If a plex name is given, scrubbing is started on

all RAID groups contained in the plex.

Look at the following system options:

raid.scrub.duration 360

raid.scrub.enable on

raid.scrub.perf_impact low

raid.scrub.schedule

Verify (mirroring)

## verify status

aggr verify status

 

## start a verify operation

aggr verify start [ aggrname ]

 

## stop a verify operation

aggr verify stop [ aggrname ]

 

## suspend a verify operation

aggr verify suspend [ aggrname ]

 

## resume a verify operation

aggr verify resume [ aggrname ]

Note: Starts RAID mirror verification on the named online mirrored aggregate. If no name is given, then

RAID mirror verification is started on all online mirrored aggregates. Verification compares the data in

both plexes of a mirrored aggregate. In the default case, all blocks that differ are logged, but no changes

are made.

Media Scrub

aggr media_scrub status

 

Note: Prints the media scrubbing status of the named aggregate, plex or group. If no name is given, then

status is printed for all RAID groups currently running a media scrub. The status includes a

percent-complete and whether it is suspended.

Look at the following system options:

 

raid.media_scrub.enable on

raid.media_scrub.rate 600

raid.media_scrub.spares.enable on

 

Enroll in Our NetApp Training

QuickStart is an authorized learning partner with NetApp and offers NetApp certification training and various other self-paced and on-demand live virtual instructor led NetApp courses.

Get Started

 

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 -v (verbose)

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:

Mirrors the currently-unmirrored traditional volume volname, either with the specified set of disks or with the contents of another unmirrored traditional volume victim_volname, which will be destroyed in the process.

 

The vol mirror command fails if either the chosen volname or victim_volname are flexible volumes. Flexible volumes require that any operations having directly to do with their containing aggregates be handled via the new aggr command suite.

Change language

vol lang <vol_name> <language>

Change maximum number of files

## Display maximum number of files

maxfiles <vol_name>

 

## Change maximum number of files

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]

 

Note: Prints the media scrubbing status of the named aggregate, volume, plex, or group. If no name is given, then

status is printed for all RAID groups currently running a media scrub. The status includes a

percent-complete and whether it is suspended.

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)

Adding (creating)

## Syntax

vol create vol_name [-l language_code] [-s {volume|file|none}] <aggr_name> size{k|m|g|t}

## Create a 200MB volume using the english character set

vol create newvol -l en aggr1 200M

 

## Create 50GB flexvol volume

vol create vol1 aggr0 50g

additional disks

## add an additional disk to aggregate flexvol1, use "aggr status" to get group name

aggr status flexvol1 -r

aggr add flexvol1 -g rg0 -d v5.25

Resizing

vol size <vol_name> [+|-] n{k|m|g|t}

 

## Increase flexvol1 volume by 100MB

vol size flexvol1 + 100m

Automatically resizing

vol autosize vol_name [-m size {k|m|g|t}] [-I size {k|m|g|t}] on

 

## automatically grow by 10MB increaments to max of 500MB

vol 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:

If you specify volume_grow, Data ONTAP attempts to increase the volume's size before deleting any Snapshot copies. Data ONTAP increases the volume size based on specifications you provided using the vol autosize command.

 

If you specify snap_delete, Data ONTAP attempts to create more free space by deleting Snapshot copies, before increasing the size of the volume. Data ONTAP deletes Snapshot copies based on the specifications you provided using the snap autodelete command.

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 start

vol clone split stop

vol clone split estimate

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 status

 

vol copy abort <operation number>

vol 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.

vol copy start -s nightly.1 vol0 toaster1:vol0

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.

 

The source and destination volumes must either both be traditional volumes or both be flexible volumes. The vol 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 the source or destination volume is on a filer other than the one on which the vol copy start command was entered, specify 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}] [-r raidsize] [-T disk-type] -R rpm] [-L] disk-list

 

## create traditional volume using aggr command

aggr create tradvol1 -l en -t raid4 -d v5.26 v5.27

 

## create traditional volume using vol command

vol create tradvol1 -l en -t raid4 -d v5.26 v5.27

 

## Create traditional volume using 20 disks, each RAID group can have 10 disks

vol create vol1 -r 10 20

additional disks

vol add volname[-f][-n][-g <raidgroup>]{ ndisks[@size]|-d <disk_list> }

 

## add another disk to the already existing traditional volume

vol add tradvol1 -d v5.28

splitting

aggr split <volname/plexname> <new_volname>

Scrubing (parity)

## The more new "aggr scrub " command is preferred

 

vol scrub status [volname|plexname|groupname][-v]

 

vol scrub start [volname|plexname|groupname][-v]

vol scrub stop [volname|plexname|groupname][-v]

 

vol scrub suspend [volname|plexname|groupname][-v]

vol scrub resume [volname|plexname|groupname][-v]

 

Note: Print the status of parity scrubbing on the named traditional volume, plex or RAID group. If no name is provided, the status is given on all RAID groups currently undergoing parity scrubbing. The status includes a percent-complete as well as the scrub’s suspended status (if any).

Verify (mirroring)

## The more new "aggr verify" command is preferred

 

## verify status

vol verify status

 

## start a verify operation

vol verify start [ aggrname ]

 

## stop a verify operation

vol verify stop [ aggrname ]

 

## suspend a verify operation

vol verify suspend [ aggrname ]

 

## resume a verify operation

vol verify resume [ aggrname ]

Note: Starts RAID mirror verification on the named online mirrored aggregate. If no name is given, then

RAID mirror verification is started on all online mirrored aggregates. Verification compares the data in

both plexes of a mirrored aggregate. In the default case, all blocks that differ are logged, but no changes

are made.

 

FlexClone Volumes

FlexClone Commands

Display

vol status

vol status <flexclone_name> -v

 

df -Lh

adding (create)

## Syntax

vol clone create clone_name [-s {volume|file|none}] -b parent_name [parent_snap]

 

## create a flexclone called flexclone1 from the parent flexvol1

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>

 

## Double check you have the space

df -Ah

 

## Perform the split

vol clone split start <flexclone_name>

 

## Check up on its status

vol colne split status <flexclone_name>

 

## Stop the split

vol clone split stop <flexclone_name>

log file

/etc/log/clone

 

The clone log file records the following information:

• Cloning operation ID

• The name of the volume in which the cloning operation was performed

• Start time of the cloning operation

• End time of the cloning operation

• Parent file/LUN and clone file/LUN names

• Parent file/LUN ID

• Status of the clone operation: successful, unsuccessful, or stopped and some other details

 

QTrees

 

QTree Commands

Display

qtree status [-i] [-v]

 

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 enabled.

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>

convert a directory into a qtree directory

## Move the directory to a different directory

mv /n/joel/vol1/dir1 /n/joel/vol1/olddir

 

## Create the qtree

qtree create /n/joel/vol1/dir1

 

## Move the contents of the old directory back into the new QTree

mv /n/joel/vol1/olddir/* /n/joel/vol1/dir1

 

## Remove the old directory name

rmdir /n/joel/vol1/olddir

stats

qtree stats [-z] [vol_name]

 

Note:

-z = zero stats

Change the security style

## Syntax

qtree security path {unix | ntfs | mixed}

## Change the security style of /vol/users/docs to mixed

qtree security /vol/users/docs mixed

 

 

 

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 on

options httpd.bypass_traverse_checking off

 

Note: 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.log

 

# use the below to change the logfile format

options httpd.log.format alt1

 

Note: 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.mimetypes

 

Note: use rdfile and wrfile to edit

interface firewall

ifconfig f0 untrusted

stats

httpstat [-dersta]

 

# reset the stats

httpstat -z[derta]

 

Network Interfaces

 

Display

ifconfig -a

ifconfig <interface>

IP address

ifconfig e0 <IP Address>

ifconfig e0a <IP Address>

 

# Remove a 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>

 

# example

ifconfig e8 flowcontrol none

Note: value is the flow control type. You can specify the following values for the flowcontrol option:

 

none    - No flow control

receive - Able to receive flow control frames

send    - Able to send flow control frames

full    - Able to send and receive flow control frames

 

The default flowcontrol type is full.

trusted

ifconfig e8 untrusted

 

Note: 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>

 

## You must enable takeover on interface failures by entering the following commands:

options cf.takeover.on_network_interface_failure enable

ifconfig interface_name {nfo|-nfo}

nfo   — Enables negotiated failover

-nfo  — Disables 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 alias

ifconfig e0 alias 192.0.2.30

 

# Remove alias

ifconfig e0 -alias 192.0.2.30

Block/Unblock protocols

# Block

options interface.blocked.cifs e9

options interface.blocked.cifs e0a,e0b

 

# Unblock

options interface.blocked.cifs ""

Stats

ifstat

netstat

 

Note: 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 below

route add default 192.168.0.254 1

 

# the full /etc/rc file will look like something below

hostname netapp1

ifconfig e0 192.168.0.10 netmask 255.255.255.0 mediatype 100tx-fd

route add default 192.168.0.254 1

routed on

enable/disable fast path

options ip.fastpath.enable {on|off}

 

Note:

on   — Enables fast path

off  — Disables fast path

enable/disable routing daemon

routed {on|off}

 

Note:

on   — Turns on the routed daemon

off  — Turns off the routed daemon

Display routing table

netstat -rn

route -s

routed status

Add to routing table

route add 192.168.0.15 gateway.com 1

 

 

NetApp Training

 

We hope you found this NetApp Clustered ONTAP CLI commands cheat sheet useful. To earn a NetApp certification, explore QuickStart's library with NetApp courses offering full competency to individuals who want to get trained. If you would like full access to over 900 self-paced courses, start your 30-day free trial with QuickStart. Connect with our experts to learn more about our NetApp courses.

 

 

 

 

 

Previous Post Next Post
Hit button to validate captcha