LPAR and vio disk mapping

We have a frame the uses 2 vios that assign disk storage to LPAR's. We have a LPAr with multiple disk and I want to know how do I tell which vio is serving the disk. For example the LPAr has hdisk 0, 1, 2, 3 all the same size. I want to know which vio is serving hdisk0, 1.

If you are using SAN and your servers are set up properly, the disks will be served by both VIO servers.

You can log into the vio servers and use switches with the lsmap command to view disk mappings.

use lspath and iostat -m # # to find which mpio-path is currently used.

As far as I know, only the HMC shows which client-vscsi devies connects to a vio-vhost.

There are a number of configurations and ways to figure out which VIO server is presenting a disk to an LPAR. Hopefully the instructions below will at least point you in the right direction.

If you are not using MPIO on the client side (LPAR), you can track down a physical disk (or LUN) by using the Physical Location code (Physloc) by running the following commands:

on the client LPAR (assuming you want to find hdisk0) run this command:
lscfg -l hdisk0 -vps
You will see a line similar to this:
hdisk0 U8204.E8A.xxxxxxx-V5-C21-T1-L810000000000
The number after 'C' is the slot for the Virtual Adapter that you assigned on your HMC - in this case it is 21. You will also see this number on your HMC.

on your VIO server(s) run this command as padmin:
lsmap -all
You will see lines similar to these:
SVSA Physloc Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0 U8204.E8A. xxxxxxx-V2-C21 0x00000005

The C21 means that this VIO server is presenting the disk to your LPAR (also take note of the Client Partition ID - you can also run lparstat -i on your client LPAR to verify that it is correct)

Now, one thing to keep in mind is that you can assign the same Virtual Adapter slot number on BOTH VIO servers - for example C21 can be assigned to the same LPAR from both VIO1 and VIO2. If that is the case then you are probably using MPIO on your LPARs.

to find out if you are using MPIO run lspath on your LPARs. If you see more than one vscsi device for the same hdisk, then you are using MPIO. To find the current active path to your VIO server, run the following command from your LPAR:
for i in `lspath -l hdisk0 -F"parent"`; do lscfg -vl $i; done
you will see the C## slot numbers again, which can be used to track the disk back to you VIO server using the lsmap -all command I described above.

I hope this helps.

Dave

1 Like

Not being patronising Dave but that is one of the most comprehensive answers I have seen in a long time. Very helpful indeed and reminded me on how to map drives on VIO / LPAR!