Go to main content

Oracle® VM Server for SPARC 3.6 Administration Guide

Exit Print View

Updated: September 2019
 
 

Managing Virtual SCSI HBAs

For more information about the commands that are shown in this section, see the ldm(8) man page.

Obtaining Physical SCSI HBA Information

Before you configure a virtual SCSI HBA, you must obtain information about the physical SCSI HBAs that are attached to the service domain. For more information about configuring HBA cards in I/O domains, see Configuring I/O Domains.


Note - If at least the Oracle Solaris 11.3 OS is installed in the primary domain, the service domain can be the control domain.

The ldm list-hba command lists the physical SCSI HBA initiator ports for the specified active domain. After identifying a logical domain's SCSI HBA initiator ports, you can specify a particular initiator port on the ldm add-vsan command line to create a virtual SAN. See the ldm(8) man page.

The following example shows the initiator ports for the SCSI HBAs that are attached to the svcdom service domain. The –l option shows detailed information.

primary# ldm list-hba -l svcdom
NAME                                                 VSAN
----                                                 ----
/SYS/MB/SASHBA0/HBA0/PORT1
[/pci@300/pci@1/pci@0/pci@2/scsi@0/iport@1]
/SYS/MB/SASHBA0/HBA0/PORT2
[/pci@300/pci@1/pci@0/pci@2/scsi@0/iport@2]
/SYS/MB/SASHBA0/HBA0/PORT4
[/pci@300/pci@1/pci@0/pci@2/scsi@0/iport@4]
/SYS/MB/SASHBA0/HBA0/PORT8
[/pci@300/pci@1/pci@0/pci@2/scsi@0/iport@8]
/SYS/MB/PCIE1/HBA0/PORT0,0
[/pci@300/pci@1/pci@0/pci@4/SUNW,emlxs@0/fp@0,0]
/SYS/MB/PCIE1/HBA0,1/PORT0,0
[/pci@300/pci@1/pci@0/pci@4/SUNW,emlxs@0,1/fp@0,0]

If the LUNs you expect to see for an initiator port do not appear in the ldm list-hba output, verify that multipathing is disabled in the referenced service domain for the referenced initiator port. See Managing SAN Devices and I/O Multipathing in Oracle Solaris 11.4.

Creating a Virtual Storage Area Network

After you obtain the initiator port of the physical SCSI HBA, you must create the virtual storage area network (SAN) on the service domain. The virtual SAN manages all SCSI devices that are reachable from the specified SCSI HBA initiator port.

ldm add-vsan [-q] iport-path vSAN-name domain-name

The vSAN name is unique to the system and not to the specified domain name. The domain name identifies the domain in which the SCSI HBA initiator port is configured. You can create multiple virtual SANs that reference the same initiator port path.

You can create more than one virtual SAN from the same initiator port path. This action allows multiple guest domains to use the same initiator port.


Note - When the Oracle Solaris 11.3 OS is running on the service domain, the ldm add-vsan command verifies that the initiator port path is a valid device path. If the specified service domain is not active when you run the ldm add-vsan command, the specified initiator port path cannot be verified by the service domain. If the initiator port path does not correspond to an installed physical SCSI HBA initiator port that is part of the service domain, a warning message is written to the service domain's system log after the service domain becomes active.

In this example, you associate the /SYS/MB/PCIE1/HBA0,1/PORT0,0 initiator port on the svcdom service domain with a virtual SAN. You can choose the name of the virtual SAN. In this example, port0 is the name of the virtual SAN.

primary# ldm add-vsan /SYS/MB/PCIE1/HBA0,1/PORT0,0 port0 svcdom
/SYS/MB/PCIE1/HBA0,1/PORT0,0 resolved to device:
/pci@300/pci@1/pci@0/pci@4/SUNW,emlxs@0,1/fp@0,0

Creating a Virtual SCSI Host Bus Adapter

