Use the lshostvdiskmap command to display a list of volumes that are
mapped to a host. These volumes are the volumes that are recognized by the specified
host.
Syntax
lshostvdiskmap [ -nohdr ] [ -delimdelimiter ] [ { 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 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 1-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 you do not specify a host ID or name , the command
displays a list of all recognized volume mappings.
Description
This command displays a list of volume IDs and names. These volumes are the volumes that are
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 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 must be completed by 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 that are
mapped to AIX sddpcm.
Find the host that is defined to the system that corresponds with the host that you are
working with.
- The worldwide port names (WWPNs) are an attribute of the host bus adapter (HBA). You can
find the WWPNs by looking at the device definitions that are 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 specified HBA.
- 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: Consider this when you name your hosts. For example, if the actual host is called
orange, also name the host that is defined to the system
orange.
When you define the
hostname and the
vpath serial
number to the system, 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 for SCSI mappings.
- host_cluster_id
- Indicates the unique ID for a host system.
- host_cluster_name
- Indicates the unique name for a host system.
- vdisk_id
- Specifies the UID 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.
- NVMe_NSID
- Indicates NVMe namespace ID.
- protocol
- Indicates the protocol that is used by the hosts mapping this volume. The values are
scsi or nvme.
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 for a SCSI host
lshostvdiskmap host5
The resulting output:
id name SCSI_id vdisk_id vdisk_name vdisk_UID IO_group_id IO_group_name mapping_type host_cluster_id host_cluster_name protocol
5 host5 0 4 vdisk4 6005076400B10001A000000000000004 0 io_grp0 private scsi
5 host5 1 5 vdisk5 6005076400B10001A000000000000005 0 io_grp0 private scsi
5 host5 2 6 vdisk6 6005076400B10001A000000000000006 0 io_grp0 private scsi
5 host5 3 7 vdisk7 6005076400B10001A000000000000007 0 io_grp0 private scsi
An invocation example for an NVMe host
lshostvdiskmap 6
The resulting output:
id name SCSI_id vdisk_id vdisk_name vdisk_UID IO_group_id IO_group_name mapping_type host_cluster_id host_cluster_name protocol
6 nvmeServer6 8 vdisk8 A0000000000000080050760400B10001 0 io_grp0 private nvme
6 nvmeServer6 9 vdisk9 A0000000000000090050760400B10001 0 io_grp0 private nvme
6 nvmeServer6 10 vdisk10 A00000000000000A0050760400B10001 0 io_grp0 private nvme
6 nvmeServer6 11 vdisk11 A00000000000000B0050760400B10001 0 io_grp0 private nvme