Informing the IBM Community

Creating and Mapping multiple LUs in SSP


draws gear to success concept

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:

  1. SSPs are fast and will cope with 95%+ workloads on Power
  2. Why continue to use NPIV for everything when it’s so complicated. As IT specialists we are meant to reduce complexity.
  3. You don’t continue doing something the same way you’ve always done.
  4. Storage teams are used to the SSP concept as VMWare has been using Datastores for many years and these are very similar.

Rant over!!!!

With the latest version of VIOS ( 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?

  1. Use the VIOS cfgassist menu options
  2. Use VIOS CLI commands
  3. 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:

GR Mar fig01

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

GR Mar fig02

To create my 183 LUs I opened a root shell using my aix alias (oem_setup_env) and then entered:

GR Mar fig03

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:

GR Mar fig04

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:

GR Mar fig04b

Once completed LUs MYLPAR_L001 to MYLPAR_L016 were mapped to vhost0.

To map the remaining LUs I ran:

GR Mar fig05

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 V8.8.4.0 or above and there are Power firmware and HMC hardware prerequisites for HMC V8.8.4.0. 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:

Fig1 - LUs

Here’s an example of creating and mapping a new SSP LU to and LPAR:

Fig2 - ADDLU



VIOS lu command:

Tricks of the Power Masters

PowerVM Red Book:


How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.