Cisco Champions 2015

I’m very grateful and proud to find myself and several other members of the NetApp family designated as Cisco Champions for 2015. Cisco Champion(s) is a program similar to the VMware vExpert program in recognizing and rewarding the pursuit of relevant technical achievement and, even more importantly, active participation within the technical community. There can be many areas for that involvement to occur – Twitter, Facebook, Cisco Communities, blogs, and much more – but it’s centered around passion, collaboration, support, and “spreading the wealth” by sharing the knowledge that you’ve gained with other people.

The program is now starting its second year (membership is designated annually) and it’s great to see a good size contingent from the NetApp family as Cisco Champions:

  • Michael Cade (@MichaelCade1 and vzilla.co.uk) of Avnet Technology Solutions: Senior Technical Consultant and a NetApp A-Team member
  • Dave Cain (@thedavecain) of NetApp: Technical Marketing Engineer for Integrated Infrastructures
  • David Klem (@davidklem and davidklem.com) of NetApp: Principal Architect on the FlexPod team and a VMware vExpert
  • Jarett Kulm (@JK47theweapon and jk-47.com) of HA Storage Systems: Principal Technologist and a NetApp A-Team member
  • Ed Morgan (@mo6020 and edmorgan.info) of ANS Group: Technical Consultant and a NetApp A-Team member
  • Melissa Palmer (@vmiss33 and vmiss.net) of NetApp: Systems Engineer, and a VMware vExpert
  • Henry Vail of NetApp: Senior Architect for Integrated Infrastructures
  • Emad Younis (@Emad_Younis and emadyounis.com) of General Datatech: Network Systems Engineer, a VMware vExpert, and a NetApp A-Team member

If I’ve managed to miss anyone from this list, please just let me know and I’ll be happy to update it.

Congratulations to everyone who was chosen as a Cisco Champion this year: communities are defined by their members, and a great community depends on having great people actively involved.  And a special congratulations to my friend Bob Elwertowski (@BElwertowski) of SMP for also being recognized this year as both Cisco Champion and VMware vExpert – and likely a third on its way.

Huge thanks and gratitude to Rachel Bakker (@RBakker), Amy Lewis (@CommsNinja) and the rest of the social media team at Cisco, without whom this program wouldn’t exist.

 

CiscoChampion200PX

Tours of the Black Prompt: Clustered NetApp Data ONTAP – Part 5

The Tours of the Black Prompt series so far:

As promised, in this post we’re going to cover some more real-world examples of using Data ONTAP’s cluster shell.

Common Configuration

The following examples were actually used in our just-released deployment guide NVA-1110-FP-DEPLOY. This is the Deployment Guide for NVA-1110-FP: FlexPod Datacenter with NetApp All-Flash FAS and VMware Horizon (with View) for which we released the Design Guide back in October.

Note: in our official documentation examples we will normally use the most complete or verbose version of a command, rather than an abbreviated one, for clarity and easier reading. For even greater efficiency, an administrator can absolutely use some of the abbreviations or shortcuts discussed in Part 1.

One of the areas where you may need to perform a lot of repetitive operational tasks is networking. In an ONTAP cluster, you will typically have multiple physical interfaces per node, and then multiple nodes within the cluster. Modifying a setting on each of these individually is the definition of tedious as well as consuming significant time.

Specifying the correct flow control settings on your interfaces is one of these operations. In the NVA-1110-FP environment, we needed to modify eight interfaces each on two nodes (16 total interfaces). Without using queries and operators, this would have required 16 commands

cluster01::> network port modify -node  -port e0a -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y
1 entry was modified.

cluster01::>  network port modify -node  -port e0b -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0c -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::> network port modify -node  -port e0d -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0e -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0f -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified.

cluster01::>  network port modify -node  -port e0g -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node < -port e0h -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified.

cluster01::> network port modify -node  -port e0a -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0b -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0c -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0d -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0e -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0f -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified.
cluster01::>  network port modify -node  -port e0g -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified. 
cluster01::>  network port modify -node  -port e0h -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

1 entry was modified.

But that’s crazy when we can do it with one command instead:

cluster01::> network port modify -node * -port e0a..e0h -flowcontrol-admin none
Warning: Changing the network port settings will cause a several second interruption in carrier.
Do you want to continue? {y|n}: y

16 entries were modified.

This will modify the range of ports (using the RANGE operator of “..”) starting with e0a and ending with e0h on every node (using the ALL operator of “*”) in the cluster. That’s 15 commands (and quite a bit of time/frustration) eliminated in this environment, but the savings are even more significant as you scale up: no changes to that command are necessary whether we have one node or 24 nodes. Think of that for a moment: 24 nodes with eight interfaces each would be 192 commands – and we’ve reduced that down to a single command. That’s the equivalent of a 99.5% dedupe ratio!

In addition, we are able to apply the same efficiencies to setting the correct MTU on the physical ports:

cluster01::> network port modify -node * -port a0a -mtu 9000
WARNING: Changing the network port settings will cause a serveral second interruption in carrier.
Do you want to continue? {y|n}: y
2 entries were modified.


cluster01::> network port modify -node * -port e0e..e0h -mtu 9000
WARNING: Changing the network port settings will cause a serveral second interruption in carrier.
Do you want to continue? {y|n}: y
16 entries were modified.

In this case, we needed to modify an existing interface group (a0a) on both controllers, and then also modify each of the physical ports on each node.


There were several other areas of the configuration where we were able save steps using the ALL operator.

We needed to enable Cisco Discovery Protocol (CDP) on all nodes in the cluster.

cluster01::> system node run -node * options cdpd.enable on
2 entries were acted on.

If we wanted to completely abbreviate this, it could have been as short as

cluster01::> ru * options cdpd.enable on
2 entries were acted on.

We also needed to modify AutoSupport settings on each node:

cluster01::> system node autosupport modify -node * -state enable -mail-hosts [SMTPserver] -transport https -support enable -to [admin_email]

2 entries were modified.

Finally, we modified some web services for all Storage Virtual Machines in the cluster:

cluster01::> vserver services web modify -name spi|ontapi|compat -vserver * -enabled true
4 entries were modified.

In this case, we used the OR operator of “|” (the pipe symbol) for the “-name” parameter and the ALL operator for the “-vserver” parameter.


Here are a few other examples where I’ve been able to save significant amounts of effort and time thanks to these built-in efficiencies of the cluster shell. You’ll notice that I also indulged in various shortcuts and abbreviations in these examples, but the cluster shell outputs the unabbreviated command to the console for clarity anyway (the line in parentheses just beneath each example command).

Other Networking Configuration

At one point I needed to fix some Logical Interface (LIF) names that I had mis-typed (mis-specified, really) on 16 different SVMs. One command fixed it:

cluster01::> net int rename -vse test_nas* -lif mgmt1 -newname nfs1
  (network interface rename)
16 entries were modified. 

In another case, I needed to modify the home-ports for the management interfaces (35 in this instance) on all of the SVMs in a cluster. A single command again sufficed:

cluster01::> net int modify mgmt1 -home-port e0d -vse *
  (network interface modify)
35 entries were modified.

A special note for this example: specifying the home node was not required – the configuration for each LIF stayed on its current home-node and merely the home-port changed. When initially creating these LIFs, you do need to specify both home-node and home-port.

Reconfiguring the physical networking (VLAN interfaces, interface groups, etc.) happens fairly often as well. Here I needed to tear down an interface group, with a corresponding child VLAN interface, on each node in the cluster:

cluster01::> net port vlan delete -node * -vlan-name a0a-100
  (network port vlan delete)
4 entries were deleted.

cluster01::> net port ifgrp delete -node * -ifgrp a0a
  (network port ifgrp delete)
4 entries were deleted.

SAN Access Cleanup

Sometimes I just need to be able to clean up someLUNs, volumes, and SAN configuration while validating a solution:

cluster01::> lun offline -vserver svm_vmware -lun *
4 entries were acted on.

cluster01::> lun delete -vserver svm_vmware -lun *
4 entries were acted on.

cluster01::> igroup delete -vserver svm_vmware -igroup * 
1 entry was acted on.

cluster01::> volume offline -vserver svm_vmware -volume *

Error: This command does not support queries.

I kept the volume command in there as a good example of where, for safety’s sake, operators are not allowed. If a LUN is deleted in error, you will be able to easily recover using a volume Snapshot. It is significantly harder to recover a volume if it has been accidentally deleted.

SnapMirror Operations

Initializing multiple SnapMirrors at once:
cluster01::> snapmirror initialize {-destination-path tours*}
Operation is queued: snapmirror initialize of destination "tours:tours_sm1".                                                                                  
Operation is queued: snapmirror initialize of destination "tours:tours_sm2".                                                                                  
2 entries were acted on.
Modifying all SnapMirror relationships that currently are on a daily schedule to now have an 8hour schedule:
cluster01::> snapmirror modify {-schedule daily} -schedule 8hour 
Operation succeeded: snapmirror modify for the relationship with destination "tours:tours_sm1".                                                               
Operation succeeded: snapmirror modify for the relationship with destination "tours:tours_sm2".                                                               
2 entries were acted on.

The examples above are just a few of the ways that the built-in efficiencies of the cluster shell can dramatically save an administrator’s time, and turn a tedious experience into a fun one. (At least for some of us!)

Tours of the Black Prompt: Clustered NetApp Data ONTAP – Part 4

The Tours of the Black Prompt series so far:

Today we’re continuing our look at more advanced CLI operations for clustered Data ONTAP with the use of extended queries.

Extended Queries

You specify an extended query by enclosing it within curly braces: “{}”. Extended queries are similar to standard queries and use the same operators, but there are some distinct differences in how and when you use each type of query. Show commands can be run with standard queries, while modify or delete commands can be run with either standard or extended queries (but not both).  Extended queries can be used to filter on parameters that a modify command is capable of changing, whereas standard queries can only be used for parameters that do not get changed with a modify command (most commonly, these are name parameters associated with vservers, volumes, aggregates, etc.). Neither type of query can be used with create commands.

Let’s look at some examples of how you can use modify commands with standard and extended queries.

With standard queries you can use multiple instances within the same command. In this case, we’ll thin-provision all volumes on all SVMs except for vol0:

cdot_mba1::> volume modify -vserver * -volume !vol0 -space-guarantee none  

Volume modify successful on volume: black_root

Volume modify successful on volume: avol1

Volume modify successful on volume: citrixvol1

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: testvol1

Volume modify successful on volume: tours_root

Volume modify successful on volume: user_share

Volume modify successful on volume: vmwarevol1
9 entries were modified.

We can accomplish something similar using a single extended query instead:

cdot_mba1::> volume modify {-volume !vol0} -space-guarantee none

Volume modify successful on volume: black_root

Volume modify successful on volume: avol1

Volume modify successful on volume: citrixvol1

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: testvol1

Volume modify successful on volume: tours_root

Volume modify successful on volume: user_share

Volume modify successful on volume: vmwarevol1
9 entries were modified.

You can’t use both a standard query and an extended query within the same command, nor can you use more than one extended query in a single command:

