이 콘텐츠는 선택한 언어로 제공되지 않습니다.

23.3. Provisioning Storage


Amazon Elastic Block Storage (EBS) is designed specifically for use with Amazon EC2 instances. Amazon EBS provides storage that behaves like a raw, unformatted, external block device.

Important

External snapshots, such as snapshots of a virtual machine/instance, where Red Hat Gluster Storage Server is installed as a guest OS or FC/iSCSI SAN snapshots are not supported.

23.3.1. Provisioning Storage for Two-way Replication Volumes

The supported configuration for two-way replication is upto 24 Amazon EBS volumes of equal size, attached as a brick, which enables consistent I/O performance.
Single EBS volumes exhibit inconsistent I/O performance. Hence, other configurations are not supported by Red Hat.
To Add Amazon Elastic Block Storage Volumes
  1. Login to Amazon Web Services at http://aws.amazon.com and select the Amazon EC2 tab.
  2. In the Amazon EC2 Dashboard select the Elastic Block Store > Volumes option to add the Amazon Elastic Block Storage Volumes
  3. Create a thinly provisioned logical volume using the following steps:
    1. Create a physical volume (PV) by using the pvcreate command.
      For example:
      pvcreate --dataalignment 1280K /dev/sdb
      Copy to Clipboard Toggle word wrap

      Note

      • Here, /dev/sdb is a storage device. This command has to be executed on all the disks if there are multiple volumes. For example:
        # pvcreate --dataalignment 1280K /dev/sdc /dev/sdd /dev/sde ...
        Copy to Clipboard Toggle word wrap
      • The device name and the alignment value will vary based on the device you are using.
      Use the correct dataalignment option based on your device. For more information, see Section 13.2, “Brick Configuration”
    2. Create a Volume Group (VG) from the PV using the vgcreate command:
      For example:
      vgcreate --physicalextentsize 128K rhs_vg /dev/sdb
      Copy to Clipboard Toggle word wrap

      Note

      Here, /dev/sdb is a storage device. This command has to be executed on all the disks if there are multiple volumes. For example:
      vgcreate --physicalextentsize 128K rhs_vg /dev/sdc /dev/sdd /dev/sde ...
      Copy to Clipboard Toggle word wrap
    3. Create a thin-pool using the following commands:
      1. Create an LV to serve as the metadata device using the following command:
        lvcreate -L metadev_sz --name metadata_device_name VOLGROUP
        Copy to Clipboard Toggle word wrap
        For example:
        lvcreate -L 16776960K --name rhs_pool_meta rhs_vg
        Copy to Clipboard Toggle word wrap
      2. Create an LV to serve as the data device using the following command:
        lvcreate -L datadev_sz --name thin_pool VOLGROUP
        Copy to Clipboard Toggle word wrap
        For example:
        lvcreate -L 536870400K --name rhs_pool rhs_vg
        Copy to Clipboard Toggle word wrap
      3. Create a thin pool from the data LV and the metadata LV using the following command:
        lvconvert --chunksize STRIPE_WIDTH --thinpool VOLGROUP/thin_pool --poolmetadata VOLGROUP/metadata_device_name
        Copy to Clipboard Toggle word wrap
        For example:
        lvconvert --chunksize 1280K --thinpool rhs_vg/rhs_pool --poolmetadata rhs_vg/rhs_pool_meta
        Copy to Clipboard Toggle word wrap

        Note

        By default, the newly provisioned chunks in a thin pool are zeroed to prevent data leaking between different block devices. In the case of Red Hat Gluster Storage, where data is accessed via a file system, this option can be turned off for better performance.
        lvchange --zero n VOLGROUP/thin_pool
        Copy to Clipboard Toggle word wrap
        For example:
        lvchange --zero n rhs_vg/rhs_pool
        Copy to Clipboard Toggle word wrap
    4. Create a thinly provisioned volume from the previously created pool using the lvcreate command:
      For example:
      lvcreate -V 1G -T rhs_vg/rhs_pool -n rhs_lv
      Copy to Clipboard Toggle word wrap
      It is recommended that only one LV should be created in a thin pool.
  4. Format the logical volume using the following command:
    # mkfs.xfs -i size=512 DEVICEmkfs.xfs -i size=512 DEVICE
    Copy to Clipboard Toggle word wrap
    For example, to format /dev/glustervg/glusterlv:
    # mkfs.xfs -i size=512 /dev/glustervg/glusterlv
    Copy to Clipboard Toggle word wrap
  5. Mount the device using the following commands:
    # mkdir -p /export/glusterlv
    # mount /dev/glustervg/glusterlv /export/glusterlv
    Copy to Clipboard Toggle word wrap
  6. Using the following command, add the device to /etc/fstab so that it mounts automatically when the system reboots:
    # echo "/dev/glustervg/glusterlv /export/glusterlv xfs defaults 0 2" >> /etc/fstab
    Copy to Clipboard Toggle word wrap
After adding the EBS volumes, you can use the mount point as a brick with existing and new volumes. For more information on creating volumes, see Chapter 6, Red Hat Gluster Storage Volumes.

