LPAR Storage_HOWTO

Problem:
Mapping Virtual Disks to Physical Disks

Solution
This procedure shows how to map a Virtual SCSI disk on an AIX client logical partition to the physical device (disk or logical volume) on the Virtual I/O Server.
To map a virtual disk to a physical disk, the following information is needed and will be gathered during this procedure:

Virtual device name
Slot number of the Virtual SCSI client adapter
Logical unit number (LUN) of the Virtual SCSI device
Client partition ID

Follow these steps to map a virtual disk on an AIX client logical partition to its physical disk on the Virtual I/O Server:
1. Display Virtual SCSI device information on the AIX client logical partition by typing the following command:
lscfg -l devicename
The output looks similar to the following:
U9117.570.1012A9F-V3-C2-T1-L810000000000  Virtual SCSI Disk Drive
2. Record the slot number, which is located in the output, following the card location label C. This identifies the slot number of the Virtual SCSI client adapter. In this example, the slot number is 2. The number following the label V is the partition ID for the current partition. In this example, the partition ID number is 3.
3. Record the LUN, which is located in the output, following the LUN label L. In this example, the LUN is 810000000000.
4. If you have multiple Virtual I/O Server partitions running on your system, determine which Virtual I/O Server partition is serving the Virtual SCSI device. This can be determined by using the slot number of the client adapter that is linked to a Virtual I/O Server, and a server adapter. Use the HMC command line to list information about Virtual SCSI client adapters in the client logical partition.
Log in to the HMC, and from the HMC command line, type the lshwres command. Specify the managed console name for the -m parameter and the client partition ID for the lpar_ids parameter and the client slot ID for the slots parameter.
NOTES:

The managed console name, which is used for the -m parameter, can be determined by typing lssyscfg -r sys -F name from the HMC command line.
Use the client partition ID and the slot ID recorded in step 2 for the -lpar_ids and slots parameter.

For example:
lshwres -r virtualio --rsubtype scsi -m power5cec --filter lpar_ids=3,slots=2
Your results should look similar to the following:
lpar_name=vioc2,lpar_id=3,slot_num=2,state=null,adapter_type=client,remote_lpar_id=1,
             remote_lpar_name=vios2,remote_slot_num=2,is_required=1,backing_devices=none
Record the name of the Virtual I/O Server located in the remote_lpar_name field, the partition ID of the Virtual SCSI server which is located in the remote_lpar_id field and the slot number of the virtual scsi device on the VIO server which is located in the remote_slot_num field. In this example, the name of the Virtual I/O Server is vios2, the Virtual I/O Server partition ID is 1, and the slot number of the Virtual SCSI server adapter is 2.
5. Log in to the Virtual I/O Server.
6. List virtual adapters and devices on the Virtual I/O Server by typing the following command, and filter out the partition ID and slot you recorded in step 4. This will list the vhost#
lsmap –all | grep V1-C2
7. You should see Virtual SCSI server adapter (vhostX) which has a slot ID that matches the remote slot ID recorded in step 4. You should see something on that adapter, run the following command:
lsmap -vadapter devicename
8. From the list of devices, match the LUN recorded in step 4 with LUNs listed. This is the physical device.