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 Enterprise Virtualization Manager.
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_Storage/3.1/html/Administration_Guide/chap-Red_Hat_Storage_Volumes.html.

Important

Three-way replication (replica 3 or replica count 3) is recommended for hosting virtual machine images.

Procedure 4.1. To Configure Volumes Using the Command Line Interface

  1. Configure the Red Hat Gluster Storage volume using the following command:
    # gluster volume set VOLNAME group virt
    Copy to Clipboard Toggle word wrap

    Important

    After tagging the volume as group virt, use the volume for storing virtual machine images only and always access the volume through the glusterFS native client.
  2. The gluster volume set <VOLNAME> group virt command configures the specified volume using the settings in the /var/lib/glusterd/groups/virt file. The following settings are the recommended defaults:
    quick-read=off
    read-ahead=off
    io-cache=off
    stat-prefetch=off
    eager-lock=enable
    remote-dio=on
    quorum-type=auto
    server-quorum-type=server
    Copy to Clipboard Toggle word wrap

    Important

    When you upgrade to Red Hat Gluster Storage 3.1, a new virt file is created in /var/lib/glusterd/groups/virt.rpmnew. Ensure to apply the new virt file on the existing volumes by renaming the virt.rpmnew file to virt, along with the customized settings.
    All the performance-related settings other than cluster.eager-lock prevent caching within GlusterFS client stack, as it is the preferred mode for attaching disks to a virtual machine. The cluster.eager-lock option optimizes write performance with synchronous replication when there is a single writer to a file. For description on each of these performance-related settings, see chapter Configuring Volume Options in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3.1/html/Administration_Guide/chap-Managing_Red_Hat_Storage_Volumes.html#Configuring_Volume_Options.

    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
    Copy to Clipboard Toggle word wrap
    For more information on these configuration settings, see Managing Red Hat Gluster Storage Volumes in the Red Hat Gluster Storage Administration Guide: https://access.redhat.com/documentation/en-US/Red_Hat_Storage/3.1/html/Administration_Guide/chap-Managing_Red_Hat_Storage_Volumes.html.
  3. Set the brick permissions for vdsm and kvm. If you do not set the required brick permissions, creation of virtual machines fails.
    1. 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
      Copy to Clipboard Toggle word wrap
    2. 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
      Copy to Clipboard Toggle word wrap
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat