Creating a virtual target device on a Virtual I/O Server that maps to a physical or logical volume, tape or physical optical device

You can create a virtual target device on a Virtual I/O Server that maps the virtual SCSI adapter to a physical disk, tape, or physical optical device, or to a logical volume that is based on a volume group.

The following procedure can be repeated to provide additional virtual disk storage to any client logical partition.

Before you start, ensure the following statements are true:

  1. At least one physical volume, tape, or optical device, or logical volume is defined on the Virtual I/O Server. For information, see Logical volumes.
  2. The virtual adapters for the Virtual I/O Server and the client logical partitions are created. This usually occurs during the creation of the logical partition profile. For information about creating the logical partition, see Installing the Virtual I/O Server.
  3. Be aware of the maximum transfer size limitation when you use AIX® clients and physical devices. If you have an existing and active AIX client, and you want to add another virtual target device to the virtual SCSI server adapter used by that client, ensure that the max_transfer attribute is the same size or larger than the devices already in use.
Tip: If you are using the HMC, version 7 release 3.4.2 or later, you can use the HMC graphical interface to create a virtual target device on the Virtual I/O Server.

To create a virtual target device that maps a virtual SCSI server adapter to a physical device or logical volume, complete the following steps from the Virtual I/O Server command-line interface:

  1. Use the lsdev command to ensure that the virtual SCSI adapter is available. For example, running lsdev -virtual returns results similar to the following:
    name     status     description
    ent3     Available  Virtual I/O Ethernet Adapter (l-lan)
    vhost0   Available  Virtual SCSI Server Adapter
    vhost1   Available  Virtual SCSI Server Adapter
    vsa0     Available  LPAR Virtual Serial Adapter
    vtscsi0  Available  Virtual Target Device - Logical Volume
    vtscsi1  Available  Virtual Target Device - File-backed Disk
    vtscsi2  Available  Virtual Target Device - File-backed Disk
  2. To create a virtual target device, which maps the virtual SCSI server adapter to a physical device or logical volume, run the mkvdev command:
    mkvdev -vdev TargetDevice -vadapter VirtualSCSIServerAdapter
    Where:
    • TargetDevice is the name of the target device, as follows:
      • To map a logical volume to the virtual SCSI server adapter, use the name of the logical volume. For example, lv_4G.
      • To map a physical volume to the virtual SCSI server adapter, use hdiskx. For example, hdisk5.
      • To map an optical device to the virtual SCSI server adapter, use cdx. For example, cd0.
      • To map a tape device to a virtual SCSI adapter, use rmtx. For example, rmt1.
    • VirtualSCSIServerAdapter is the name of the virtual SCSI server adapter.
    Note: If needed, use the lsdev and lsmap -all commands to determine the target device and virtual SCSI server adapter that you want to map to one another.

    The storage is available to the client logical partition either the next time it starts, or the next time the appropriate virtual SCSI client adapter is probed (on a Linux® logical partition), or configured (on an AIX logical partition), or appears as a either a DDXXX or DPHXXX device (on an IBM® i partition).

  3. View the newly created virtual target device by running the lsdev command. For example, running lsdev -virtual returns results similar to the following:
    name     status     description
    vhost3   Available  Virtual SCSI Server Adapter
    vsa0     Available  LPAR Virtual Serial Adapter
    vtscsi0  Available  Virtual Target Device - Logical Volume
    vttape0  Available  Virtual Target Device - Tape
  4. View the logical connection between the newly created devices by running the lsmap command. For example, running lsmap -vadapter vhost3 returns results similar to the following:
    SVSA      Physloc                    Client PartitionID
    -------------------------------------------------------
    vhost3    U9111.520.10DDEEC-V1-C20   0x00000000
    
    VTD                     vtscsi0  
    Status                  Available
    LUN                     0x8100000000000000  
    Backing device          lv_4G
    Physloc
    The physical location is a combination of the slot number, in this case 20, and the logical partition ID. The storage is now available to the client logical partition either the next time it starts, or the next time the appropriate virtual SCSI client adapter is probed, or configured.
If you later need to remove the virtual target device, you can do so by using the rmvdev command.