XenServer

Hardware HBA LUNs

This section covers various operations required to manage SAS, Fibre Channel, and iSCSI HBAs.

LVM over Hardware HBA

The LVM over hardware HBA type represents disks as VHDs on Logical Volumes within a Volume Group created on an HBA LUN that provides, for example, hardware-based iSCSI or FC support.

XenServer® hosts support Fibre Channel SANs through Emulex or QLogic host bus adapters (HBAs). All Fibre Channel configuration required to expose a Fibre Channel LUN to the host must be completed manually. This configuration includes storage devices, network devices, and the HBA within the XenServer host. After all FC configuration is complete, the HBA exposes a SCSI device backed by the FC LUN to the host. The SCSI device can then be used to access the FC LUN as if it were a locally attached SCSI device.

Use the sr-probe command to list the LUN-backed SCSI devices present on the host. This command forces a scan for new LUN-backed SCSI devices. The path value returned by sr-probe for a LUN-backed SCSI device is consistent across all hosts with access to the LUN. Therefore, this value must be used when creating shared SRs accessible by all hosts in a resource pool.

The same features apply to QLogic iSCSI HBAs.

Note:

XenServer support for Fibre Channel does not support direct mapping of a LUN to a VM. HBA-based LUNs must be mapped to the host and specified for use in an SR. VDIs within the SR are exposed to VMs as standard block devices.

The block size of an LVM over HBA LUN must be 512 bytes. To use storage with 4 KB physical blocks, the storage must also support emulation of 512-byte allocation blocks (the logical block size must be 512 bytes).

Remove HBA-based SAS, FC, or iSCSI device entries

Note:

This step is not required. We recommend that only power users perform this process if it is necessary.

Each HBA-based LUN has a corresponding global device path entry under /dev/disk/by-scsibus in the format <SCSIid>-<adapter>:<bus>:<target>:<lun> and a standard device path under /dev. To remove the device entries for LUNs no longer in use as SRs, use the following steps:

  1. Use sr-forget or sr-destroy as appropriate to remove the SR from the XenServer host database. See Remove SRs for details.

  2. Remove the zoning configuration within the SAN for the desired LUN to the desired host.

  3. Use the sr-probe command to determine the ADAPTER, BUS, TARGET, and LUN values corresponding to the LUN to be removed. For more information, Probe an SR.

  4. Remove the device entries with the following command:

    echo "1" > /sys/class/scsi_device/adapter:bus:target:lun/device/delete
    <!--NeedCopy-->
    

Warning:

Make sure that you are certain which LUN you are removing. Accidentally removing a LUN required for host operation, such as the boot or root device, renders the host unusable.

Shared LVM storage

The Shared LVM type represents disks as Logical Volumes within a Volume Group created on an iSCSI (FC or SAS) LUN.

Note:

The block size of an iSCSI LUN must be 512 bytes. To use storage with 4 KB physical blocks, the storage must also support emulation of 512-byte allocation blocks (the logical block size must be 512 bytes).

Device-config parameters for LVMoHBA SRs:

Parameter name Description Required?
SCSIid Device SCSI ID Yes

Create a Shared LVM over Fibre Channel / Fibre Channel over Ethernet / iSCSI HBA or SAS SR

SRs of type LVMoHBA can be created and managed using the xe CLI or XenCenter.

xe CLI

To create a shared LVMoHBA SR, perform the following steps on each host in the pool:

  1. Zone in one or more LUNs to each XenServer host in the pool. This process is highly specific to the SAN equipment in use. For more information, see your SAN documentation.

  2. If necessary, configure the HBA using third-party tools in the BIOS or firmware.

    • For information about configuring QLogic Fibre Channel and iSCSI HBAs, see the Marvell website.
    • For information about configuring Emulex Fibre Channel HBAs, see the Broadcom website.
  3. Use the sr-probe command to determine the global device path of the HBA LUN. The sr-probe command forces a rescan of HBAs installed in the system to detect any new LUNs that have been zoned to the host. The command returns a list of properties for each LUN found. Specify the host-uuid parameter to ensure that the probe occurs on the desired host.

    The global device path returned as the <path> property is common across all hosts in the pool. Therefore, this path must be used as the value for the device-config:device parameter when creating the SR.

    If multiple LUNs are present, use the vendor, LUN size, LUN serial number, or the SCSI ID from the <path> property to identify the desired LUN.

        xe sr-probe type=lvmohba \
        host-uuid=1212c7b3-f333-4a8d-a6fb-80c5b79b5b31
        Error code: SR_BACKEND_FAILURE_90
        Error parameters: , The request is missing the device parameter, \
        <?xml version="1.0" ?>
        <Devlist>
            <BlockDevice>
                <path>
                    /dev/disk/by-id/scsi-360a9800068666949673446387665336f
                </path>
                <vendor>
                    HITACHI
                </vendor>
                <serial>
                    730157980002
                </serial>
                <size>
                    80530636800
                </size>
                <adapter>
                    4
                </adapter>
                <channel>
                    0
                </channel>
                <id>
                    4
                </id>
                <lun>
                    2
                </lun>
                <hba>
                    qla2xxx
                </hba>
            </BlockDevice>
            <Adapter>
                <host>
                    Host4
                </host>
                <name>
                    qla2xxx
                </name>
                <manufacturer>
                    QLogic HBA Driver
                </manufacturer>
                <id>
                    4
                </id>
            </Adapter>
        </Devlist>
    <!--NeedCopy-->
    
  4. On the pool coordinator, create the SR. Specify the global device path returned in the <path> property from sr-probe. PBDs are created and plugged for each host in the pool automatically.

        xe sr-create host-uuid=valid_uuid \
        content-type=user \
        name-label="Example shared LVM over HBA SR" shared=true \
        device-config:SCSIid=device_scsi_id type=lvmohba
    <!--NeedCopy-->
    

Note:

You can use the XenCenter Repair Storage Repository function to retry the PBD creation and plugging portions of the sr-create operation. This function can be valuable in cases where the LUN zoning was incorrect for one or more hosts in a pool when the SR was created. Correct the zoning for the affected hosts and use the Repair Storage Repository function instead of removing and re-creating the SR.

In XenCenter

  1. To open the New Storage Repository wizard, you can do any of the following actions:
    • On the toolbar, select New Storage.
    • On the Storage tab for the selected pool or server, select New SR.
    • On the Storage menu, select New SR.
    • In the Resources pane, select a server or pool then right-click and select New SR on the shortcut menu.
  2. Select Hardware HBA as the physical storage type and then select Next.
  3. On the Name page, enter the name of the new SR. By default, the wizard generates a description of the SR. This description includes a summary of the configuration options you select as you progress through the wizard. To enter your own description, clear the Auto-generate description check box and type in the Description box. Click Next to continue to the Provisioning page.
  4. On the Provisioning page, select the provisioning type. The options available are
    • Thin provisioning (GFS2). This type of provisioning is only available on clustered pools. For more information about clustering, see Change pool properties
    • Full provisioning (LVM)

Click Next to continue to the Location page.

The wizard scans for available LUNs and then displays a page listing all the LUNs found. Select a LUN from the list and click Create.

Note:

A warning message is displayed if there are existing SRs on the LUN you have selected. Review the details and choose one of the following options.

  • To use the existing, click Reattach.
  • To delete the existing SR and to create an SR, click Format.
  • If you prefer to select a different LUN, click Cancel and select a LUN from the list.

The Summary page displays information about the new SR. Read the information and then click Finish to complete the SR creation process.

Third-party configuration tools

Previous versions of Citrix Hypervisor and XenServer included third-party tools to manage hardware HBA storage. These tools are no longer included, but can be downloaded from the hardware vendor website. For more information, see Changes to third-party components.

Hardware HBA LUNs