cdot_mba1::> volume modify {-volume !vol0} -vserver * -space-guarantee none

Error: invalid argument "-vserver"

cdot_mba1::> volume modify {-volume !vol0} {-vserver *} -space-guarantee none

Error: "-vserver *" was not expected. Please specify -fieldname first.

As seen in our first extended query example above, an extended query must always be the first argument after the command before any other parameters are specified.

cdot_mba1::> volume modify -vserver tours {-volume !vol0} -space-guarantee none

Error: Volume name: The first character must be a letter or underscore.

An extended query can also not be used with subsequent filtering parameters (such as volume names, SVM names, etc.) even when specifying their values rather than using standard queries:

cdot_mba1::> volume modify {-volume !vol0} -vserver tours -space-guarantee none

Error: invalid argument "-vserver"

The inverse is also true: with extended queries, you don’t need to specify additional parameters that you may need to include when using standard queries:

cdot_mba1::> volume modify -volume !vol0  -space-guarantee none              

Error: Either specify all keys, or set at least one key to "*".

cdot_mba1::> volume modify -volume !vol0 -vserver tours -space-guarantee none

Volume modify successful on volume: avol1

Volume modify successful on volume: citrixvol1

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: testvol1

Volume modify successful on volume: tours_root

Volume modify successful on volume: user_share

Volume modify successful on volume: vmwarevol1
8 entries were modified.

cdot_mba1::> volume modify {-volume !vol0}  -space-guarantee volume

Volume modify successful on volume: black_root

Volume modify successful on volume: avol1

Volume modify successful on volume: citrixvol1

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: testvol1

Volume modify successful on volume: tours_root

Volume modify successful on volume: user_share

Volume modify successful on volume: vmwarevol1
9 entries were modified.

You can always tell if what you’re trying to do is going to work or not simply by trying to tab-complete. If the syntax is correct, you will be able to tab-complete commands within the extended query (between the curly braces) and after it; if your syntax is incorrect, you will not.

Putting It All Together

The combination of standard and extended queries provide a lot of power and efficiency for modifying storage configurations. Here’s just a few simple examples using the volume and lun commands:

Change the size of volumes matching a certain naming pattern

cdot_mba1::> volume modify {*share} -size +20M  

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: user_share
3 entries were modified.

Change the size of volumes matching a certain current size

cdot_mba1::> volume modify {-size 40M} -size 20M

Volume modify successful on volume: dept1_share

Volume modify successful on volume: dept2_share

Volume modify successful on volume: user_share
3 entries were modified.

As noted in the System Administration Guide, you do need to be careful when modifying the same parameter that you are using for the queries as there can be unintended consequences as the command processes.

Modify the space guarantee settings for a volume based on its policy type

For example, you may want to do this to ensure that all of your virtualization volumes are thin provisioned.

cdot_mba1::> volume modify {-policy esx_exports} -space-guarantee none

Volume modify successful on volume: vmwarevol1
1 entry was modified.

Map a LUN to an Initiator Group based on its OS type

cdot_mba1::> lun map {-ostype vmware} -igroup esx
2 entries were acted on.

The examples we’ve been using in this series so far have all been fairly simple with the actual CLI output run and validated on a simulator on my laptop. In a forthcoming post I’ll go through some more sophisticated examples from real  projects and technical documentation that I’ve been worked on over the last year.

Stay tuned.

Tours of the Black Prompt: Clustered NetApp Data ONTAP – Part 3

The Tours of the Black Prompt series so far:

Today we’re getting into more advanced CLI operations for clustered Data ONTAP with field options, queries, and operators.

Field Options

In Part 2, we looked at enabling a session-level setting that would force the display of all possible fields for a given command’s tabular output, but there’s a lot more flexibility around which fields can be displayed than just a defaults-or-everything approach.

Every command provides a “-fields” parameter which allows you to granularly specify which fields will be displayed as part of the output.

