Product SiteDocumentation Site

Chapter 11. Storage Setup

11.1. Storage Domains Overview
11.1.1. Adding NFS Storage
11.1.2. Adding iSCSI Storage
11.1.3. Adding FCP Storage
11.1.4. Adding Local Storage
11.2. Populate the ISO Domain
11.2.1. Uploading the VirtIO and Guest Tool Image Files
This chapter provides instruction on configuring, and attaching storage to the Red Hat Enterprise Virtualization environment. For information about managing storage, including maintenance and removal, refer to the Red Hat Enterprise Virtualization Administration Guide.
Red Hat Enterprise Virtualization uses a centralized storage system for virtual machine disk images, ISO files and snapshots. Storage networking can be implemented using Network File System (NFS), Internet Small Computer System Interface (iSCSI), Fibre Channel Protocol (FCP), or local storage attached directly to the virtualization hosts. This section describes how to set up and manage the variety of storage types that can be used in the Red Hat Enterprise Virtualization platform. Setting up storage is a vital prerequisite for a new data center because a data center cannot be initialized unless storage domains are attached and activated.
A Red Hat Enterprise Virtualization system administrator needs to create, configure, attach and maintain storage for the virtualized enterprise. A familiarity with the storage types and their use is highly recommended. This document does not describe the concepts, protocols, requirements or general usage of NFS, iSCSI, FCP, or local storage. It is recommended that you read your storage array vendor's guides, and refer to Red Hat Enterprise Linux — Storage Administration Guide for more information on managing storage, if necessary.
The Red Hat Enterprise Virtualization platform enables administrators to assign and manage storage effectively and efficiently. The Storage tab on the Red Hat Enterprise Virtualization platform provides an efficient graphical way to view and manage networked storage. The Storage Results list displays all the storage domains, and the Details pane enables access to general information about the domain.
Red Hat Enterprise Virtualization platform has three types of storage domains:
Once you have determined the storage needs of your data center(s) you must begin configuring and attaching the storage:

Important — Before Adding Storage

Before adding storage ensure that you have a working Red Hat Enterprise Virtualization Manager environment. You must be able to successfully access the Administration Portal, and there must be at least one host connected with a status of Up.

Important — Export Domain Storage Type

Support for export storage domains backed by storage on anything other than NFS is being deprecated. While existing export storage domains imported from Red Hat Enterprise Virtualization 2.2 environments remain supported new export storage domains must be created on NFS storage.

11.1. Storage Domains Overview

11.1.1. Adding NFS Storage

An NFS storage domain is an NFS file share that is attached to a data center. Once you attach an NFS file share to the data center as a storage domain it is used to provide storage to the Red Hat Enterprise Virtualization environment. How the storage domain is used depends on the function you select when attaching it.
This section details how to prepare NFS file shares on your storage infrastructure and attach them using the Red Hat Enterprise Virtualization Manager. For further information on NFS itself, see the Red Hat Enterprise Linux — Storage Administration Guide
Add NFS
Figure 11.1. Add NFS

Important — NFSv4 is not Natively Supported

NFSv4 is not natively supported by Red Hat Enterprise Virtualization. Red Hat Enterprise Virtualization will always attempt to mount NFS storage using NFSv3.
Your NFS storage server must support NFSv3 to be used with Red Hat Enterprise Virtualization. Attempts to attach NFS storage which has been exported from servers that do not support NFSv3 to the Red Hat Enterprise Virtualization environment will fail.
Preparing NFS Storage
This section outlines how to prepare an NFS file share on a server running Red Hat Enterprise Linux 6. Once created the NFS share can be attached by the Red Hat Enterprise Virtualization Manager.
  1. Install nfs-utils

    NFS functionality is provided by the nfs-utils package. Before file shares can be created, check that the package is installed by querying the RPM database for the system:
    $ rpm -qi nfs-utils
    If the nfs-utils package is installed then the package information will be displayed. If no output is displayed then the package is not currently installed. Install it using yum while logged in as the root user:
    # yum install nfs-utils
  2. Configure Boot Scripts

    To ensure that NFS shares are always available when the system is operational both the nfs and rpcbind services must start at boot time. Use the chkconfig command while logged in as root to modify the boot scripts.
    # chkconfig --add rpcbind
    # chkconfig --add nfs
    # chkconfig rpcbind on
    # chkconfig nfs on
    Once the boot script configuration has been done, start the services for the first time.
    # service rpcbind start
    # service nfs start
  3. Create Directory

    Create the directory you wish to share using NFS.
    # mkdir /exports/iso
    Replace /exports/iso with the name, and path of the directory you wish to use.
  4. Export Directory

    To be accessible over the network using NFS the directory must be exported. NFS exports are controlled using the /etc/exports configuration file. Each export path appears on a separate line followed by a tab character and any additional NFS options. Exports to be attached to the Red Hat Enterprise Virtualization Manager must have the read, and write, options set.
    To grant read, and write access to /exports/iso using NFS for example you add the following line to the /etc/exports file.
    /exports/iso       *(rw)
    Again, replace /exports/iso with the name, and path of the directory you wish to use.
  5. Reload NFS Configuration

    For the changes to the /etc/exports file to take effect the service must be told to reload the configuration. To force the service to reload the configuration run the following command as root:
    # service nfs reload
  6. Set Permissions

    The NFS export directory must be configured for read write access and must be owned by vdsm:kvm. If these users do not exist on your external NFS server use the following command, assuming that /exports/iso is the directory to be used as an NFS share.
    # chown -R 36:36 /exports/iso
    The permissions on the directory must be set to allow read and write access to both the owner and the group. The owner should also have execute access to the directory. The permissions are set using the chmod command. The following command arguments set the required permissions on the /exports/iso directory.
    # chmod 0755 /exports/iso
