11.5. Preparing and Adding Block Storage

11.5.1. Preparing iSCSI Storage

Red Hat Virtualization supports iSCSI storage, which is a storage domain created from a volume group made up of LUNs. Volume groups and LUNs cannot be attached to more than one storage domain at a time.

For information on setting up and configuring iSCSI storage, see Online Storage Management in the Red Hat Enterprise Linux 7 Storage Administration Guide.

Important

If you are using block storage and you intend to deploy virtual machines on raw devices or direct LUNs and to manage them with the Logical Volume Manager, you must create a filter to hide the guest logical volumes. This will prevent guest logical volumes from being activated when the host is booted, a situation that could lead to stale logical volumes and cause data corruption. See https://access.redhat.com/solutions/2662261 for details.

Important

Red Hat Virtualization currently does not support block storage with a block size of 4K. You must configure block storage in legacy (512b block) mode.

Important

If your host is booting from SAN storage and loses connectivity to the storage, the storage file systems become read-only and remain in this state after connectivity is restored.

To prevent this situation, Red Hat recommends adding a drop-in multipath configuration file on the root file system of the SAN for the boot LUN to ensure that it is queued when there is a connection:

# cat /etc/multipath/conf.d/host.conf
multipaths {
    multipath {
        wwid boot_LUN_wwid
        no_path_retry queue
    }

11.5.2. Adding iSCSI Storage

This procedure shows you how to attach existing iSCSI storage to your Red Hat Virtualization environment as a data domain.

Procedure

  1. Click StorageDomains.
  2. Click New Domain.
  3. Enter the Name of the new storage domain.
  4. Select a Data Center from the drop-down list.
  5. Select Data as the Domain Function and iSCSI as the Storage Type.
  6. Select an active host as the Host.

    Important

    Communication to the storage domain is from the selected host and not directly from the Manager. Therefore, all hosts must have access to the storage device before the storage domain can be configured.

  7. The Manager can map iSCSI targets to LUNs or LUNs to iSCSI targets. The New Domain window automatically displays known targets with unused LUNs when the iSCSI storage type is selected. If the target that you are using to add storage does not appear, you can use target discovery to find it; otherwise proceed to the next step.

    1. Click Discover Targets to enable target discovery options. When targets have been discovered and logged in to, the New Domain window automatically displays targets with LUNs unused by the environment.

      Note

      LUNs used externally to the environment are also displayed.

      You can use the Discover Targets options to add LUNs on many targets or multiple paths to the same LUNs.

    2. Enter the FQDN or IP address of the iSCSI host in the Address field.
    3. Enter the port with which to connect to the host when browsing for targets in the Port field. The default is 3260.
    4. If CHAP is used to secure the storage, select the User Authentication check box. Enter the CHAP user name and CHAP password.

      Note

      You can define credentials for an iSCSI target for a specific host with the REST API. See StorageServerConnectionExtensions: add in the REST API Guide for more information.

    5. Click Discover.
    6. Select one or more targets from the discovery results and click Login for one target or Login All for multiple targets.

      Important

      If more than one path access is required, you must discover and log in to the target through all the required paths. Modifying a storage domain to add additional paths is currently not supported.

  8. Click the + button next to the desired target. This expands the entry and displays all unused LUNs attached to the target.
  9. Select the check box for each LUN that you are using to create the storage domain.
  10. Optionally, you can configure the advanced parameters:

    1. Click Advanced Parameters.
    2. Enter a percentage value into the Warning Low Space Indicator field. If the free space available on the storage domain is below this percentage, warning messages are displayed to the user and logged.
    3. Enter a GB value into the Critical Space Action Blocker field. If the free space available on the storage domain is below this value, error messages are displayed to the user and logged, and any new action that consumes space, even temporarily, will be blocked.
    4. Select the Wipe After Delete check box to enable the wipe after delete option. This option can be edited after the domain is created, but doing so will not change the wipe after delete property of disks that already exist.
    5. Select the Discard After Delete check box to enable the discard after delete option. This option can be edited after the domain is created. This option is only available to block storage domains.
  11. Click OK.

If you have configured multiple storage connection paths to the same target, follow the procedure in Configuring iSCSI Multipathing to complete iSCSI bonding.

If you want to migrate your current storage network to an iSCSI bond, see Migrating a Logical Network to an iSCSI Bond.

11.5.3. Configuring iSCSI Multipathing

iSCSI multipathing enables you to create and manage groups of logical networks and iSCSI storage connections. Multiple network paths between the hosts and iSCSI storage prevent host downtime caused by network path failure.

The Manager connects each host in the data center to each target, using the NICs or VLANs that are assigned to the logical networks in the iSCSI bond.

You can create an iSCSI bond with multiple targets and logical networks for redundancy.

Prerequisites

Procedure

  1. Click ComputeData Centers.
  2. Click the data center name to open the details view.
  3. In the iSCSI Multipathing tab, click Add.
  4. In the Add iSCSI Bond window, enter a Name and a Description.
  5. Select a logical network from Logical Networks and a storage domain from Storage Targets. You must select all the paths to the same target.
  6. Click OK.

The hosts in the data center are connected to the iSCSI targets through the logical networks in the iSCSI bond.

11.5.4. Migrating a Logical Network to an iSCSI Bond

If you have a logical network that you created for iSCSI traffic and configured on top of an existing network bond, you can migrate it to an iSCSI bond on the same subnet without disruption or downtime.

Procedure

  1. Modify the current logical network so that it is not Required:

    1. Click ComputeClusters.
    2. Click the cluster name to open the details view.
    3. In the Logical Networks tab, select the current logical network (net-1) and click Manage Networks.
    4. Clear the Require check box and click OK.
  2. Create a new logical network that is not Required and not VM network:

    1. Click Add Network to open the New Logical Network window.
    2. In the General tab, enter the Name (net-2) and clear the VM network check box.
    3. In the Cluster tab, clear the Require check box and click OK.
  3. Remove the current network bond and reassign the logical networks:

    1. Click ComputeHosts.
    2. Click the host name to open the details view.
    3. In the Network Interfaces tab, click Setup Host Networks.
    4. Drag net-1 to the right to unassign it.
    5. Drag the current bond to the right to remove it.
    6. Drag net-1 and net-2 to the left to assign them to physical interfaces.
    7. Click the pencil icon of net-2 to open the Edit Network window.
    8. In the IPV4 tab, select Static.
    9. Enter the IP and Netmask/Routing Prefix of the subnet and click OK.
  4. Create the iSCSI bond:

    1. Click ComputeData Centers.
    2. Click the data center name to open the details view.
    3. In the iSCSI Multipathing tab, click Add.
    4. In the Add iSCSI Bond window, enter a Name, select the networks, net-1 and net-2, and click OK.

Your data center has an iSCSI bond containing the old and new logical networks.

11.5.5. Preparing FCP Storage

Red Hat Virtualization supports SAN storage by creating a storage domain from a volume group made of pre-existing LUNs. Neither volume groups nor LUNs can be attached to more than one storage domain at a time.

Red Hat Virtualization system administrators need a working knowledge of Storage Area Networks (SAN) concepts. SAN usually uses Fibre Channel Protocol (FCP) for traffic between hosts and shared external storage. For this reason, SAN may occasionally be referred to as FCP storage.

For information on setting up and configuring FCP or multipathing on Red Hat Enterprise Linux, see the Storage Administration Guide and DM Multipath Guide.

Important

If you are using block storage and you intend to deploy virtual machines on raw devices or direct LUNs and to manage them with the Logical Volume Manager, you must create a filter to hide the guest logical volumes. This will prevent guest logical volumes from being activated when the host is booted, a situation that could lead to stale logical volumes and cause data corruption. See https://access.redhat.com/solutions/2662261 for details.

Important

Red Hat Virtualization currently does not support block storage with a block size of 4K. You must configure block storage in legacy (512b block) mode.

Important

If your host is booting from SAN storage and loses connectivity to the storage, the storage file systems become read-only and remain in this state after connectivity is restored.

To prevent this situation, Red Hat recommends adding a drop-in multipath configuration file on the root file system of the SAN for the boot LUN to ensure that it is queued when there is a connection:

# cat /etc/multipath/conf.d/host.conf
multipaths {
    multipath {
        wwid boot_LUN_wwid
        no_path_retry queue
    }

11.5.6. Adding FCP Storage

This procedure shows you how to attach existing FCP storage to your Red Hat Virtualization environment as a data domain.

Procedure

  1. Click StorageDomains.
  2. Click New Domain.
  3. Enter the Name of the storage domain.
  4. Select an FCP Data Center from the drop-down list.

    If you do not yet have an appropriate FCP data center, select (none).

  5. Select the Domain Function and the Storage Type from the drop-down lists. The storage domain types that are not compatible with the chosen data center are not available.
  6. Select an active host in the Host field. If this is not the first data domain in a data center, you must select the data center’s SPM host.

    Important

    All communication to the storage domain is through the selected host and not directly from the Red Hat Virtualization Manager. At least one active host must exist in the system and be attached to the chosen data center. All hosts must have access to the storage device before the storage domain can be configured.

  7. The New Domain window automatically displays known targets with unused LUNs when Fibre Channel is selected as the storage type. Select the LUN ID check box to select all of the available LUNs.
  8. Optionally, you can configure the advanced parameters.

    1. Click Advanced Parameters.
    2. Enter a percentage value into the Warning Low Space Indicator field. If the free space available on the storage domain is below this percentage, warning messages are displayed to the user and logged.
    3. Enter a GB value into the Critical Space Action Blocker field. If the free space available on the storage domain is below this value, error messages are displayed to the user and logged, and any new action that consumes space, even temporarily, will be blocked.
    4. Select the Wipe After Delete check box to enable the wipe after delete option. This option can be edited after the domain is created, but doing so will not change the wipe after delete property of disks that already exist.
    5. Select the Discard After Delete check box to enable the discard after delete option. This option can be edited after the domain is created. This option is only available to block storage domains.
  9. Click OK.

The new FCP data domain remains in a Locked status while it is being prepared for use. When ready, it is automatically attached to the data center.

11.5.7. Increasing iSCSI or FCP Storage

There are several ways to increase iSCSI or FCP storage size:

  • Add an existing LUN to the current storage domain.
  • Create a new storage domain with new LUNs and add it to an existing data center. See Section 11.5.2, “Adding iSCSI Storage”.
  • Expand the storage domain by resizing the underlying LUNs.

For information about creating, configuring, or resizing iSCSI storage on Red Hat Enterprise Linux 7 systems, see the Red Hat Enterprise Linux 7 Storage Administration Guide.

The following procedure explains how to expand storage area network (SAN) storage by adding a new LUN to an existing storage domain.

Prerequisites

  • The storage domain’s status must be UP.
  • The LUN must be accessible to all the hosts whose status is UP, or else the operation will fail and the LUN will not be added to the domain. The hosts themselves, however, will not be affected. If a newly added host, or a host that is coming out of maintenance or a Non Operational state, cannot access the LUN, the host’s state will be Non Operational.

Increasing an Existing iSCSI or FCP Storage Domain

  1. Click StorageDomains and select an iSCSI or FCP domain.
  2. Click Manage Domain.
  3. Click Targets > LUNs and click the Discover Targets expansion button.
  4. Enter the connection information for the storage server and click Discover to initiate the connection.
  5. Click LUNs > Targets and select the check box of the newly available LUN.
  6. Click OK to add the LUN to the selected storage domain.

This will increase the storage domain by the size of the added LUN.

When expanding the storage domain by resizing the underlying LUNs, the LUNs must also be refreshed in the Administration Portal.

Refreshing the LUN Size

  1. Click StorageDomains and select an iSCSI or FCP domain.
  2. Click Manage Domain.
  3. Click on LUNs > Targets.
  4. In the Additional Size column, click the Add Additional_Storage_Size button of the LUN to refresh.
  5. Click OK to refresh the LUN to indicate the new storage size.

11.5.8. Reusing LUNs

LUNs cannot be reused, as is, to create a storage domain or virtual disk. If you try to reuse the LUNs, the Administration Portal displays the following error message:

Physical device initialization failed. Please check that the device is empty and accessible by the host.

A self-hosted engine shows the following error during installation:

[ ERROR ] Error creating Volume Group: Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",)
[ ERROR ] Failed to execute stage 'Misc configuration': Failed to initialize physical device: ("[u'/dev/mapper/000000000000000000000000000000000']",)

Before the LUN can be reused, the old partitioning table must be cleared.

Clearing the Partition Table from a LUN

Important

You must run this procedure on the correct LUN so that you do not inadvertently destroy data.

Run the dd command with the ID of the LUN that you want to reuse, the maximum number of bytes to read and write at a time, and the number of input blocks to copy:

# dd if=/dev/zero of=/dev/mapper/LUN_ID bs=1M count=200 oflag=direct