cdot_mba1::> vol show
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    223.0MB   73%
tours     avol1        aggr0        online     RW         20MB     2.52MB   87%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
9 entries were displayed.
cdot_mba1::> vol show -fields ?
  (volume show)
  vserver                                          Vserver Name
  volume                                           Volume Name
  aggregate                                        Aggregate Name
  size                                             Volume Size
  dsid                                             Volume Data Set ID
  msid                                             Volume Master Data Set ID
  state                                            Volume State
  type                                             Volume Type
  volume-style                                     Volume Style
  is-cluster-volume                                Is Cluster-Mode Volume
  is-constituent                                   Is Constituent Volume
  policy                                           Export Policy
  user                                             User ID
  group                                            Group ID
  security-style                                   Security Style
  unix-permissions                                 UNIX Permissions
  junction-path                                    Junction Path
  junction-path-source                             Junction Path Source
  junction-active                                  Junction Active
  junction-parent                                  Junction Parent Volume
  comment                                          Comment
  available                                        Available Size
  filesystem-size                                  Filesystem Size
  total                                            Total User-Visible Size
  used                                             Used Size
  percent-used                                     Used Percentage
  space-nearly-full-threshold-percent              Volume Nearly Full Threshold Percent
  space-full-threshold-percent                     Volume Full Threshold Percent
  max-autosize                                     Maximum Autosize (for flexvols only)
  autosize-increment                               Autosize Increment (for flexvols only)
  min-autosize                                     Minimum Autosize
  autosize-grow-threshold-percent                  Autosize Grow Threshold Percentage
  autosize-shrink-threshold-percent                Autosize Shrink Threshold Percentage
  autosize-mode                                    Autosize Mode
  autosize                                         Autosize Enabled (for flexvols only)
  files                                            Total Files (for user-visible data)
  files-used                                       Files Used (for user-visible data)
  space-guarantee                                  Space Guarantee Style
  space-guarantee-enabled                          Space Guarantee in Effect
  snapdir-access                                   Snapshot Directory Access Enabled
  percent-snapshot-space                           Space Reserved for Snapshots
  snapshot-space-used                              Snapshot Reserve Used
  snapshot-policy                                  Snapshot Policy
  create-time                                      Creation Time
  language                                         Language
  clone-volume                                     Clone Volume
  node                                             Node name
  nvfail                                           NVFAIL Option
  filesys-size-fixed                               Is File System Size Fixed
  extent-enabled                                   Extent Option
  overwrite-reserve                                Reserved Space for Overwrites
  fractional-reserve                               Fractional Reserve
  snapshot-clone-dependency                        Snapshot Cloning Dependency 
  space-mgmt-try-first                             Primary Space Management Strategy
  read-realloc                                     Read Reallocation Option
  is-inconsistent                                  Inconsistency in the File System
  is-quiesced-on-disk                              Is Volume Quiesced (On-Disk)
  is-quiesced-in-memory                            Is Volume Quiesced (In-Memory)
  is-sis-volume                                    Volume Contains Shared or Compressed Data
  sis-space-saved                                  Space Saved by Storage Efficiency
  sis-space-saved-percent                          Percentage Saved by Storage Efficiency
  dedupe-space-saved                               Space Saved by Deduplication
  dedupe-space-saved-percent                       Percentage Saved by Deduplication
  dedupe-space-shared                              Space Shared by Deduplication
  compression-space-saved                          Space Saved by Compression
  compression-space-saved-percent                  Percentage Space Saved by Compression
  block-type                                       Block Type
  flexcache-connection-status                      FlexCache Connection Status
  is-moving                                        Is Volume Moving
  hybrid-cache-eligibility                         Flash Pool Caching Eligibility
  hybrid-cache-write-caching-ineligibility-reason  Flash Pool Write Caching Ineligibility Reason
  is-managed-by-service                            Managed By Storage Service
  enable-snapdiff                                  Create Namespace Mirror Constituents For SnapDiff Use
  constituent-role                                 Constituent Volume Role
  qos-policy-group                                 QoS Policy Group Name
  is-volume-in-cutover                             Is Volume Move in Cutover Phase
  snapshot-count                                   Number of Snapshot Copies in the Volume

There are obviously a lot of different fields that we could display depending on the use case.

Perhaps we actually want to display fewer fields, not more:

cdot_mba1::> vol show -fields vserver,volume,aggregate,size,percent-used
  (volume show)
vserver      volume aggregate size    percent-used 
------------ ------ --------- ------- ------------ 
cdot_mba1-01 vol0   aggr0     851.5MB 73%          
tours        avol1  aggr0     20MB    87%          
tours        citrixvol1 
                    aggr1     20MB    5%           
tours        dept1_share 
                    aggr1     20MB    5%           
tours        dept2_share 
                    aggr1     20MB    5%           
tours        testvol1 
                    aggr0     20MB    5%           
tours        tours_root 
                    aggr0     20MB    5%           
tours        user_share 
                    aggr1     20MB    5%           
tours        vmwarevol1 
                    aggr1     20MB    5%           
9 entries were displayed.

Perhaps we want to look at information more relevant to a NAS configuration:

cdot_mba1::> vol show -fields vserver,volume,security-style,junction-path,language,user,group,policy,unix-permissions 
  (volume show)
vserver      volume policy user group security-style unix-permissions junction-path language 
------------ ------ ------ ---- ----- -------------- ---------------- ------------- -------- 
cdot_mba1-01 vol0   -      -    -     -              ------------     -             -        
tours        avol1  default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        citrixvol1 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        dept1_share 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        dept2_share 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        testvol1 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        tours_root 
                    default 
                           0    0     unix           ---rwxr-xr-x     /             C.UTF-8  
tours        user_share 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
tours        vmwarevol1 
                    default 
                           0    0     unix           ---rwxr-xr-x     -             C.UTF-8  
9 entries were displayed.

One subtle thing to notice: fields are not displayed in the order in which you list them. The display order is not configurable by the user.

Field Filtering

The tab completion functionality of the cluster shell lends itself to filtering based on field just by its operation. As you tab through the parameters of a command you are continuously filtering out possible options through your choices. While this is explicit in a create or modify command, it’s equally true for displaying information.

cdot_mba1::> vol show -vserver 
    cdot_mba1    cdot_mba1-01 tours        

cdot_mba1::> vol show -vserver tours
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.52MB   87%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
8 entries were displayed.

Here, I’ve used [TAB] to first show me the possible values for that field, and then to filter the results based on my choice of “tours”.

I can also filter just by specifying which values I’m interested in. Perhaps I only want to see volumes owned by “tours” that are on aggr0:

cdot_mba1::> vol show -vserver tours -aggregate aggr0
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.50MB   87%
tours     testvol1     aggr0        online     RW         20MB    18.88MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.88MB    5%
3 entries were displayed.

I can filter on this further by specifying fields that aren’t even displayed in the output, such as snapshot-count:

cdot_mba1::> vol show -vserver tours -aggregate aggr0 -snapshot-count 3
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.50MB   87%
tours     testvol1     aggr0        online     RW         20MB    18.88MB    5%
2 entries were displayed.

I can then take this and limit which fields are displayed so that I get exactly the data I’m looking for and nothing else:

