-
Language:
English
-
Language:
English
Red Hat Training
A Red Hat training course is available for Red Hat Gluster Storage
Configuring Red Hat Virtualization with Red Hat Gluster Storage
Traditional, non-hyperconverged storage for virtual machines
Abstract
Chapter 1. Introduction to Red Hat Gluster Storage for Virtualization

Figure 1.1. Architecture of integrated Red Hat Virtualization and Red Hat Gluster Storage
Important
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.2/html/installation_guide/index.
- 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.4/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.4 Installation Guide to upgrade to the latest version: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.4/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.
- Red Hat Gluster Storage volumes must either use three-way replication or arbitrated replication. This reduces the risk of split-brain condition developing in the cluster. The following volume types are supported:
- arbitrated replicated or distributed arbitrated replicated volumes (
replica 3 arbiter 1
)
- Server-side quorum, client-side quorum, and sharding are all required for a supported configuration. These are enabled by default in the
virt
tuning profile covered in Chapter 4, Hosting Virtual Machine Images on Red Hat Gluster Storage volumes. See Preventing Split-brain for information about how quorum settings help prevent split brain. See Creating Sharded Volumes for information about why sharding reduces heal and geo-replication time.
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_virtualization/4.2/html-single/installation_guide/#part-Installing_the_Red_Hat_Virtualization_Manager.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 Host 4.2
- Red Hat Enterprise Linux 7
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_virtualization/4.2/html/installation_guide/red_hat_virtualization_hosts.Note
You must install Red Hat Enterprise Linux 7 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_virtualization/4.2/html/installation_guide/chap-red_hat_enterprise_linux_hosts.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 Enabling the Red Hat Virtualization Manager Repositories in the Red Hat Virtualization Installation Guide: https://access.redhat.com/documentation/en-us/red_hat_virtualization/4.2/html-single/installation_guide/#Enabling_the_Red_Hat_Virtualization_Manager_Repositories_standalone_install.Subscribe Red Hat Enterprise Linux 7 hosts to the channel listed below:- rhel-7-server-rpms
- rhel-7-server-rhv-4-mgmt-agent-rpms
- 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 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.4/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_virtualization/4.2/html-single/installation_guide/#part-Installing_Hosts
- Red Hat Enterprise Linux 7 host
- A Red Hat Enterprise Linux virtualization host must be registered and subscribed to a number of entitlements using either Subscription Manager, See Subscribing to Required Channels using Red Hat Subscription Manager 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_virtualization/4.2/html-single/installation_guide/#chap-Red_Hat_Enterprise_Linux_Hosts.
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.4/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 Red Hat Gluster Storage volumes as required by your use case, ensuring that you adhere to the Chapter 2, Support Requirements.Optimize your Red Hat Gluster Storage volumes for storing virtual machine images by following the instructions in Procedure 4.1, “Configuring Volumes Using the Command Line Interface”.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.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
Procedure 4.1. Configuring 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.4 Administration Guide: https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.4/html/administration_guide/.Note
When you upgrade, a new virt file may be created in/var/lib/glusterd/groups/virt.rpmnew
. Apply the newvirt
file to the existing volumes by renaming thevirt.rpmnew
file tovirt
.Assign volumes to virt group
Assign volumes that store virtual machine images to thevirt
volume group to apply the settings in thevirt
profile. This has the same effect as the Optimize for Virt Store option in the management console.# gluster volume set VOLNAME group virt
See Appendix A, Thevirt
group profile for more information about this configuration.Important
Volumes in thevirt
group must only be used for storing machine images, and must only be accessed using the native FUSE client.(Recommended) Configure improved self-heal performance
Run the following command to improve the performance of volume self-heal operations.# gluster volume heal volname cluster.granular-entry-heal enable
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
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 to open the New Data Center window.
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 OK.
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 to open the New Cluster window.
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 OK.
- Add hosts:
- Select the Hosts resource tab to view a list of all hosts in the system.
- Click New to open the New Host window.
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 OK.
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.4/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.
- Click New Domain to 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.4/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 OK.
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 OK.
Important
iptables
for the option Firewall Type
.
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 OK.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.4/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 Start 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 the Volumes tab.
Allow bricks in root partition and reuse the bricks by clearing xattrs
5.7. Performing Asynchronous Tasks
Appendix A. The virt
group profile
/var/lib/glusterd/groups/virt
file defines a configuration that is used for all volumes in the virt
group. Defining a group configuration and adding volumes to a group helps save time and effort when you want to update the settings on all volumes in the group.
/var/lib/glusterd/groups/virt
file are as follows:
performance.quick-read=off performance.read-ahead=off performance.io-cache=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 cluster.choose-local=off client.event-threads=4 server.event-threads=4 performance.client-io-threads=on
cluster.eager-lock
option optimizes write performance by using synchronous replication when there is a single writer to a file.
cluster.data-self-heal
option specifies how self-heal operations are performed.
features.shard
and features.shard-block-size
options enable sharding behavior in the volume and set a block size appropriate for storing disk images.
cluster.quorum-type=auto
and cluster.server-quorum-type
options enable client and server-side quorum to help ensure consistency and to prevent split-brain scenarios.
Note
cluster.quorum-type=auto
and cluster.server-quorum-type=server
provide consistency at the cost of fault tolerance. Using these settings, if server-side quorum is not met, virtual machines pause because volumes are not available. If client-side quorum is not met, virtual machines pause even though a read-only replica pair is available. Manual intervention is then required to make the VMs resume the operations after the quorum is restored.
# gluster volume reset volname server-quorum-type # gluster volume reset volname quorum-type
Appendix B. Revision History
Revision History | |||
---|---|---|---|
Revision 3.4-2 | Tue Sep 04 2018 | Red Hat Gluster Storage Documentation Team | |
| |||
Revision 3.4-1 | Tue Feb 06 2018 | Laura Bailey | |
|