Over the last five years, I have worked with both SVC and the Storwize Vxxxx family of products with IBM i and AIX on Power Systems. SVC and Storwize share the same software stack and GUI. There are some functions which are only available in SVC but, predominantly, the configuration and management is the same. I’ll refer to V7000 here but this article also relates to SVC/V5000/V3700.
The GUI which comes with V7000 is ridiculously intuitive. I have seen long-in-the-tooth HP storage guys working very comfortably with the V7000 GUI after just two days. IBM i professionals who are new to external storage also become familiar with the V7000 very quickly because of the ease of use the GUI provides.
Anyone who has read any of my previous VIOS articles will know that I’m a sucker for using a CLI when it’s appropriate and it saves me time. For most of what I need to do with V7000, the GUI is just fine. But every once in a while the GUI is just too slow so the CLI comes to the rescue.
Which command to run
You may have noticed that when you carry out any operations on the V7000 GUI, a window shows the progress of the operation. You can click the “View more details” icon and the window will show the CLI commands being executed. This is a great place to start.
Notice that the command starts with svctask and then the command being executed. The svctask command was deprecated a few years ago, so you can ignore this.
How to access the CLI
The V7000 CLI uses the BASH shell so anyone familiar with Linux will be comfortable with the CLI. To access the CLI you’ll need an SSH client such as Putty. Simply point Putty at the management IP address of the V7000 and log in with the same credentials you would use to log in to the GUI.
For Linux and AIX users, you can simply use ssh to connect to the V7000 CLI. IBM i users can also use ssh (in Qshell or PASE) but should use the command with the -T option.
Some simple commands
The most obvious requirement is to look at the volumes configured on the V7000. To do this simply enter:
This will list out ALL of the volumes on your V7000. Notice that the command uses the term vdisk to refer to a volume. This is because the original terminology for a volume was vdisk.
To simplify this, lets look at a single volume call MYLPAR_L01, enter:
Now, you see the attributes for just that one volume (as below).
Let’s suppose you want to see all of the volumes for a particular LPAR, we can use the -filtervalue parameter to subset the list of volumes. Enter:
lsvdisk -filtervalue name=MYLPAR_L*
This returns a list of the volumes where the name starts with MYLPAR_L (as below).
This returns a list of the volumes where the name starts with MYLPAR_L.
You’ll notice that the data displayed with a heading row at the top. This is useful when we want to extract specific fields but I’ll cover that in my next article.
I find it easier to use the -nohdr parameter to make the output slightly easier to read:
lsvdisk -filtervalue name=MYLPAR_L* -nohdr
Also, when we use the CLI to loop through a selection of items we don’t want the header, just the raw data.
You may want the CLI to return the data in CSV format. To do this use the -delim parameter.
lsvdisk -filtervalue name=MYLPAR_L* -nohdr -delim
You could then copy this from your Putty session and paste it into your favourite spreadsheet application.
Another useful command is lsmdisk. This will list all of the managed disk (raid arrays) on your V7000:
As with lsvdisk, I could use -filtervalue to just list out the mdisks I am interested in.
Because the CLI uses the BASH shell, we can use tab expansion. So if you want to view all of the ls commands type in “ls” and then press the TAB key:
It’s all very well running a few simple commands as I’ve shown but what makes the CLI so powerful is being able to manipulate and take actions on the data returned from these commands. In future articles I will show you how to loop through and run commands against data sets as well as speeding up functions such as renaming multiple volumes.
Glenn Robinson has been PowerWire‘s resident tech tipster for over a decade. He has worked in the IBM computing arena since 1986 on System/34/36/38 and AS/400 through to Power Systems today.
As systems architect for IBM systems and storage at RSI Consulting, based in Northampton, UK, he works predominantly with IBM i clients as well as those using AIX and Linux. In the last five years, he has also had a great deal if experience working with Power customers using SVC and V7000 storage virtualisation.