cdot_mba1::> vol show -vserver tours -aggregate aggr0 -snapshot-count 3 -fields vserver,volume 
  (volume show)
vserver volume 
------- ------ 
tours   avol1  
tours   testvol1 
2 entries were displayed.

Queries and Operators

Since Data ONTAP is a Unix-like operating system, it’s been a common request that the CLI should support the use of typical Unix wildcard characters and patterns to provide more flexibility for the administrator – and with clustered Data ONTAP the cluster shell does. These patterns are considered to be “queries” and each wildcard or pattern is considered an “operator.” Using queries, administrators are able to more precisely specify the contents of the output for which they’re looking.

The following table is adapted from the one included in the System Administration Guide for clustered Data ONTAP. You’ll notice that most of the listed operators are the standard wildcards used in many systems.

Operator Description
* ALL operator: match all values
! NOT operator: do not match the specified value
| (pipe) OR operator: the pipe symbol acts as a separator between multiple patterns
.. RANGE operator: match any value within the range
< LESS THAN operator: match any value less than the specified one
> GREATER THAN operator: match any value more than the specified one
<= LESS-THAN-OR-EQUAL-TO operator: match any value equal to or less than the specified one
>= GREATER-THAN-OR-EQUAL-TO operator: match any value equal to or more than the specified one

Let’s provide some examples of each one:

ALL

cdot_mba1::> volume show -volume *
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    243.5MB   71%
tours     avol1        aggr0        online     RW         20MB     2.66MB   86%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
9 entries were displayed.

The ALL operator can be used with partial values regardless of placement within that value:

cdot_mba1::> volume show -volume *vol1
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.66MB   86%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
4 entries were displayed.

cdot_mba1::> vol show -volume dept*_share
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
2 entries were displayed.

With this flexibility, you can filter and match on more than one value in a specified field, and not just literally all values.

NOT

cdot_mba1::> vol show -volume !vol0
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.66MB   86%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
8 entries were displayed.

In this example, there was a single volume we wanted to exclude from the output, but what if we wanted to exclude more than one? Just combine operators:

cdot_mba1::> volume show -volume !*vol1
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    237.0MB   72%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
5 entries were displayed.

OR

cdot_mba1::> vol show -volume citrix* | vmware*
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
2 entries were displayed.

RANGE

Unsurprisingly, we can’t use operators like RANGE, LESS THAN, GREATER THAN, etc. on free-text fields like volume names. Continuing with our examples, let’s start filtering based on the “-percent-used” field and find our most under-utilized volumes:

cdot_mba1::> vol show -percent-used 1..10
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     citrixvol1   aggr1        online     RW         20MB    18.88MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.88MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.88MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.88MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.88MB    5%
tours     user_share   aggr1        online     RW         20MB    18.88MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.88MB    5%
7 entries were displayed.

We can do a similar search to find volumes of a certain size range:

cdot_mba1::> vol show -size 500M..1000M
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    227.1MB   73%

Note the “M” in that last example: when using fields that display different units of measurement, you need to specify that unit in your RANGE operation.

cdot_mba1::> vol show -size 500..1000
  (volume show)
There are no entries matching your query.

cdot_mba1::> vol show -size 1024k..30000k
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.56MB   87%
tours     citrixvol1   aggr1        online     RW         20MB    18.88MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.88MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.88MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.88MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.88MB    5%
tours     user_share   aggr1        online     RW         20MB    18.88MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.88MB    5%
8 entries were displayed.

Let’s try to get the same information as above, but using LESS THAN or MORE THAN instead of a RANGE operation.

LESS THAN

cdot_mba1::> vol show -percent-used <10
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.88MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
7 entries were displayed.

GREATER THAN

cdot_mba1::> vol show -size >500M
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    225.6MB   73%

LESS-THAN-OR-EQUAL-TO

cdot_mba1::> vol show -size <=20M 
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.46MB   87%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
8 entries were displayed.

To demonstrate that this is really being evaluated differently than just LESS THAN:

cdot_mba1::> vol show -size <20M 
  (volume show)
There are no entries matching your query.

GREATER-THAN-OR-EQUAL-TO

cdot_mba1::> vol show -size >=20M
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01
          vol0         aggr0        online     RW      851.5MB    224.3MB   73%
tours     avol1        aggr0        online     RW         20MB     2.52MB   87%
tours     citrixvol1   aggr1        online     RW         20MB    18.89MB    5%
tours     dept1_share  aggr1        online     RW         20MB    18.89MB    5%
tours     dept2_share  aggr1        online     RW         20MB    18.89MB    5%
tours     testvol1     aggr0        online     RW         20MB    18.89MB    5%
tours     tours_root   aggr0        online     RW         20MB    18.89MB    5%
tours     user_share   aggr1        online     RW         20MB    18.89MB    5%
tours     vmwarevol1   aggr1        online     RW         20MB    18.89MB    5%
9 entries were displayed.

Putting It All Together

Even though these examples are rather trivial, the filtering and querying capabilities in the CLI can be very powerful when they are combined.

For example, what if I want to find all volumes which are more than 50% utilized with a certain minimum number of snapshots – except for those belonging to a particular SVM or on a particular aggregate?

cdot_mba1::> vol show -volume * -vserver !cdot_mba1-01  -aggregate !aggr1 -percent-used >50 -snapshot-count >=3
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
tours     avol1        aggr0        online     RW         20MB     2.45MB   87%

As you can see, you can run very detailed queries that are still simple to construct and easy to understand.

In even moderately sized environments, effective use of the capabilities within the clustered Data ONTAP shell can provide significant administrator efficiencies.

Next up: Extended queries.