After the virtual SAN has been defined, you can use the ldm add-vhba command to create a virtual SCSI HBA in a guest domain. The virtual SCSI HBA sends I/O requests to the physical SCSI devices in the virtual SAN.

ldm add-vhba [id=vHBA-ID] vHBA-name vSAN-name domain-name

In this example, you create the port0_vhba virtual SCSI HBA on the gdom guest domain that communicates with the port0 virtual SAN.

primary# ldm add-vhba port0_vhba port0 gdom

Verifying the Presence of a Virtual SCSI HBA

Use the ldm list command to verify the presence of the newly created virtual SCSI HBA and virtual SAN devices on the service domain and the guest domain.

ldm list -o san,hba [domain-name ...]

In this example, the service domain that has the virtual SAN is svcdom and the guest domain that has the virtual SCSI HBA is gdom. Note that the virtual HBA identifier is not allocated in this example because the gdom domain is not yet bound.

primary# ldm list -o san,hba svcdom gdom
NAME
svcdom

VSAN
    NAME             TYPE   DEVICE IPORT
    port0            VSAN [/pci@300/pci@1/pci@0/pci@4/SUNW,emlxs@0,1/fp@0,0]

------------------------------------------------------------------------------
NAME
gdom

VHBA
    NAME             VSAN                        DEVICE TOUT SERVER
    port0_vhba       port0                              0    svcdom

Setting the Virtual SCSI HBA Timeout Option

The ldm set-vhba command enables you to specify a timeout value for the virtual SCSI HBA on the specified logical domain. The timeout property specifies how long, in seconds, the specified virtual SCSI HBA instance waits before declaring that an LDC connection cannot be made with the virtual SAN. See Virtual SCSI HBA Timeout.

The default timeout value of zero causes vhba to wait indefinitely to create the LDC connection with the virtual SAN.

ldm set-vhba [timeout=seconds] vHBA-name domain-name

In this example, you set a timeout of 90 seconds for the port0_vhba virtual SCSI HBA on the gdom guest domain.

primary# ldm set-vhba timeout=90 port0_vhba gdom

Removing a Virtual SCSI Host Bus Adapter

You can use the ldm remove-vhba command to remove a virtual SCSI HBA from a specified guest domain.

Ensure that neither the OS nor any applications are actively using the virtual SCSI HBA before you attempt to remove it. If the virtual SCSI HBA is in use, the ldm remove-vhba command fails.

ldm remove-vhba vHBA-name domain-name

In this example, you remove the port0_vhba virtual SCSI HBA from the gdom guest domain.

primary# ldm remove-vhba port0_vhba gdom

If you attempt to remove a virtual HBA that is actively managing I/O operations, the ldm remove-vhba command fails with the following error:

primary# ldm remove-vhba my-vhba my-domain
Dynamic reconfiguration of the virtual device on domain primary
 failed with error code (-122).
 The OS on domain primary did not report a reason for the failure.
 Check the logs on that OS instance for any further information.

Removing a Virtual Storage Area Network

You can use the ldm remove-vsan command to remove a virtual SAN.

First, remove the virtual SCSI HBA that is associated with the virtual SAN. Then, use the ldm remove-vsan command to remove the virtual SAN.

ldm remove-vsan vSAN-name

In this example, you remove the port0 virtual SAN:

primary# ldm remove-vsan port0

Adding or Removing a LUN

You cannot add or remove a virtual LUN directly from a virtual SCSI HBA. You must first add or remove a physical LUN and then run the ldm rescan-vhba command to synchronize the set of SCSI devices that are seen by the virtual SCSI HBA and virtual SAN. The commands to add or remove a physical LUN are specific to the topology of the virtual SAN's associated initiator port. For example, if the initiator port communicates with a physical SAN, you must use SAN administration commands to add a LUN to or remove a LUN from a SAN element.

ldm rescan-vhba vHBA-name domain-name

For example, the following command synchronizes the SCSI devices for the port0_vhba virtual SCSI HBA on the gdom domain:

primary# ldm rescan-vhba port0_vhba gdom