Result:
The NFS file share has been created, and is ready to be attached by the Red Hat Enterprise Virtualization Manager.
Attaching NFS Storage
An NFS type Storage Domain is a mounted NFS share that is attached to a data center. It is used to provide storage for virtualized guest images and ISO boot media. Once NFS storage has been exported it must be attached to the Red Hat Enterprise Virtualization Manager, using the Administration Portal.
To add an NFS data, or export, storage domain you must select an NFS data center. NFS storage domains for ISO storage are able to be added to data centers of any type.
  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain.
  3. The New Storage dialog box displays.
    NFS Storage
    Figure 11.2. NFS Storage

  4. Configure the following options:
    Name: Enter a suitably descriptive name.
    Data Center: Select the required Data Center from the drop-down list.
    Domain Function/ Storage Type: In the drop down menu, select Data → NFS. The storage domain types which are not compatible with the Default data center are grayed out. After you select your domain type, the Export Path field appears.
    Export path: Enter the IP address or a resolvable hostname of the chosen host. The export path should be in the format of 192.168.0.10:/Images/ISO or domain.example.com:/Images/ISO
    Use Host: Select any of the hosts from the drop down menu. Only hosts which belong in the pre-selected data center will display in this list.

    Active Host Required

    All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
  5. Click OK.
Result:
The new NFS data domain displays on the Storage tab. It will remain with a Locked status while it is being prepared for use. When ready, it is automatically attached to the data center.

11.1.2. Adding iSCSI Storage

Red Hat Enterprise Virtualization platform supports iSCSI storage via the creation of a Storage Domain for a Volume Group. A Volume Group is a set of pre-defined Logical Unit Numbers (LUNs). Red Hat Enterprise Virtualization supports creation of a Storage Domain from a pre-existent Volume Group or a set of LUNs. Neither Volume Groups nor LUNs are able to be attached to more than one Storage Domain at a time.
For information regarding the setup and configuration of iSCSI on Red Hat Enterprise Linux, see the Red Hat Enterprise Linux — Storage Administration Guide.
  1. On the tree pane, select the Tree tab. On System, click the + icon to display the available data centers.
  2. Select the Data Center to which the domain is to be added. The storage type of the data center selected determines the type of storage domains that can be added to it. To add an iSCSI data, or export, storage domain you must select an iSCSI data center. iSCSI storage domains can not be used for ISO storage domains.
  3. Click the New Domain button.
  4. Click New Storage. The New Storage dialog box displays.
  5. From the Domain Function / Storage Type drop-down menu, select the appropriate storage type for the storage domain. The storage domain types that are not compatible with the chosen data center are not available.
  6. Select an active host in the Use host field. To attach a domain, the name of an active host must be selected from the list of existing hosts. Only hosts that are attached to the selected Data Center are listed.

    Active Host Required

    All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
  7. The Red Hat Enterprise Virtualization Manager is able to map either iSCSI targets to LUNs, or LUNs to iSCSI targets. The New Domain dialog automatically displays known targets with unused LUNs when iSCSI is selected as the storage type. If the target that you are adding storage from is not listed then you can use target discovery to find it, otherwise proceed to the next step.
    New Domain Dialog
    Figure 11.3. New Domain Dialog

    iSCSI Target Discovery
    • Click Discover Targets to enable target discovery options. The New Domain dialog automatically displays targets with unused LUNs when iSCSI is selected as the storage type. If the target that you are adding is not listed, click Discover Targets to enable target discovery options.
    • Enter the fully qualified domain name or IP address of the iSCSI host in the Address field.
    • Enter the port to connect to the host on when browsing for targets in the Port field. The default is 3260.
    • If the Challenge Handshake Authentication Protocol (CHAP) is being used to secure the storage, select the User Authentication check box. Enter the CHAP user name and password.
    • Click the Discover button.
  8. Click the + button next to the desired target. This will expand the entry and display all unused LUNs attached to the target.
    iSCSI LUN Selection
    Figure 11.4. iSCSI LUN Selection

  9. Select the check box for each LUN that you are using to create the storage domain.
  10. Click OK to create the storage domain.
