How to Create and Manage Storage Domains in RedHat Virtualization (RHV)
Storage domains and the storage pool manager
The Storage Pool Manager (SPM) is the host in the data center responsible for making changes to storage domains at the request of Red Hat Virtualization Manager (RHVM). All hosts can change data in the storage domains, but only the SPM can apply changes to the configuration of storage domains. An automation election selects the SPM host. If the current SPM host goes down, another operational host replaces it as SPM.
The SPM must be running to add storage domains. This is the reason that administrators must register a host (hypervisor) before setting up a data center from scratch. Once a host is part of the data center, it is possible to begin the configuration of the data center’s storage domains.
In an NFS data domain, the SPM creates a virtual machine’s disk as a file on the file system, either as a QCOW2 file for thin provision (sparse) format, or as a normal file for preallocated (RAW) format.
In an iSCSI or Fibre Channel data domain, the SPM creates a volume group (VG) on top of the logical unit numbers (LUNs) provided for the storage domain, and creates a virtual machine disk as a logical volume (LV) in that volume group. For a virtual disk with preallocated format, the SPM creates a logical volume of the specified size (in GB). For a virtual disk with thin provision format, the SPM initially creates a 512 MB logical volume. The host on which the virtual machine is running continuously monitors the logical volume. If the host determines that more space is needed, the host notifies the SPM, and the SPM extends the logical volume by another 512 MB.
From a performance point of view, a virtual disk with preallocated (RAW) format is significantly faster than a virtual disk with thin provision (QCOW2) format. It is a best practice to use the thin provision format for non-I/O intensive virtual desktops and the preallocated (RAW) format for virtual servers.
Configuring an iSCSI-based storage domain
Red Hat Virtualization supports the usage of iSCSI storage to create a data storage domain. An iSCSI storage domain is configured to provide storage using a specific iSCSI target. Hosts are iSCSI initiators, which log in to the iSCSI target specified by the data domain. Only one storage domain at a time can use each iSCSI LUN.
The following procedure details how to configure an iSCSI LUN as a data domain in a data center, using the Administration Portal while logged in as the admin superuser.
1. In the System section, go to the Storage tab, and click New.
In the New Domain window, select the data center for the iSCSI storage domain using the Data Center menu. Select Data as the storage domain type using the Domain Function menu. Select iSCSI using the Storage Type menu to create an iSCSI-based storage domain. Select the SPM host using the Host to Use menu. If there is no SPM, select any of the available hypervisor hosts. Enter a name for the iSCSI-based storage domain in the Name field.
2. In the Discover Targets section of the window, enter the address and port for the iSCSI target. When done, click Discover to discover the iSCSI target.
3. Log in to the iSCSI target using the arrow button for that target.
4. Click the plus button next to the iSCSI target name to display the unused LUNs available for that iSCSI target.
5. Select the LUN by checking the checkbox next to it. Click OK to create the new iSCSI-based data domain using that LUN.
6. In the Storage tab, the new iSCSI-based storage domain is active.
Attaching a shared ISO domain to a Data Center
Unlike data domains, ISO domains can be shared simultaneously by several data centers. This can be useful to reduce the amount of storage needed for installation media used to create virtual machines.
The following procedure details how to attach an existing ISO storage domain to a new data center, using the Administration Portal as the admin superuser.
1. In the System section, go to the Storage tab. Click on the ISO storage domain name, and go to the Data Center tab to list the data centers where the ISO storage domain is available.
2. In the Data Center tab, click Attach. A window titled Attach to Data Center appears. Select the data center to which the ISO domain should be attached.
Click OK to attach the ISO domain to that data center.
3. In the Data Center tab, verify that the new data center is listed.