Tours of the Black Prompt: Clustered NetApp Data ONTAP – Part 2

The Tours of the Black Prompt series so far:

Today we’re exploring command history more as well as display settings and options for clustered Data ONTAP.

Working with the Command History

In Part 1 we talked about using the history command to view the previously-entered commands. Note that this will only show the history of your current session – if you log out or get disconnected, the history from the previous session is not kept and therefor those older entries will not be displayed.

Besides navigating the CLI history using up and down arrows, or the Ctrl+n and Ctrl+p key combinations, you can also use the redo command.

cdot_mba1::> history
    1  storage aggregate show
    2  volume show
    3  network interface show
    4  network port show 

cdot_mba1::> redo 1
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0        900MB   43.54MB   95% online       1 cdot_mba1-01     raid_dp,
                                                                   normal

In this case, we told it to redo the first command in the history buffer, so it re-ran storage aggregate show. We could also tell it to run a prior command relative to the current using the format redo -2.

cdot_mba1::> redo -2
1 storage aggregate show
2 volume show
3 network interface show
4 network port show
5 history
6 storage aggregate show

Why did it re-run the history command? Because history itself will be displayed in its own output (it is a command being run, after all) and it was the second command from the bottom of the list. Note also that redo 1 is not displayed but instead the storage aggregate show is again listed: the redo functionality is simply a shortcut and it is the effective commands that are displayed by history and not the exact characters that are typed at the prompt.

Although:

cdot_mba1::> vol show
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    233.2MB   72%

cdot_mba1::> history
    1  storage aggregate show
    2  volume show
    3  network interface show
    4  network port show
    5  history
    6  storage aggregate show
    7  history
    8  vol show

Notice that command 8 is different from command 2 (volume shortened to vol) even though they are the same effective command.

If you don't want to use a numeric ID or relative numeric value for a previously-entered command, you also use just use a string that uniquely matches the beginning of the prior command you want:

cdot_mba1::> redo vol
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 
          vol0         aggr0        online     RW      851.5MB    231.9MB   72%

What if you use a string that isn't unique to one command?

cdot_mba1::> redo network
                                      Auto-Negot  Duplex     Speed (Mbps) 
Node   Port   Role         Link   MTU Admin/Oper  Admin/Oper Admin/Oper   
------ ------ ------------ ---- ----- ----------- ---------- ------------ 
cdot_mba1-01
       e0a    data         up    1500  true/true  full/full   auto/1000
       e0b    data         up    1500  true/true  full/full   auto/1000
       e0c    data         up    1500  true/true  full/full   auto/1000
       e0d    data         up    1500  true/true  full/full   auto/1000
4 entries were displayed.

When multiple entries match the same string, the most recent match is used, which in this case was network port show.

You can be very efficient when using this redo method, as the string you type doesn't need to be long - it just needs to be unique:

cdot_mba1::> redo s
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0        900MB   43.52MB   95% online       1 cdot_mba1-01     raid_dp,
                                                                   normal

Since only one previously-entered command began with the letter "s", redo knew that was the command that needed to be run. If you've been doing much in your session, of course, you're unlikely to be able to abbreviate it as much as in that example.

Would you believe there's an even more efficient way of re-running that command than redo s? Try this instead:

cdot_mba1::> !1
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0        900MB   43.54MB   95% online       1 cdot_mba1-01     raid_dp,
                                                                   normal

If you're used to Bash or other Unix/Linux shells, you may be used to using the "bang" (!) operator to re-run prior commands - and it works under clustered Data ONTAP as well! It operates just like the redo command where you specify the numeric ID for the command from history - but you don't even need a space between them.

One last efficiency trick: if you just want to rerun the last command you can simply type "!!".

cdot_mba1::> !!
Aggregate     Size Available Used% State   #Vols  Nodes            RAID Status
--------- -------- --------- ----- ------- ------ ---------------- ------------
aggr0        900MB   43.54MB   95% online       1 cdot_mba1-01     raid_dp,
                                                                   normal

Setting Display Preferences

In Part 1 we used the set command to change between privilege levels, but it has several other uses as well.

cdot_mba1::> set -?
  [[-privilege] {admin|advanced|diagnostic}]  Privilege Level
  [ -confirmations {on|off} ]                 Confirmation Messages
  [ -showallfields {true|false} ]             Show All Fields
  [ -showseparator  ]       Show Separator
  [ -active-help {true|false} ]               Active Help
  [ -units {auto|raw|B|KB|MB|GB|TB|PB} ]      Data Units
  [ -rows  ]                         Pagination Rows ('0' disables)
  [ -vserver  ]                         Default Vserver
  [ -node  ]                            Default Node
  [ -stop-on-error {true|false} ]             Stop On Error

The "-confirmations" parameter specifies whether the system should require you to confirm ("Are you sure?") when issuing potentially disruptive commands. This, of course, on by default - please don't change it on a production system.

The "-showallfields" parameter tells the system to include all possible fields when displaying tabular output. This is off by default, and here's an example of why:

cdot_mba1::> set
User Name:             admin
Profile Name:          admin
Privilege Level:       admin
Confirmation Messages: on
Show All Fields:       false
Show Field Separator:
Data Units:            auto
Pagination Rows:       54
Default Vserver:
Default Node:
Stop On Error:         false

cdot_mba1::> set -showallfields true 

cdot_mba1::> set
privilege   confirmations   username   profilename   from           app   showallfields   showseparator   active-help   units   allow-proxy   rows   trace-threshold   vserver   node   stop-on-error   
----------- --------------- ---------- ------------- -------------- ----- --------------- --------------- ------------- ------- ------------- ------ ----------------- --------- ------ --------------- 
admin       on              admin      admin         172.16.213.1   ssh   true            "   "           -             auto    false         54     0%                ""        ""     false           