23.3.2. Provisioning Storage for Three-way Replication Volumes

Red Hat Gluster Storage supports synchronous three-way replication across three availability zones. The supported configuration for three-way replication is upto 24 Amazon EBS volumes of equal size, attached as a brick, which enables consistent I/O performance.
  1. Login to Amazon Web Services at http://aws.amazon.com and select the Amazon EC2 tab.
  2. Create three AWS instances in three different availability zones. All the bricks of a replica pair must be from different availability zones. For each replica set, select the instances for the bricks from three different availability zones. A replica pair must not have a brick along with its replica from the same availability zone.
  3. Add single EBS volume to each AWS instances
  4. Create a thinly provisioned logical volume using the following steps:
    1. Create a physical volume (PV) by using the pvcreate command.
      For example:
      pvcreate --dataalignment 1280K /dev/sdb
      Copy to Clipboard Toggle word wrap

      Note

      • Here, /dev/sdb is a storage device. This command has to be executed on all the disks if there are multiple volumes. For example:
        pvcreate --dataalignment 1280K /dev/sdc /dev/sdd /dev/sde ...
        Copy to Clipboard Toggle word wrap
      • The device name and the alignment value will vary based on the device you are using.
      Use the correct dataalignment option based on your device. For more information, see Section 13.2, “Brick Configuration”
    2. Create a Volume Group (VG) from the PV using the vgcreate command:
      For example:
      vgcreate --physicalextentsize 128K rhs_vg /dev/sdb
      Copy to Clipboard Toggle word wrap

      Note

      Here, /dev/sdb is a storage device. This command has to be executed on all the disks if there are multiple volumes. For example:
      vgcreate --physicalextentsize 128K rhs_vg /dev/sdc /dev/sdd /dev/sde ...
      Copy to Clipboard Toggle word wrap
    3. Create a thin-pool using the following commands:
      1. Create an LV to serve as the metadata device using the following command:
        lvcreate -L metadev_sz --name metadata_device_name VOLGROUP
        Copy to Clipboard Toggle word wrap
        For example:
        lvcreate -L 16776960K --name rhs_pool_meta rhs_vg
        Copy to Clipboard Toggle word wrap
      2. Create an LV to serve as the data device using the following command:
        lvcreate -L datadev_sz --name thin_pool VOLGROUP
        Copy to Clipboard Toggle word wrap
        For example:
        lvcreate -L 536870400K --name rhs_pool rhs_vg
        Copy to Clipboard Toggle word wrap
      3. Create a thin pool from the data LV and the metadata LV using the following command:
        lvconvert --chunksize STRIPE_WIDTH --thinpool VOLGROUP/thin_pool --poolmetadata VOLGROUP/metadata_device_name
        Copy to Clipboard Toggle word wrap
        For example:
        lvconvert --chunksize 1280K --thinpool rhs_vg/rhs_pool --poolmetadata rhs_vg/rhs_pool_meta
        Copy to Clipboard Toggle word wrap

        Note

        By default, the newly provisioned chunks in a thin pool are zeroed to prevent data leaking between different block devices. In the case of Red Hat Gluster Storage, where data is accessed via a file system, this option can be turned off for better performance.
        lvchange --zero n VOLGROUP/thin_pool
        Copy to Clipboard Toggle word wrap
        For example:
        lvchange --zero n rhs_vg/rhs_pool
        Copy to Clipboard Toggle word wrap
    4. Create a thinly provisioned volume from the previously created pool using the lvcreate command:
      For example:
      lvcreate -V 1G -T rhs_vg/rhs_pool -n rhs_lv
      Copy to Clipboard Toggle word wrap
      It is recommended that only one LV should be created in a thin pool.
  5. Format the logical volume using the following command:
    # mkfs.xfs -i size=512 DEVICEmkfs.xfs -i size=512 DEVICE
    Copy to Clipboard Toggle word wrap
    For example, to format /dev/glustervg/glusterlv:
    # mkfs.xfs -i size=512 /dev/glustervg/glusterlv
    Copy to Clipboard Toggle word wrap
  6. Mount the device using the following commands:
    # mkdir -p /export/glusterlv
    # mount /dev/glustervg/glusterlv /export/glusterlv
    Copy to Clipboard Toggle word wrap
  7. Using the following command, add the device to /etc/fstab so that it mounts automatically when the system reboots:
    # echo "/dev/glustervg/glusterlv /export/glusterlv xfs defaults 0 2" >> /etc/fstab
    Copy to Clipboard Toggle word wrap
Client-side Quorum
You must ensure to create each replica set of a volume in three difference zones. With this configuration, there will be no impact on the data availability even if two availability zones have hit an outage. However, when you set client-side quorum to avoid split-brain scenarios, unavailability of two zones would make the access read-only.
For information on creating three-way replicated volumes, see Section 6.7, “Creating Distributed Replicated Volumes”. For more information on configuring client-side quorum, see Section 10.11.1.2, “Configuring Client-Side Quorum”.
맨 위로 이동
Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다. 최신 업데이트를 확인하세요.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

Theme

© 2025 Red Hat