If you’ve read any of my previous articles you’ll know that I’m a big fan of VIOS shared storage pools (SSP). I have been lambasted by a number of IBMers for using SSP instead of NPIV but my arguments are:
- SSPs are fast and will cope with 95%+ workloads on Power
- Why continue to use NPIV for everything when it’s so complicated. As IT specialists we are meant to reduce complexity.
- You don’t continue doing something the same way you’ve always done.
- Storage teams are used to the SSP concept as VMWare has been using Datastores for many years and these are very similar.
With the latest version of VIOS (126.96.36.199) and the SSP support we can do lots of useful things with SSPs that we couldn’t do before, such as creating tiers of storage.
Before we start I’ll clarify what an LU is. Basically, it’s a virtual disk which is contained within and managed by the SSP. This is equivalent to a volume in Storwize.
One of the things I’ve found to be a real pain is creating and mapping many SSP LUs to an LPAR. In the Classic HMC GUI we can only create and map a single LU at a time. Last year I had to create over 180 LUs for an LPAR. I would have lost the will to live if I’d used the HMC GUI to create and map these LUs.
It’s not often that we would need to create this many lus for an LPAR but this IBM i LPAR had quite a number of IASPs as well as SYSBAS.
So, what were my alternative options?
- Use the VIOS cfgassist menu options
- Use VIOS CLI commands
- Create a script to use the CLI commands
1 and 2 are much faster than the Classic HMC GUI but still prone to human error. 3 massively reduces errors and is very fast.
When we create an LU in an SSP we have two steps:
- Create a volume specifying attributes such as size and name
- Map the volume to an LPAR specifying the vhost device to link the LU to
The lu command in VIOS allows us to create and map a volume in a single command but when we have dual, redundant VIOS we need to run the mapping of the LU to the LPAR on both VIOS instances.
Creating the LUs
When you create an LU in VIOS it is immediately available and accessible to the other nodes in the SSP cluster. This means that the process of creating the LU is done once, whereas mapping needs to be executed on multiple VIOS instances.
To create a single lu in an SSP we can run:
This will create a thin provisioned lu called MY_LU which can grow to 100GB.
I created the following script, makessplu.ksh in VIOS to allow me to specify a start and end number for the LUs I wanted creating, in this case 1 to 183. The script accepts 4 parameters:
- Starting number for the LU sequence
- Ending number for the LU sequence
- LPAR name
- Size of the LUs in GB
To create my 183 LUs I opened a root shell using my aix alias (oem_setup_env) and then entered:
Once the script is complete all the nodes in the SSP have access to the 183 x 140GB LUs created so this script is only run once.
Note that the G on the end of the 140 is important. If you don’t specify this you will end up with 140MB LUs.
Mapping the LUs
With the LUs created I needed to map these to my LPAR. As we are using SSP the LUs are mapped to vhost devices in VIOS.
Because I always have dual, redundant VIOS the following script needs to be executed on the two VIOS which have the SCSI server devices mapped to the LPAR. Here’s the mapssplu.ksh script:
The IBM i LPAR I was working with only supported 16 LUs per vhost adapters which required me to split the mappings into batches. To map the first 16 LUs I ran:
Once completed LUs MYLPAR_L001 to MYLPAR_L016 were mapped to vhost0.
To map the remaining LUs I ran:
Once all the LUs were mapped I ran the same sequence of commands on the second VIOS to provide my storage redundancy. Make sure that your vhost names are the same on both LPARs before using copy and paste to execute these commands on the second VIOS.
And now, a new option
The scripts I created saved hours of my time and virtually removed human error and have been used by myself and my customers quite a lot over the last 18 months. You may have noticed that I mentioned that using the Classic HMC GUI was a poor option for me. The new Enhanced+ HMC GUI has been revamped to cover all aspects of SSP management making creating and mapping LUs a whole lot simpler.
Before you get too excited you will need to be running HMC V188.8.131.52 or above and there are Power firmware and HMC hardware prerequisites for HMC V184.108.40.206. Also,creating and mapping of each LU would still have to be done one at a time so it’s not quite there yet.
I’m slowly, but surely starting to feel the love for the new HMC GUI but there are still a number of areas where improvement is required by IBM, namely around the speed (or lack of) when using the new GUI.
Here’s an example of a listing of SSP LUs:
Here’s an example of creating and mapping a new SSP LU to and LPAR:
VIOS lu command: https://www.ibm.com/support/knowledgecenter/POWER7/p7hcg/lu.htm
Tricks of the Power Masters http://www.i5ibmi.altervista.org/php/index.php?action=downloadfile&filename=pSM2511.pdf&directory=-Annunci_V7R2_e_POWER8&PHPSESSID=ugaqcpa2vvme5vjeujgn9mn0m1
PowerVM Red Book: http://tinyurl.com/ot4jzhb