If you do enable "-showallfields" you'll normally want to also set the "-showseparator" to a different character than a tab (like a comma to enable CSV output):

cdot_mba1::> set -showseparator ","

cdot_mba1::> set                   
privilege,confirmations,username,profilename,from,app,showallfields,showseparator,active-help,units,allow-proxy,rows,trace-threshold,vserver,node,stop-on-error,
Privilege Level,Confirmation Messages,User Name,Profile Name,Connected From,Application,Show All Fields,Show Separator,Active Help,Data Units,Allow Offline Proxy,Pagination Rows ('0' disables),SMF Tracing Threshold,Default Vserver,Default Node,Stop On Error,
admin,on,admin,admin,172.16.213.1,ssh,true,,,-,auto,false,54,0%,"","",false,

The "-active-help" parameter specifies that just typing "?" will activate help request. Setting this value to "true" will then require you to press [Enter] following the "?". You probably don't want to change this value.

The "-units" parameter specifies what unit of measurement for data storage should be used when reporting sizes. The default setting is "auto" which will auto-scale the size for human-readable output. You can override this to display everything consistently in bytes, kilobytes, etc.

cdot_mba1::> vol show
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 vol0      aggr0        online     RW        851MB      213MB   74%
tours     tours_root   aggr0        online     RW         20MB       18MB    5%
2 entries were displayed.

cdot_mba1::> set -units B

cdot_mba1::> vol show    
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 vol0      aggr0        online     RW   892841984B 223346688B   74%
tours     tours_root   aggr0        online     RW    20971520B  19808256B    5%
2 entries were displayed.

cdot_mba1::> set -units KB

cdot_mba1::> vol show
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 vol0      aggr0        online     RW     871916KB   218632KB   74%
tours     tours_root   aggr0        online     RW      20480KB    19344KB    5%
2 entries were displayed.

cdot_mba1::> set -units TB

cdot_mba1::> vol show     
  (volume show)
Vserver   Volume       Aggregate    State      Type       Size  Available Used%
--------- ------------ ------------ ---------- ---- ---------- ---------- -----
cdot_mba1-01 vol0      aggr0        online     RW          0TB        0TB   74%
tours     tours_root   aggr0        online     RW          0TB        0TB    5%
2 entries were displayed.

My personal recommendation is to just leave it at the defaults, but there can be times that it's useful to change.
The "-rows" parameter specifies how many rows of output text before the pagination is required (in other words, before you have to hit [Space] to see the next page of output).

cdot_mba1::> vol show -ins
  (volume show)

                                 Vserver Name: cdot_mba1-01
                                  Volume Name: vol0
                               Aggregate Name: aggr0
                                  Volume Size: 851.5MB
                           Volume Data Set ID: -
                    Volume Master Data Set ID: -
                                 Volume State: online
                                  Volume Type: RW
                                 Volume Style: flex
                       Is Cluster-Mode Volume: false
                        Is Constituent Volume: false
                                Export Policy: -
                                      User ID: -
                                     Group ID: -
                               Security Style: -
                             UNIX Permissions: ------------
                                Junction Path: -
                         Junction Path Source: -
                              Junction Active: -
                       Junction Parent Volume: -
                                      Comment: -
                               Available Size: 221.4MB
                              Filesystem Size: 851.5MB
                      Total User-Visible Size: 808.9MB
                                    Used Size: 587.5MB
                              Used Percentage: 73%
         Volume Nearly Full Threshold Percent: 95%
                Volume Full Threshold Percent: 98%
         Maximum Autosize (for flexvols only): 1021MB
       Autosize Increment (for flexvols only): 42.57MB
                             Minimum Autosize: 851.5MB
           Autosize Grow Threshold Percentage: 85%
         Autosize Shrink Threshold Percentage: 50%
                                Autosize Mode: off
         Autosize Enabled (for flexvols only): false
          Total Files (for user-visible data): 25876
           Files Used (for user-visible data): 7589
                        Space Guarantee Style: volume
                    Space Guarantee in Effect: true
            Snapshot Directory Access Enabled: true
                 Space Reserved for Snapshots: 5%
                        Snapshot Reserve Used: 734%
                              Snapshot Policy: -
                                Creation Time: Fri Nov 07 20:45:01 2014
                                     Language: -
                                 Clone Volume: -
                                    Node name: cdot_mba1-01
                                NVFAIL Option: on
                    Is File System Size Fixed: false
                                Extent Option: off
                Reserved Space for Overwrites: 0B
Press  to page down,  for next line, or 'q' to quit... 

Setting this value to 0 turns off pagination and all output is sent immediately to the screen.

cdot_mba1::> set -rows 0

