lshostvdiskmap

You can use the lshostvdiskmap command to obtain a list of the virtual disks that are mapped (visible) to a given host.

Syntax

Read syntax diagramSkip visual syntax diagram>>- svcinfo -- -- lshostvdiskmap -- --+----------+-- ----------->
                                      '- -nohdr -'

>--+-----------------------+-- --+-------------+---------------><
   '- -delim -- delimiter -'     +- host_id ---+
                                 '- host_name -'

Parameters

-nohdr
By default, headings are displayed for each column of data (in a concise style view), and each item of data (in a detailed style view). Using the -nohdr parameter will suppress the display of these headings.
Note:Note: If there is no data to be displayed (for example, an empty view has been returned), then headings are not displayed irrespective of whether the -nohdr option was used or not.
-delim delimiter
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. Using the -delim parameter will override this behavior. Valid input for the -delim parameter is a one byte character. If, for example, you entered -delim : a colon will be used to separate all items of data in a concise view (for example, the spacing of columns does not occur) and in a detailed view the data is separated from its header by a colon.
host_id | host_name
Optionally specifies the host in terms of its ID or name. The SAN Volume Controller returns a list of all the virtual disks that are mapped to the specified host and the SCSI ID by which they are mapped. If neither a host ID or name are entered, the command will return a list of all the host to VDisk mappings that can be seen.

Description

This command returns a list of virtual disk IDs and names. These are the virtual disks that have been mapped to the specified host, that is, they are visible to the specified host. The SCSI LUN ID is also shown. This SCSI LUN ID is the ID by which the virtual disk is being presented to the host.

Determining the VDisk name from the vpath number on the host: Each VDisk exported by the SAN Volume Controller is assigned a unique vpath number. This number uniquely identifies the VDisk and can be used to determine which VDisk corresponds to the volume that the hosts sees. This procedure can only be performed using the command line interface.

For the volume in question, find the vpath serial number by issuing the datapath query device command. Find the host object defined to the SAN Volume Controller that corresponds with the host you are working with.

  1. The WWPNs are an attribute of the HBA. You can find these by looking at the device definitions stored by your operating system. For example, on AIX they will be in the ODM, in Windows they will be in the Device Manager details for the given HBA.
  2. Verify which host object defined to the SAN Volume Controller that these ports belong to. The ports are stored as part of the detailed view, so you will need to list each host in turn by issuing the following:
    svcinfo lshost <name/id>
    where <name/id> is the name or ID of the host. Check for matching WWPNs.
    Note:Note: You should name your hosts accordingly, for example, if the actual host is called orange you should also name the host object defined to the SAN Volume Controller as orange.

Now that you have the <host name> as defined to the SAN Volume Controller and the <vpath serial number>, issue the following command:
svcinfo lshostvdiskmap <hostname>
where <hostname> is the name of the host. A list is displayed. Look for the VDisk UID that matches the <vpath serial number> and remember the VDisk name or ID.

Possible failures

Examples

An invocation example

svcinfo lshostvdiskmap -delim : 2

The resulting output

id:name:SCSI_id:vdisk_id:vdisk_name:wwpn:vdisk_UID
2:host2:0:10:vdisk10:0000000000000ACA:6005076801958001500000000000000A
2:host2:1:11:vdisk11:0000000000000ACA:6005076801958001500000000000000B
2:host2:2:12:vdisk12:0000000000000ACA:6005076801958001500000000000000C
2:host2:3:13:vdisk13:0000000000000ACA:6005076801958001500000000000000D
2:host2:4:14:vdisk14:0000000000000ACA:6005076801958001500000000000000E 

(C) Copyright International Business Machines Corporation 2003, 2004