Solved

What VIOS disks are mapped to which LPAR?

Posted on 2013-05-28
2
1,007 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
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!

wmp
0
 
LVL 1

Author Closing Comment

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

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 …
My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

911 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

19 Experts available now in Live!

Get 1:1 Help Now