Troubleshooting
Problem
This document describes how to cross-reference (device mapping) IBM i disk units with VIOS disk units.
Resolving The Problem
At some point, you may need to know the physical location of the virtual disk units. This information might be needed for performance measurements or service, or you might need to be able to translate to and from IBM i to VIOS to the physical devices (including an external disk, if relevant). This document describes how to map the i drives to the VIOS drives and then to the physical disks.
With HMC version 7.3.4 SP2 or later you can see the device mapping from the HMC if the server is HMC Managed.
1. Select the server and then under Tasks->Configuration->Virtual Resources->Virtual Storage Management:
2. Select Virtual Storage Management.
3. Then select the Physical Volumes tab.
Select the VIOS Partition, select the task Hardware Information -> Virutal I/O Adapters -> SCSI :
You will then see which drives on System i are mapped to which hdisks and vhosts in VIOS:
HMC Command Line Interface:
With HMC 7.3.5 or later, VIOS 2.1.2.x, and IBM i R6.1.1 or later with PTF Fixes R710: MF55534,R611: MF55578 you can run commands from the HMC command line to show the device mapping.
To get the system name run the command:
lssysconn -r all
This will give a list of server names that are managed by this HMC. Copy the system name of the system you are interested in:
Then use the system name in the following commands:
<adapter type> = fc (fibre channel), scsi, eth (ethernet)
lshwres -m <system name> -r virtualio --rsubtype <adapter type> --level lpar -F topology
To run the command for specific LPAR Ids:
lshwres -m <system name> -r virtualio --rsubtype <adapter type> --level lpar --filter "\"lpar_ids=xx,yy\"" -F lpar_id,topology where xx and yy are LPAR IDs.
example of output:
Single Adapter Client Partition
From the operating system, you see the disk units as follows:
If this is an IVM environment, the disk units look like the following in IVM:
In IVM, the Hardware Inventory shows the location code of the virtual SCSI devices:
The last part of the location code is the controller number. For example, the location code for vtscsi0 is U7998.61X.10001BA-V1-C11-L3. This means that vtscsi0 is controller 3 and, therefore, is equivalent to disk unit YVAPLL25LVRV. Back on the Display Disk Unit Details screen, if you press F9, you can return to the Display Disk Units screen, and you can see that YVAPLL25LVRV is DD001.
Now we must map the virtual SCSI to the hdisk IDs and the LUN. To do this, you must get a CLI (Command Line Interface) to VIOS. You can use lsmap -all, which lists all devices, or you can use lsmap -vadapter vhost0. You can find the adapter by looking at the location code of the vtscsi devices and then finding the adapter that is at the same location.
Example
vhost0 Available Virtual SCSI Server Adapter U7998.61X.10001BA-V1-C11 |
So, vtscsi0 is equivalent to hdisk9 and the LUN is 0x83.
Another way to do this mapping is by calculating the LUN from the Controller number. Back on the Display Disk Unit Details screen, we know that DD001 is on Controller 3. You should convert the controller number from decimal to hex and then add 0x80. In this case, Decimal 3 = 0x03 + 0x80 = 0x83. Looking at the lsmap, we can see the LUN 0x083 is hdisk9.
For systems that have more than 16 devices on the VSCSI adapter, you can still do this conversion. For example:
DISK UNIT 6B22-050 YG8XRWRA8SAP DMP006 1/ 255/128/ 22-2/ / 0/20/ 0/ This is disk controller 20.
20 Decimal = 14 Hex
0x80 + 0x14 = 0x94
From lsmap:
LUN 0x9400000000000000
Mapping the i drive to the correct hdisk becomes important if you ever want to remove disk units from the partition. After you have removed the disk unit from the ASP, you must be able to determine which hdisk to remove from the partition profile.
NOTE:
For 4096 disk sector support at 7.2 with D/TD840 or D/T6B4E-050 drives,
Please see http://www.ibm.com/support/docview.wss?uid=nas8N1020957 for minimum firmware levels and PTFs.
** NOTE**
Concurrent removal of external and virtual storage devices whether configured or non-configured is NOT
supported by IBM i.
The support statement isn't limited to virtual (attached) disk. Removing external storage LUNs from an active
partition is NOT supported on IBM i, regardless of whether they are attached natively or via a virtual adapter.
Virtual SCSI disks are also considered "external" storage by the client even when the backing hardware on the
server partition are internal storage.
As for removing the volume group, it doesn't matter how they are connected (vSCSI, NPIV, or Natively), the volumes
should always be removed from the configuration first, then the partition shut down, then the volume group can be destroyed/removed.
The partition should be shutdown prior to removing or unassigning and virtual disk units or LUNs.
Multiple Adapter Client Partition
If you need to identify disks, you will need to know which virtual adapter (vhost) has the correct mapping. In this case, we need to look at the SYS Card identifier. This number identifies the client adapter ID in the partition you are working with.
Shown below is an example of a client partition with 31 drives. The drives would have to be connected to at least two different virtual server/client SCSI adapters:
In a multiple adapter environment, the controller number is not unique. Therefore, you also need to determine which adapter you are looking at. To do this, you need to use the Sys Card Number from the Display Disk Unit details above. You may use either HMC or IVM to view the partition properties. Partition ID 4 has two client adapters. They connect to server adapters 401 and 403, respectively. View the server partition properties – virtual adapters tab to see the information.
Type | Server SCSI Adapter ID | Client Partition | Client SCSI Adapter |
Server SCSI | 401 | LPAR4 | 145 |
Server SCSI | 403 | LPAR4 | 147 |
From VIOS command line interface:
Looking at our lsmap command, we see that vhost6 connects to partition ID 4. We can also see the location code for vhost6 is equal to U9117.MMA.1007E34-V1-C403.
VIOS Command line Interface (CLI) on VIOS 2.1.2.x, and IBM i R6.1.1 or later
If this is an IVM environment with multiple SCSI adapters you can use the following command to map the disks
Use this command to get the system name:
lssyscfg -r sys -F name
Use the system name as input into the following command:
lshwres -m <system name> -r virtualio --rsubtype scsi --level lpar -F topology
The output will look something like the following:
From this output, you can see that DD006 maps to hdisk29 on vhost0.
Explanation of the system card number
Above in the multiple adapter example disk unit’s details showed that the Sys Card field was 145 for 16 of the drives, and 147 for the remaining 15. Why is the sys card field a different number than the HMC or IVM adapter ID? The Sys Card field wraps at 256. So if you add 145 and 256, you get 401. Likewise, if you add 147 and 256, you get 403. We also need to keep in mind that it is possible to have more than one Sys Card of the same number because customers can configure the adapter ID. For example, looking at an IBM i partition disk unit details there are 62 disk units in various ASPs. There are two Sys Card 33s listed in the details.
Looking at the partition properties, you see the following:
Type | Adapter ID | Connecting Partition | Connecting Adapter |
Server SCSI | 801 | LPAR1 | 801 |
Server SCSI | 33 | LPAR4 | 33 |
U9117.MMA.1007E34-V1-C801 = vhost1
U9117.MMA.1007E34-V1-C33 = vhost2
256 + 256 + 256 + 33 = 801
33 = 33
[{"Product":{"code":"SSPHKW","label":"PowerVM Virtual I\/O Server"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"--","Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]
Historical Number
481468986
Was this topic helpful?
Document Information
Modified date:
19 February 2022
UID
nas8N1013791