cdot_mba1::> vol show -ins
  (volume show)

                                 Vserver Name: cdot_mba1-01
                                  Volume Name: vol0
                               Aggregate Name: aggr0
                                  Volume Size: 851.5MB
                           Volume Data Set ID: -
                    Volume Master Data Set ID: -
                                 Volume State: online
                                  Volume Type: RW
                                 Volume Style: flex
                       Is Cluster-Mode Volume: false
                        Is Constituent Volume: false
                                Export Policy: -
                                      User ID: -
                                     Group ID: -
                               Security Style: -
                             UNIX Permissions: ------------
                                Junction Path: -
                         Junction Path Source: -
                              Junction Active: -
                       Junction Parent Volume: -
                                      Comment: -
                               Available Size: 221.6MB
                              Filesystem Size: 851.5MB
                      Total User-Visible Size: 808.9MB
                                    Used Size: 587.3MB
                              Used Percentage: 73%
         Volume Nearly Full Threshold Percent: 95%
                Volume Full Threshold Percent: 98%
         Maximum Autosize (for flexvols only): 1021MB
       Autosize Increment (for flexvols only): 42.57MB
                             Minimum Autosize: 851.5MB
           Autosize Grow Threshold Percentage: 85%
         Autosize Shrink Threshold Percentage: 50%
                                Autosize Mode: off
         Autosize Enabled (for flexvols only): false
          Total Files (for user-visible data): 25876
           Files Used (for user-visible data): 7589
                        Space Guarantee Style: volume
                    Space Guarantee in Effect: true
            Snapshot Directory Access Enabled: true
                 Space Reserved for Snapshots: 5%
                        Snapshot Reserve Used: 734%
                              Snapshot Policy: -
                                Creation Time: Fri Nov 07 20:45:01 2014
                                     Language: -
                                 Clone Volume: -
                                    Node name: cdot_mba1-01
                                NVFAIL Option: on
                    Is File System Size Fixed: false
                                Extent Option: off
                Reserved Space for Overwrites: 0B
                           Fractional Reserve: 100%
                  Snapshot Cloning Dependency: off
            Primary Space Management Strategy: volume_grow
                     Read Reallocation Option: off
             Inconsistency in the File System: false
                 Is Volume Quiesced (On-Disk): false
               Is Volume Quiesced (In-Memory): false
    Volume Contains Shared or Compressed Data: false
            Space Saved by Storage Efficiency: 0B
       Percentage Saved by Storage Efficiency: 0%
                 Space Saved by Deduplication: 0B
            Percentage Saved by Deduplication: 0%
                Space Shared by Deduplication: 0B
                   Space Saved by Compression: 0B
        Percentage Space Saved by Compression: 0%
                                   Block Type: 64-bit
                  FlexCache Connection Status: -
                             Is Volume Moving: -
               Flash Pool Caching Eligibility: read-write
Flash Pool Write Caching Ineligibility Reason: -
                   Managed By Storage Service: -
Create Namespace Mirror Constituents For SnapDiff Use: -
                      Constituent Volume Role: -
                        QoS Policy Group Name: -
              Is Volume Move in Cutover Phase: -
      Number of Snapshot Copies in the Volume: 5

One final note: rather than typing set -rows 0 (or whatever value you want) you can simply use rows 0 instead.

cdot_mba1::> rows
  0

cdot_mba1::> set -rows 54

cdot_mba1::> rows
  54

cdot_mba1::> set -rows 0

cdot_mba1::> rows
  0

cdot_mba1::> rows 54

cdot_mba1::> set 
User Name:             admin
Profile Name:          admin
Privilege Level:       admin
Confirmation Messages: on
Show All Fields:       false
Show Field Separator:  ,
Data Units:            auto
Pagination Rows:       54
Default Vserver:
Default Node:
Stop On Error:         false

The "-vserver" parameter specifies a default vserver (the older engineering term for what are now called Storage Virtual Machines, or SVMs) to be used with any command which has an applicable "-vserver" parameter.

cdot_mba1::> vserver show
                    Admin     Root                  Name    Name
Vserver     Type    State     Volume     Aggregate  Service Mapping
----------- ------- --------- ---------- ---------- ------- -------
cdot_mba1   admin   -         -          -          -       -
cdot_mba1-01 node   -         -          -          -       -
tours       data    running   tours_root aggr0      file    file
3 entries were displayed.

cdot_mba1::> set -vserver tours

cdot_mba1::> set
User Name:             admin
Profile Name:          admin
Privilege Level:       admin
Confirmation Messages: on
Show All Fields:       false
Show Field Separator:  ,
Data Units:            MB
Pagination Rows:       0
Default Vserver:       tours
Default Node:
Stop On Error:         false

cdot_mba1::> vserver show
                    Admin     Root                  Name    Name
Vserver     Type    State     Volume     Aggregate  Service Mapping
----------- ------- --------- ---------- ---------- ------- -------
tours       data    running   tours_root aggr0      file    file

Likewise, the "-node" parameter specifies a default node (or storage controller) to be used with any command which has an applicable "-node" parameter.

For both "-vserver" and "-node" you can return to the unspecified values by using "" (with no space in between):

cdot_mba1::> set -vserver ""

cdot_mba1::> vserver show
                    Admin     Root                  Name    Name
Vserver     Type    State     Volume     Aggregate  Service Mapping
----------- ------- --------- ---------- ---------- ------- -------
cdot_mba1   admin   -         -          -          -       -
cdot_mba1-01 node   -         -          -          -       -
tours       data    running   tours_root aggr0      file    file
3 entries were displayed.

cdot_mba1::> set
User Name:             admin
Profile Name:          admin
Privilege Level:       admin
Confirmation Messages: on
Show All Fields:       false
Show Field Separator:  ,
Data Units:            MB
Pagination Rows:       0
Default Vserver:
Default Node:
Stop On Error:         false

Finally, the "-stop-on-error" parameter specifies whether a continuing command will continue upon encountering an error or stop instead. The default is stop.

For all of these session settings, it's important to remember that they only affect the current session: upon logoff or disconnect any customizations you have made will be lost and the next session will use the default values instead.

Ok, that last section got pretty dry (display settings just aren't sexy, sorry), but in Part 3 we'll go over more advanced CLI uses with field options, queries, and extended queries. Trust me - it's more fun that sentence sounded!