POWER7 information

Creating a virtual target device on a Virtual I/O Server that maps to a file or logical volume

You can create a virtual target device on a Virtual I/O Server that maps the virtual Small Computer Serial Interface (SCSI) adapter to a file or a logical volume that is based on a storage pool.

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:

  • The Virtual I/O Server is at Version 1.5 or later. To update the Virtual I/O Server, see Updating the Virtual I/O Server.
  • At least one file is defined in a file storage pool, or at least one logical volume is defined in a logical volume storage pool on the Virtual I/O Server. For information, see Virtual storage and Storage pools.
  • 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.
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 file 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 file or logical volume, run the mkbdsp command:
    mkbdsp -sp StoragePool -bd BackingDevice -vadapter VirtualSCSIServerAdapter -tn TargetDeviceName
    Where:
    • StoragePool is the name of the storage pool that contains the file or logical volume to which you plan to map the virtual SCSI server adapter. For example, fbPool.
    • BackingDevice is the name of the file or logical volume to which you plan to map the virtual SCSI server adapter. For example, devFile.
    • VirtualSCSIServerAdapter is the name of the virtual SCSI server adapter. For example, vhost4.
    • TargetDeviceName is the name of the target device. For example, fbvtd1.

    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 logical 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
    vhost4   Available  Virtual SCSI Server Adapter
    vsa0     Available  LPAR Virtual Serial Adapter
    fbvtd1   Available  Virtual Target Device - File-backed Disk
  4. View the logical connection between the newly created devices by running the lsmap command. For example, running lsmap -vadapter vhost4 returns results similar to the following:
    SVSA     Physloc                     Client PartitionID
    -------------------------------------------------------
    vhost4   U9117.570.10C8BCE-V6-C2     0x00000000
    
    VTD              fbvtd1                               
    Status           Available
    LUN              0x8100000000000000
    Backing device   /var/vio/storagepools/fbPool/devFile 
    Physloc
    The physical location is a combination of the slot number, in this case 2, and the logical partition ID. The virtual device can now be attached from the client logical partition.
If you later need to remove the virtual target device and backup device (file or logical volume), use the rmbdsp command. An option is available on the rmbdsp command to remove the virtual target device without removing the backup device. A backup device file is associated with a virtual target device by inode number rather than by file name, so do not change the inode number of a backing device file. The inode number might change if you alter a backup device file (using the AIX rm, mv, and cp commands), while the backup device file is associated with a virtual target device.


Send feedback Rate this page

Last updated: Thu, April 05, 2018