Configuring Red Hat Virtualization with Red Hat Gluster Storage
Getting Started with Red Hat Gluster Storage 3.3 and Red Hat Virtualization 3.4 or later
Abstract
Chapter 1. Introduction to Red Hat Gluster Storage for Virtualization
- Red Hat Virtualization nodes.See the Red Hat Virtualization Technical Reference for an architectural overview: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/technical_reference/
- Red Hat Gluster Storage nodes.A Red Hat Gluster Storage environment consists of bricks that are used to build volumes. Different types of optimized storage volumes can be used as virtual machine stores to hold resources such as virtual disks, templates, and snapshots.

Figure 1.1. Integration architecture
Important
libgfapi
protocol in the future releases.
Chapter 2. Support Requirements
2.1. Prerequisites
- All installations of Red Hat Virtualization and Red Hat Gluster Storage must have valid subscriptions to Red Hat Network channels and Subscription Management repositories.
- Red Hat Virtualization installations must adhere to the requirements laid out in the Red Hat Virtualization Installation Guide: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html-single/installation_guide/#System_Requirements.
- Red Hat Gluster Storage installations must adhere to the requirements laid out in the Red Hat Gluster Storage Installation Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/installation_guide/chap-planning_red_hat_storage_installation.
- Red Hat Gluster Storage installations must be completely up to date with the latest patches and upgrades. Refer to the Red Hat Gluster Storage 3.3 Installation Guide to upgrade to the latest version: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/installation_guide/.
- The versions of Red Hat Virtualization and Red Hat Gluster Storage integrated must be compatible, according to the table in Section 2.2, “Compatible Versions”.
- A fully-qualified domain name must be set for each hypervisor and Red Hat Gluster Storage server node. Ensure that correct DNS records exist, and that the fully-qualified domain name is resolvable via both forward and reverse DNS lookup.
- To reduce the risk of split-brain conditions developing in the cluster, Red Hat requires three-way replication when using Red Hat Gluster Storage with Red Hat Virtualization. Three-way replication is provided by three-way replicated volumes (
replica 3
), three-way distributed replicated volumes (replica count 3
), and arbitrated replicated and distributed arbitrated replicated volumes (replica 3 arbiter 1
).
2.2. Compatible Versions
Chapter 3. Enabling Red Hat Gluster Storage in Red Hat Virtualization Manager
3.1. Using Red Hat Gluster Storage Volumes in the Red Hat Virtualization Manager

