Go Premium for a chance to win a PS4. Enter to Win


What VIOS disks are mapped to which LPAR?

Posted on 2013-05-28
Medium Priority
Last Modified: 2013-05-29
Hi wmp,

Some LPAR's in my ORG are decommissioned, and storage must be decommissioned too.
Can you please help me see matching between a specific hostname and a disk provided by VIOS?

Thank you!
Question by:g0all
LVL 68

Accepted Solution

woolmilkporc earned 2000 total points
ID: 39204157
Hi g0all,

I'll assume that the profiles of those LPARS do still exist on HMC.

Hostnames are of no meaning at all here, we can only use the LPAR names as defined on the HMC!

Further I'll assume that the managed system is called "mysys", that the LPAR in question is named "mylpar" and that your VIO servers are "VIO1" and "VIO2".

1) Log in to the HMC as hscroot to find out the concerned slots:

lshwres -m mysys --level lpar -r virtualio --rsubtype scsi --filter "lpar_names=mylpar" -F "lpar_name slot_num remote_lpar_name remote_slot_num adapter_type"

You should see something like this (example!):

mylpar 5 VIO1 4 client
mylpar 4 VIO2 4 client

This means that slot 5 ("local slot") of "mylpar" is connected to slot 4 ("remote slot") of the VIO partition "VIO1" and that slot 4 of "mylpar" is connected to slot 4 of the VIO partition "VIO2".

2) Log in to the VIO servers as "padmin" to find out the vhosts serving the "remote slots":

VIO1 and VIO2 (same slot, accidentally):

lsdev -slots |grep -- "-C4"

The digit "4" following "-C" is the remote slot number as obtained with the command in (1).

You should see something like this (example!):

U9117.MMB.01234AB-V3-C4      Virtual I/O Slot  vhost9

Now you know that the virtual scsi host adapter serving your LPAR on this particular VIO is vhost9.

3) Still on VIO as "padmin": Find out which disks are served by this vhost:

lsmap -vadapter vhost9

You should see something like (example!):

SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost9          U9117.MMB.01234AB-V3-C4                      0x0000000b

VTD                   mylpar-disk1
Status                Available
LUN                   0x8000000000000000
Backing device        hdisk149
Physloc               U5802.001.008C123-P1-C7-T1-W5005123123123123-L4010402C00000000
Mirrored              false

VTD                   mylpar-disk2
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk12
Physloc               U5802.001.008C123-P1-C6-T1-W5005123123123123-L4010402D00000000
Mirrored              false


Now you know that this VIO server maps hdisk149 (as LUN 8000...) and hdisk12 (as LUN 8100...) to the LPAR "mylpar" etc.

My example above shows disks of a DS8000. With such a storage server you can determine the volume ID from the location code.
It's the first 4 digits following "L" with both leading "40"s stripped:

L4010402D00000000 -> Volume ID 102D

Other storage servers provide different LUN structures, please consult the docs.

4) If the LPAR is still up and running you can search the disks there:

On "mylpar":

lscfg | grep hdisk | grep L80

You'll see for example:

* hdisk3           U9117.MMB.01234AB-V11-C5-T1-L800000000000  Virtual SCSI Disk Drive

"C5" tells you that the disk is coming from VIO1 ("local slot" is "5" which is mapped to "remote slot" "4" on VIO1, see the output under (1) above).
"L8000..." tells you that it's LUN "8000...", so hdisk3 on "mylpar" is mapped to the disk hdisk149 on VIO1.

Repeat the above "lscfg .. grep .." sequence for all LUNs found in (3).

Have fun!


Author Closing Comment

ID: 39204167
How can I thank you, wmp? :)

Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question