Use the mkvdiskhostmap command to create a new mapping between a volume and a host, which makes the volume accessible for input/output (I/O) operations to the specified host.
This command creates a new mapping between the volume and the specified host. The volume is presented to the host as if the disk is directly attached to the host. It is only after this command is processed, that the host can perform I/O transactions to the volume.
Optionally, you can assign a SCSI LUN ID to the mapping. When the HBA in the host scans for devices that are attached to it, it discovers all volumes that are mapped to its Fibre Channel ports. When the devices are found, each one is allocated an identifier (SCSI LUN ID). For example, the first disk found is usually SCSI LUN 0, and so on. 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, the cluster automatically assigns the next available SCSI LUN ID, if any mappings already exist with that host. When you issue the mkvdiskhostmap command, the assigned SCSI LUN ID number is returned.
If you generate different SCSI LUN IDs, only one is returned. The returned ID is for the highest-numbered I/O group to which the volume was mapped. To view other values, issue lshostvdiskmap or lsvdiskhostmap.
The SCSI LUN ID is used for the highest numbered I/O group to which the volume is mapped.
When the device driver scans the HBA, it must stop after identifying volumes 1 and 2, because no SCSI LUN is mapped with ID 3. For optimal performance, ensure that the SCSI LUN ID allocation is contiguous.
mkvdiskhostmap -host host1 -force 4 mkvdiskhostmap -host host2 -force 4I would imagine this would be more clear if it spoke of assigning the same volume to multiple hosts. There should probably also be mention of clustered hosts here as this is a large use case for assigning a volume to multiple hosts. And when doing this, you very often want to have the SCSI ID the same for all hosts.
These commands create two host-to-volume mappings for volume 4 that map to host1 and host2. Omitting the -force parameter causes the mapping to fail if that volume is already mapped to a host.
The command also fails if the host object (to which this mapping is being made) is not associated with the I/O group containing the volume.
mkvdiskhostmap -host host1 -scsi 1 5
The resulting output:
Virtual Disk to Host map, id [1], successfully created