このコンテンツは選択した言語では利用できません。
Chapter 4. Hosting Virtual Machine Images on Red Hat Gluster Storage volumes
Red Hat Gluster Storage provides a POSIX-compatible file system to store virtual machine images in Red Hat Gluster Storage volumes.
This chapter describes how to configure volumes using the command line interface, and how to prepare Red Hat Gluster Storage servers for virtualization using Red Hat Virtualization Manager.
4.1. Configuring Volumes Using the Command Line Interface
Red Hat recommends configuring volumes before starting them. For information on creating volumes, see 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.
Important
Hosting virtual machine images requires the consistency of three-way replication, which is provided by three-way replicated volumes, three-way distributed replicated volumes, arbitrated replicated volumes, and distributed arbitrated replicated volumes.
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