検索

このコンテンツは選択した言語では利用できません。

Chapter 4. Hosting Virtual Machine Images on Red Hat Gluster Storage volumes

download PDF
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

  1. Configure the rhgs-random-io tuned profile

    Install the tuned tuning daemon and configure Red Hat Gluster Storage servers to use the rhgs-random-io profile:
    # yum install tuned
    # tuned-adm profile rhgs-random-io
    For more information on available tuning profiles, refer to the tuned-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/.
  2. Review virt volume group configuration details

    The settings stored in the /var/lib/glusterd/groups/virt file are used to configure volumes in the virt volume group.

    Important

    When you upgrade, a new virt file may be 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.
    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 of cluster.eager-lock, features.shard, and cluster.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. The cluster.eager-lock option optimizes write performance with synchronous replication when there is a single writer to a file. The features.shard option enables sharding behavior. The cluster.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_Options
    Red 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:
  3. Assign volumes to virt group

    Red Hat recommends assigning volumes that store virtual machine images to the virt 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 as group virt, use the volume for storing virtual machine images only and always access the volume through the glusterFS native client.
  4. Allow KVM and VDSM brick access

    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
    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
  5. Configure granular healing

    Red Hat recommends setting cluster.granular-entry-heal to enable for this use case. To configure granular healing, run the following commands.
    # gluster volume set VOLNAME cluster.granular-entry-heal enable
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

© 2024 Red Hat, Inc.