lshostvdiskmap

Use the lshostvdiskmap command to display a list of volumes mapped to a given host. These are the volumes that are recognized by the specified host.

Syntax

 lshostvdiskmap    [  -nohdr  ]   [  -delim  delimiter  ]   [ {  host_id  |  host_name  } ]

Parameters

-nohdr
(Optional) By default, headings are displayed for each column of data in a concise style view, and for each item of data in a detailed style view. The -nohdr parameter suppresses the display of these headings.
Note: If there is no data to be displayed, headings are not displayed.
-delimdelimiter
(Optional) By default in a concise view, all columns of data are space-separated. The width of each column is set to the maximum possible width of each item of data. In a detailed view, each item of data has its own row, and if the headers are displayed, the data is separated from the header by a space. The -delim parameter overrides this behavior. Valid input for the -delim parameter is a one-byte character. If you enter -delim : on the command line, the colon character (:) separates all items of data in a concise view; for example, the spacing of columns does not occur. In a detailed view, the data is separated from its header by the specified delimiter.
host_id | host_name
(Optional) Specifies the host in terms of its ID or name. The command displays a list of all the volumes that are mapped to the specified host and the Small Computer System Interface (SCSI) ID by which they are mapped. If neither a host ID or name are entered, the command displays a list of all recognized volume mappings.

Description

This command displays a list of volume IDs and names. These are the volumes that have been mapped to the specified host; that is, they are visible to the specified host. The SCSI LUN ID is also displayed. This SCSI LUN ID is the ID by which the volume is recognized by the host.

Each volume that is exported by the clustered system (system) is assigned a unique virtual path (VPATH) number. This number identifies the volume and determines which volume corresponds to the volume that the hosts recognize. This procedure can only be completed using the command-line interface.

For a specific volume based on which operating system and multipath software are used, you can use different commands to determine the VPATH serial number. For example, issuing datapath query device finds the VPATH serial number for volumes mapped to AIX sddpcm.

Find the host that is defined to the system that corresponds with the host that you are working with.
  1. The worldwide port names (WWPNs) are an attribute of the host bus adapter (HBA). You can find these by looking at the device definitions stored by your operating system. For example, on AIX® they are in the Object Data Manager (ODM), in Windows® they are in the Device Manager details for the given HBA.
  2. Verify which host is defined to the system that these ports belong to. The ports are stored as part of the detailed view, so you must list each host in turn by issuing the following command:

    lshost host_name | host_id

    where host_name | host_id is the name or ID of the host. Check for matching WWPNs.
    Note: Name your hosts accordingly. For example, if the actual host is called orange, also name the host that is defined to the system orange.
When you have the hostname defined to the system and the vpath serial number, issue the following command:

lshostvdiskmap hostname

where hostname is the name of the host. A list is displayed. Look for the volume UID that matches the vpath serial number and record the volume name or ID.
The command returns the following values:
id
Indicates the host ID in the output for lshostvdiskmap.
name
Indicates the host name in the output for lshostvdiskmap.
SCSI_id
Specifies the SCSI ID.
host_cluster_id
Indicates the unique ID for a host system.
host_cluster_name
Indicates the unique name for a host system.
vdisk_id
Indicates the ID of the volume.
vdisk_name
Indicates the name of the volume.
vdisk_UID
Indicates the UID of the volume.
IO_group_id
Indicates the ID of the input/output (I/O) group in which the host volume mapping exists.
IO_group_name
Specifies the name of I/O group in which the host volume mapping exists.

An invocation example

lshostvdiskmap -delim : 2

The resulting output:

id:name:SCSI_id:host_id:host_name:vdisk_id:vdisk_name:vdisk_UID:IO_group_id:IO_group_name
2:host2:0:5:vardy1:10:vdisk10:6005076801958001500000000000000A:0:iogrp0
2:host2:1:4:vardy2:11:vdisk11:6005076801958001500000000000000B:1:iogrp1
2:host2:2:3:vardy3:12:vdisk12:6005076801958001500000000000000C:0:iogrp0
2:host2:3:2:vardy4:13:vdisk13:6005076801958001500000000000000D:1:iogrp1
2:host2:4:1:vardy5:14:vdisk14:6005076801958001500000000000000E:1:iogrp0 

An invocation example

lshostvdiskmap 0

The resulting output:

id name   SCSI_id host_id host_name vdisk_UID                        IO_group_id IO_group_name mapping_type host_cluster_id host_cluster_name
0  vdisk0 0       1       hvlab02c2 6005076801D901A3F800000000000000 0           io_grp0       shared       0               VMware
0  vdisk0 0       4       vmlab02c1 6005076801D901A3F800000000000000 0           io_grp0       shared       0               VMware
0  vdisk0 0       5       vmlab02c2 6005076801D901A3F800000000000000 0           io_grp0       shared       0               VMware
0  vdisk0 0       24      vmlab14c1 6005076801D901A3F800000000000000 0           io_grp0       shared       0               VMware
0  vdisk0 0       25      vmlab14c2 6005076801D901A3F800000000000000 0           io_grp0       shared       0               VMware
0  vdisk0 0       26      vmlab15   6005076801D901A3F800000000000000 0           io_grp0       private