Solved

What VIOS disks are mapped to which LPAR?

Posted on 2013-05-28
2
986 Views
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!
0
Comment
Question by:g0all
2 Comments
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
Comment Utility
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!

wmp
0
 
LVL 1

Author Closing Comment

by:g0all
Comment Utility
How can I thank you, wmp? :)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
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.:

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now