Clustered ONTAP offers two notable shells to cluster admins. These two shells are:
- Clustershell – the native shell that you use to perform general cluster-wide configuration and management tasks
- Nodeshell – the special shell that you can use to execute a subset of ONTAP 7-mode commands and perform node-specific tasks
You are in the clustershell automatically when you log in to the cluster via Clustered ONTAP CLI. Clustershell allows you to execute all commands to configure and manage the cluster. For instance, you use it to create and manage Vservers and LIFs. The blog post How to Create an iSCSI LIF shows an example of the clustershell usage.
Within the clustershell you can also execute 7-mode commands. But you can only do so one command at a time. The syntax is node run –node <node_name> <7-mode command>. An example of using this method to create an aggregate snapshot on Clustered ONTAP can be found here.
Basically, you prefix the 7-mode command with node run –node <node_name>; and you do it for every 7-mode command you want to run in the clustershell. Obviously, this is not very efficient if you want to run a series of 7-mode commands and that’s where nodeshell becomes handy.
Nodeshell provides you an environment to execute 7-mode commands interactively on Clustered ONTAP. From a clustershell, you enter nodeshell using the command node run –node <node_name>, as shown in Figure 1.
Fig.1 Invoking nodeshell from clustershell
Note, the prompt changes from f3240-sqltest::> (clustershell) to f3240-sqltest-02> (nodeshell). To exit the nodeshell, simply type exit or Ctrl+D. This brings you back to the clustershell.
Suppose you want to check the status of Flash Cache, you use the command options flexscale. Finding it is not enabled, you try to enable it using options flexscale.enable on; but it was not successful. So, you issue the command sysconfig to see if Flash Cache is installed on the node. And it turns out there is no Flash Cache card inside the node (see Figure 2).
Fig. 2 Nodeshell in action
You can execute all these 7-mode commands within one single nodeshell session. When you are done, simply type exit to logout the nodeshell and go back to the clustershell.
There is also a third shell, called systemshell, which is intended for low-level troubleshooting tasks. It is less often used than the other two shells. Systemshell should only be used under the guidance from NetApp tech support.
Thanks for reading.