Result:
The new iSCSI storage domain displays on the storage tab. This will take some time.

11.1.2.1. Mapping iSCSI Targets to LUNs

Follow the below mentioned procedure:
  1. Click the + button next to the desired target.
  2. Select the check box for each LUN that you are using to create the storage domain.
  3. Click OK.
Result:
The new storage domain is created.

11.1.3. Adding FCP Storage

Red Hat Enterprise Virtualization platform supports SAN storage via the creation of a Storage Domain for a Volume Group. A Volume Group is a set of pre-defined Logical Unit Numbers (LUNs). Red Hat Enterprise Virtualization supports creation of a Storage Domain from a pre-defined Volume Group or a set of LUNs. Neither Volume Groups nor LUNs are able to be attached to more than one Storage Domain at a time.
Red Hat Enterprise 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 regarding the setup and configuration of FCP or multipathing on Red Hat Enterprise Linux, please refer to the Storage Administration Guide and DM Multipath Guide.
Procedure 11.1. To Add FCP Storage:
  1. Click the Storage tab. The Storage list and toolbar display.
  2. Click New Domain.
  3. The New Domain dialog box displays.
    Adding FCP Storage
    Figure 11.5. Adding FCP Storage

  4. Configure the following options:
    1. Name: Enter a suitably descriptive name.
    2. Data Center: Select the required Data Center from the drop-down list.
    3. Domain Function/ Storage Type: Select FCP.
    4. Use Host: Select the IP address of either the hypervisor or Red Hat Enterprise Linux host.

      Active Host Required

      All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
    5. The list of existing LUNs display. On the selected LUN, select the Add LUN check box to use it as the FCP data domain.
  5. Click OK.
Result:
The new FCP data domain displays on the Storage tab. It will remain with a Locked status while it is being prepared for use. When ready, it is automatically attached to the data center. Select either Build New Domain or Use Existing Volume Group.

11.1.4. Adding Local Storage

A local storage domain can be set up on a host, to be used as a data domain for a data center and cluster that contains only a single host. Virtual machines created in a single host cluster cannot be migrated, fenced or scheduled.
Preparing Local Storage
This section outlines how to set up a local directory with recommended settings.
  • On a Red Hat Enterprise Virtualization Hypervisor host, set up the path for the local storage as /data/images. This is the only path permitted for a Red Hat Enterprise Virtualization Hypervisor. On a Red Hat Enterprise Linux host other paths are supported but the directories to support it must be manually created first.
    The path must have permissions allowing read and write access to the vdsm user and kvm group. These permissions are set automatically on the /data/images path for Red Hat Enterprise Virtualization Hypervisor hosts. you must set them manually on paths to be used for local storage on Red Hat Enterprise Linux hosts.
    # chown 36:36 /data /data/images
    # chmod 0755 /data /data/images
    
  • On a Red Hat Enterprise Linux host, set up the path for local storage in the /data directory. Any path is permitted on a Red Hat Enterprise Linux host. Follow these instructions to add local storage:
    1. On the tree pane, select the Tree tab. On System, click the + icon to display the available data centers.
    2. Select the Data Center to which the domain is to be added. The storage type of the data center selected determines the type of storage domains that can be added to it. To add a local data storage domain you must select a local data center.
    3. Click New Domain. The New Domain dialog box displays.
    4. Enter the Name of the domain. A descriptive name is recommended.
    5. Select the Data / Local on Host option as the Domain Function / Storage Type for the storage domain.
    6. Select the local host in the Use host field. This must be the host on which the local storage is set up.

      Important — Active Host Required

      All communication to the storage domain is via the selected host and not directly from the Red Hat Enterprise Virtualization Manager. At least one active host must exist in the system, and be attached to the chosen data center, before the storage is configured.
    7. Enter the Path of the storage. For example, /data/images.
    8. Click OK.
    Result:
    The new local storage domain displays on the Storage tab. This may take a few moments.