4.6. Configuring shared block storage
To create extra storage resources, you can use Amazon Elastic Block Storage (EBS) Multi-Attach volumes to configure shared block storage for a Red Hat High Availability cluster.
Prerequisites
- You have 3 RHEL instances running in a cluster as a three-node cluster with a 1 TB shared disk.
- You have access to an AWS Nitro System-based Amazon EC2 instance.
Procedure
Create a shared block volume in the
us-east-1aavailability zone:$ aws ec2 create-volume --availability-zone <us_east_1a> --no-encrypted --size <1024> --volume-type <io1> --iops <51200> --multi-attach-enabled { "AvailabilityZone": "us-east-1a", "CreateTime": "2020-08-27T19:16:42.000Z", "Encrypted": false, "Size": 1024, "SnapshotId": "", "State": "creating", "VolumeId": "vol-042a5652867304f09", "Iops": 51200, "Tags": [ ], "VolumeType": "io1" }For each instance in your cluster, attach a shared block volume. Use your
<instance_id>and<volume_id>, for examplevol-042a5652867304f09toinstance i-0eb803361c2c887f2:$ aws ec2 attach-volume --device /dev/xvdd --instance-id i-0eb803361c2c887f2 --volume-id vol-042a5652867304f09 { "AttachTime": "2020-08-27T19:26:16.086Z", "Device": "/dev/xvdd", "InstanceId": "i-0eb803361c2c887f2", "State": "attaching", "VolumeId": "vol-042a5652867304f09" }
Verification
Verify the block device is available by using the
sshcommand with your instance IP198.51.100.3for each instance in the cluster:# ssh 198.51.100.3 "hostname ; lsblk -d | grep ' 1T '" node a nvme2n1 259:1 0 1T 0 diskUse the
sshcommand to verify that each instance in your cluster uses the same shared disk:# ssh 198.51.100.3 "hostname ; lsblk -d | grep ' 1T ' | awk '{print \$1}' | xargs -i udevadm info --query=all --name=/dev/{} | grep '^E: ID_SERIAL='" nodea E: ID_SERIAL=Amazon Elastic Block Store_vol0fa5342e7aedf09f7