Figure 3.1. Installation Workflow
Procedure 3.1. To Enable Red Hat Gluster Storage in Red Hat Virtualization Manager
Install Red Hat Virtualization Manager
The Red Hat Virtualization Manager is the control center of the Red Hat Virtualization environment. Ensure that Red Hat Virtualization Manger is installed and configured.Install and configure Red Hat Virtualization Manager. See Installing the Red Hat Virtualization Manager in the Red Hat Virtualization Installation Guide for more information: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/part-Installing_Red_Hat_Enterprise_Virtualization.html.Install Hosts
Install the virtual machine hosts using either Red Hat Virtualization Hypervisor or Red Hat Enterprise Linux as hosts. Before beginning the installation process, ensure that all virtualization hosts meet the hardware requirements and that the installation of Red Hat Virtualization Manager is complete.You can use the following hypervisors as hosts:- Red Hat Virtualization Hypervisor 3.4
- Red Hat Enterprise Linux 6.3
- Red Hat Enterprise Linux 6.4
- Red Hat Enterprise Linux 6.5
During installation, set the fully qualified domain name (FQDN) and IP address for the server in order to avoid network conflicts. For information on installing the hypervisor, see Installing Hypervisor Hosts in the Red Hat Virtualization Installation Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/part-Installing_Hypervisor_Hosts.html.Note
You must install Red Hat Enterprise Linux 6.3, Red Hat Enterprise Linux 6.4 Server or Red Hat Enterprise Linux 6.5 on a system to use it as a virtualization host in a Red Hat Virtualization environment. See Installing Red Hat Enterprise Linux Hosts in the Red Hat Virtualization Installation Guide for details: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/chap-Red_Hat_Enterprise_Linux_Hosts.html.Subscribe hosts to channels or repositories
Red Hat Enterprise Linux hosts need to be registered and subscribed to a number of entitlements using either Subscription Manager or Red Hat Network Classic. For more information, see Subscribing to Required Channels using RHN Classic in the Red Hat Virtualization Installation Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/Subscribing_to_Required_Channels_using_Subscription_Manager1.html.Subscribe Red Hat Enterprise Linux 6.3, 6.4, and 6.5 hosts to the channels listed below:- rhel-x86_64-server-6
- rhel-x86_64-rhev-mgmt-agent-6
Apart from the above channels, you must also subscribe to the Red Hat Gluster Storage 3.3 Native Client channels to get the latest version:Run therhn-channel --add --channel
command to subscribe the system to the correct Red Hat Gluster Storage Native Client channel:- For Red Hat Enterprise Linux 7.x clients using Red Hat Satellite Server:
# rhn-channel --add --channel= rhel-x86_64-server-rh-common-7
- For Red Hat Enterprise Linux 6.x clients:
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-6
- For Red Hat Enterprise Linux 5.x clients:
# rhn-channel --add --channel=rhel-x86_64-server-rhsclient-5
For information on how to install native clients, see Installing Native Client in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/chap-accessing_data_-_setting_up_clients#Installing_Native_ClientConfigure the Hypervisor
- Red Hat Virtualization Hypervisor host
- Install Red Hat Virtualization Hypervisor 3.4 on bare metal. See Installing the Red Hat Virtualization Hypervisor chapter of the Red Hat Virtualization Installation Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/part-Installing_Hypervisor_Hosts.html
- Red Hat Enterprise Linux 6.3, 6.4, or 6.5 host
- A Red Hat Enterprise Linux virtualization host must be registered and subscribed to a number of entitlements using either Subscription Manager or Red Hat Network Classic. See Subscribing to Required Channels using RHN Classic in the Installing Red Hat Enterprise Linux Hosts chapter of the Red Hat Virtualization Installation Guide for more information.Subscribe to the Red Hat Gluster Storage Native Client from the Additional Services Channels to ensure the server has the latest clients installed:
#
yum install glusterfs-fuse glusterfs
For more information, see Installing Native Client in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Virtualization/3.6/html/Installation_Guide/chap-Red_Hat_Enterprise_Linux_Hosts.html.
Configure the data centers
Define data centers and clusters to organize the virtualization hosts. The installation process creates a data center and associated cluster namedDefault
.Note
A server can be a Red Hat Virtualization Hypervisor or a Red Hat Enterprise Linux host. A trusted storage pool requires a minimum of one storage host, and at least one active virtualization host is required to connect the system to a storage pool.Install Red Hat Gluster Storage
Install the latest version of Red Hat Gluster Storage on new servers, not the virtualization hosts.For more information on obtaining and installing the software, see the Red Hat Gluster Storage Installation Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/installation_guide/chap-installing_red_hat_storage.If you want to configure combined virtualization hosts and storage servers, see the Red Hat Hyperconverged Infrastructure documentation: https://access.redhat.com/documentation/en-us/red_hat_hyperconverged_infrastructure/1.0/html/deploying_red_hat_hyperconverged_infrastructure/Configure Storage
Configure the Red Hat Gluster Storage installation for your requirements.For instructions on creating a Red Hat Gluster Storage Volume, see chapter Red Hat Gluster Storage Volume in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/chap-red_hat_storage_volumes.Red Hat Virtualization uses a centralized storage system for virtual machine disk images. Before adding storage, ensure that you have a working Red Hat Virtualization Manager environment. You must be able to access the Administration Portal, and there must be at least one host connected with Up status.Optimize your Red Hat Gluster Storage volumes for storing virtual machine images by following the instructions in Procedure 4.1, “To Configure Volumes Using the Command Line Interface”.Note
To reduce the risk of split-brain conditions developing in the cluster, Red Hat requires three-way replication when using Red Hat Gluster Storage with Red Hat Virtualization. Three-way replication is provided by the following volume types:- three-way replicated volumes (
replica 3
) - three-way distributed replicated volumes (
replica count 3
) - arbitrated replicated or distributed arbitrated replicated volumes (
replica 3 arbiter 1
)
Attach Storage to Hypervisor
Check that you can access the Red Hat Virtualization Manager Administration Portal and that at least one virtualization host hasUp
status before you continue.Create a new storage domain with aData
domain function and theGlusterFS
storage type. For further information, see the Adding a Red Hat Gluster Storage Volume as a Storage Domain section in the Red Hat Virtualization Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.1/html/administration_guide/sect-using_red_hat_gluster_storage_as_a_storage_domain
3.2. Optimizing Virtual Machines Running On Red Hat Gluster Storage Volumes
virtual-guest
profile does not provide sufficient readahead by default. You can improve virtual machine performance by editing the virtual-guest
profile to provide a more suitable readahead value.
Install the Tune daemon
Install the tuned daemon that tunes the system settings dynamically.#
yum install tuned
On the virtual machine, edit the virtual-guest profile
In the/etc/tune-profiles/virtual-guest/ktune.sh
file, change the value of themultiply_disk_readahead
option to16
.Apply the modified virtual-guest profile on the virtual machines
Activate the modified profile with the command:# tuned-adm profile virtual-guest
Chapter 4. Hosting Virtual Machine Images on Red Hat Gluster Storage volumes
4.1. Configuring Volumes Using the Command Line Interface
Important
Procedure 4.1. To Configure Volumes Using the Command Line Interface
Configure the rhgs-random-io tuned profile
Install the tuned tuning daemon and configure Red Hat Gluster Storage servers to use therhgs-random-io
profile:# yum install tuned # tuned-adm profile rhgs-random-io
For more information on available tuning profiles, refer to thetuned-adm
man page, or see the Red Hat Gluster Storage 3.3 Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/.Review virt volume group configuration details
The settings stored in the/var/lib/glusterd/groups/virt
file are used to configure volumes in thevirt
volume group.Important
When you upgrade, a new virt file may be created in/var/lib/glusterd/groups/virt.rpmnew
. Ensure to apply the newvirt
file on the existing volumes by renaming thevirt.rpmnew
file tovirt
, along with the customized settings.By default, the/var/lib/glusterd/groups/virt
file contains the following recommended settings.performance.quick-read=off performance.read-ahead=off performance.io-cache=off performance.stat-prefetch=off performance.low-prio-threads=32 network.remote-dio=enable cluster.eager-lock=enable cluster.quorum-type=auto cluster.server-quorum-type=server cluster.data-self-heal-algorithm=full cluster.locking-scheme=granular cluster.shd-max-threads=8 cluster.shd-wait-qlength=10000 features.shard=on user.cifs=off
With the exception ofcluster.eager-lock
,features.shard
, andcluster.data-self-heal-algorithm
, these settings prevent caching within GlusterFS client stack, as it is the preferred mode for attaching disks to a virtual machine. Thecluster.eager-lock
option optimizes write performance with synchronous replication when there is a single writer to a file. Thefeatures.shard
option enables sharding behavior. Thecluster.data-self-heal-algorithm
option specifies how self-heal operations are performed. For more information about any of these settings, see the Red Hat Gluster Storage 3.3 Administration Guide: https://access.redhat.com/documentation/en-US/Red_Hat_storage/3.3/html/Administration_Guide/chap-Managing_Red_Hat_Storage_Volumes.html#Configuring_Volume_OptionsRed Hat also recommends adding the following line to the file to improve self-heal performance.cluster.granular-entry-heal=enable
Note
Server-Side and Client-Side Quorum are enabled by default in the/var/lib/glusterd/groups/virt
file to minimize split-brain scenarios. If Server-Side Quorum is not met, then the Red Hat Gluster Storage volumes become unavailable causing the Virtual Machines (VMs) to move to a paused state. If Client-Side Quorum is not met, although a replica pair in a Red Hat Gluster Storage volume is available in the read-only mode, the VMs move to a paused state.Manual intervention is required to make the VMs resume the operations after the quorum is restored. Consistency is achieved at the cost of fault tolerance. If fault tolerance is preferred over consistency, disable server-side and client-side quorum with the commands:# gluster volume reset <vol-name> server-quorum-type # gluster volume reset <vol-name> quorum-type
For more information on these configuration settings, see the following sections in the Red Hat Gluster Storage Administration Guide:Assign volumes to virt group
Red Hat recommends assigning volumes that store virtual machine images to thevirt
volume group so that these volumes can use common configuration details for their common use case. This has the same effect as the Optimize for Virt Store option in the management console.# gluster volume set VOLNAME group virt
Important
After tagging the volume asgroup virt
, use the volume for storing virtual machine images only and always access the volume through the glusterFS native client.Allow KVM and VDSM brick access
Set the brick permissions forvdsm
andkvm
. If you do not set the required brick permissions, creation of virtual machines fails.- Set the user and group permissions using the following commands:
# gluster volume set VOLNAME storage.owner-uid 36 # gluster volume set VOLNAME storage.owner-gid 36
- If you are using QEMU/KVM as a hypervisor, set the user and group permissions using the following commands:
# gluster volume set VOLNAME storage.owner-uid 107 # gluster volume set VOLNAME storage.owner-gid 107
Configure granular healing
Red Hat recommends settingcluster.granular-entry-heal
toenable
for this use case. To configure granular healing, run the following commands.# gluster volume set VOLNAME cluster.granular-entry-heal enable
4.2. Configuring Virtual Machines on Red Hat Gluster Storage volumes using the Red Hat Virtualization Manager
Note
Procedure 4.2. To Add a Red Hat Gluster Storage Server for Virtualization Using Red Hat Virtualization Manager
- Create a data center:
- Select the Data Centers resource tab to list all data centers.
- Click New Data Center window.to open the
Figure 4.1. New Data Center Window
- Enter the Name and Description of the data center.
- Select the storage Type as
Shared
from the drop-down menu. - Select the Quota Mode as
Disabled
. - Click.
The new data center isUninitialized
until you configure the cluster, host, and storage settings. - Create a cluster:
- Select the Clusters resource tab to list all clusters.
- Click New Cluster window.to open the
Figure 4.2. New Cluster Window
- Select a Data Center for the cluster from the drop-down menu.
- Enter a Name and Description for the cluster.
- Select the CPU Name and Compatibility Version from the drop-down menus.
- Check Enable Virt Service.
- Click.
- Add hosts:
- Select the Hosts resource tab to view a list of all hosts in the system.
- Click New Host window.to open the
Figure 4.3. New Host Window
Important
A Red Hat Enterprise Linux hypervisor and Red Hat Virtualization hypervisor on a single VDSM cluster accessing the same virtual machine image store is not supported. - Select the Data Center and Host Cluster for the new host from the drop-down menus.
- Enter the Name, Address, and Root Password of the new hypervisor host.
- Check Automatically configure host firewall if required.
- Click.
The new host appears in the list of hypervisor hosts with the status Installing. After the host is activated, the status changes to Up automatically. - Create and configure volumes on the Red Hat Gluster Storage cluster using the command line interface. For information on creating and configuring volumes, see Section 4.1, “Configuring Volumes Using the Command Line Interface” and Red Hat Gluster Storage Volumes in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/chap-red_hat_storage_volumes.
- Add a storage domain using Red Hat Virtualization Manager:
- Select the Storage resource tab to list existing storage domains.
- Clickto open the New Domain window.
Figure 4.4. New Domain Window
- Enter a Name for the storage domain.
- Select a shared Data Center to associate with the storage domain.
- Set the Domain Function to
Data
and the Storage Type toGlusterFS
. - Select a host from the Host to Use drop-down menu.
- Check the Use managed gluster volume checkbox and select the appropriate volume from the Gluster dropdown menu.
Note
This dropdown menu is only populated with volumes whose nodes are managed by Red Hat Virtualization Manager. See Chapter 5, Managing Red Hat Gluster Storage Servers and Volumes using Red Hat Virtualization Manager for instructions on how to set up management of your Red Hat Gluster Storage nodes by Red Hat Virtualization Manager. - Enter the applicable Red Hat Gluster Storage native client Mount Options. Enter multiple mount options separated by commas. For more information on native client mount options, see Creating Access to Volumes in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/chap-accessing_data_-_setting_up_clients. Note that only the native client is supported when integrating Red Hat Gluster Storage and Red Hat Virtualization.
- Click.
- Clickto activate the new Red Hat Gluster Storage domain.
Figure 4.5. Activated Red Hat Gluster Storage Domain
Note
Chapter 5. Managing Red Hat Gluster Storage Servers and Volumes using Red Hat Virtualization Manager
Enable Gluster Service
option enabled.
Note
Note
5.1. Creating a Data Center
- Select the Data Centers resource tab to list all data centers in the results list.
- Click the New button to open the New Data Center window.
Figure 5.1. New Data Center Window
- Enter the
Name
andDescription
of the data center. - Set
Type
toShared
from the drop-down menu.Set Quota Mode asDisabled
. - Click
OK
.
Uninitialized
until a cluster, host, and storage are configured.
5.2. Creating a Cluster
- Create a cluster with the gluster service enabled.
Figure 5.2. New Cluster Window
- Select the
Compatibility Version
from the drop-down menu. - Click.
5.3. Adding Red Hat Gluster Storage Server to the Cluster
- To import an existing gluster configuration:
- Select Enable Gluster Service.
- Select Import existing gluster configuration. With this option you can import the existing Gluster configurations into a cluster.
- Provide the IP address of one of the hosts.
- To add new hosts:
- Use the drop-down lists to select the Data Center and Host Cluster for the new host.
- Click.The new host displays in the list of hosts with a status of
Installing
. The host is activated and the status changes to Up automatically.
You can manage the lifecycle of a volume using hook scripts. For more information, see chapter Managing Gluster Hooks in the Red Hat Gluster Storage Console Administration GuideNote
To add multiple servers to a cluster, you must first add a Red Hat Gluster Storage server to the cluster. An error message appears if you add multiple servers in the first attempt.Figure 5.3. New Host window
5.4. Optimizing Red Hat Gluster Storage Volumes for Virtual Machine Images
virt
group.
- On the Volumes tab, select the volume to configure and click Optimize for Virt Store.The volume is configured and
group
,storage-owner-uid
, andstorage-owner-gid
options are set.Figure 5.4. Volume Options
For more information on eachvolume set
tunable options, see Managing Red Hat Gluster Storage Volumes in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/chap-managing_red_hat_storage_volumes.
5.5. Starting the Red Hat Gluster Storage Volume
- In the Volumes tab, select the new volume and click to start the volume.The volume status changes to Up.
Important
If you are using Red Hat Gluster Storage Volumes for hosting Virtual Machine images, you must optimize the volume before attaching the volume to the storage domain.
5.6. Adding Bricks to Volumes
- Click
Add Bricks
to add bricks to your volume.A brick is the basic unit of storage, represented by an export directory on a server in the storage cluster. You can expand or shrink your cluster by adding new bricks or deleting existing bricks.Figure 5.5. Add Bricks
- Enter the path for the brick and click OK.
- In the Allow Access From field, specify volume access control as a comma-separated list of IP addresses or hostnames.By default, an asterisk (*) is used as a wildcard to specify ranges of addresses such as IP addresses or hostnames. You need to use IP-based authentication for Gluster exports.
- Click OK to create the volume.The new volume is added and it appears on thetab.
Allow bricks in root partition and reuse the bricks by clearing xattrs
5.7. Performing Asynchronous Tasks
Chapter 6. Recommended Best Practices and Troubleshooting
- Enable the server side quorum at all times for the Red Hat Gluster Storage volumes hosting virtual machine images. For more information see Configuring Server-Side Quorum in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-managing_split-brain#sect-Preventing_Split-brain.
- Red Hat Gluster Storage Volumes that serve as Red Hat Virtualization Master Storage Domain contain SANLocks and have the Red Hat Gluster Storage volume profile set to
virt
. This enables the Client Side Quorum and avoids the inconsistency problems for Multiple Writer situations. For more information see Configuring Client-Side Quorum in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-managing_split-brain#sect-Preventing_Split-brain. - To reduce the risk of split-brain conditions developing in the cluster, Red Hat requires three-way replication when using Red Hat Gluster Storage with Red Hat Virtualization. Three-way replication is provided by three-way replicated volumes (
replica 3
), three-way distributed replicated volumes (replica count 3
), and arbitrated replicated and distributed arbitrated replicated volumes (replica 3 arbiter 1
).
Appendix A. Revision History
Revision History | ||||
---|---|---|---|---|
Revision 3.2-2 | Fri Mar 17 2017 | |||
|