306 Implementing the IBM Storwize V7000 with IBM Spectrum Virtualize V8.2.1
When the HBA on the host scans for devices that are attached to it, the HBA discovers all of 
the volumes that are mapped to its FC ports and their SCSI identifiers (SCSI LUN IDs). 
For example, the first disk that is found is generally SCSI LUN 1. You can control the order in 
which the HBA discovers volumes by assigning the SCSI LUN ID as required. If you do not 
specify a SCSI LUN ID when mapping a volume to the host, the storage system automatically 
assigns the next available SCSI LUN ID, based on any mappings that exist with that host.
Example 7-21 shows how to map volumes volume_B and volume_C to defined host Almaden by 
using mkvdiskhostmap command. 
Example 7-21   The mkvdiskhostmap command
IBM_Storwize:ITSO:superuser>mkvdiskhostmap -host Almaden volume_B
Virtual Disk to Host map, id [0], successfully created
IBM_Storwize:ITSO:superuser>mkvdiskhostmap -host Almaden  volume_C                                                              
Virtual Disk to Host map, id [1], successfully created
Example 7-22 shows the output of the lshostvdiskmap command, which shows that the 
volumes are mapped to the host.
Example 7-22   The lshostvdiskmap -delim command
IBM_2145:ITSO_CLUSTER:superuser>lshostvdiskmap -delim : 
id:name:SCSI_id:vdisk_id:vdisk_name:vdisk_UID
2:Almaden:0:26:volume_B:6005076801AF813F1000000000000020
2:Almaden:1:27:volume_C:6005076801AF813F1000000000000021
Certain HBA device drivers stop when they find a gap in the sequence of SCSI LUN IDs, as 
shown in the following examples:
/SM590000Volume 1 is mapped to Host 1 with SCSI LUN ID 1.
/SM590000Volume 2 is mapped to Host 1 with SCSI LUN ID 2.
/SM590000Volume 3 is mapped to Host 1 with SCSI LUN ID 4.
When the device driver scans the HBA, it might stop after discovering volumes 1 and 2 
because no SCSI LUN is mapped with ID 3. 
If you are using host clusters, use the mkvolumehostclustermap command to map a volume to 
a host cluster instead (see Example 7-23).
Example 7-23   The mkvolumehostclustermap command
BM_Storwize:ITSO:superuser>mkvolumehostclustermap -hostcluster vmware_cluster 
UNCOMPRESSED_VOL
Volume to Host Cluster map, id [0], successfully created
Assigning a specific LUN ID to a volume: The optional -scsi scsi_lun_id parameter 
can help assign a specific LUN ID to a volume that is to be associated with a host. The 
default (if nothing is specified) is to assign the next available ID based on current volume 
mapped to the host.
Important: Ensure that the SCSI LUN ID allocation is contiguous.