Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1232
  • Last Modified:

What VIOS disks are mapped to which LPAR?

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
g0all
Asked:
g0all
1 Solution
 
woolmilkporcCommented:
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
 
g0allAuthor Commented:
How can I thank you, wmp? :)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now