此内容没有您所选择的语言版本。
Chapter 18. 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 Storage Server is installed as a guest OS or FC/iSCSI SAN snapshots are not supported.
The supported configuration for two-way replication is eight Amazon EBS volumes of equal size on software RAID 0 (stripe), attached as a brick, which enables consistent I/O performance. You can create a brick ranging from 8 GB to 8 TB. For example, if you create a brick of 128 GB, you must create 8 Amazon EBS volumes of size 16 GB each and then assemble them into a RAID 0 array.
Single EBS volumes exhibit inconsistent I/O performance. Hence, other configurations are not supported by Red Hat.
To Add Amazon Elastic Block Storage Volumes
- Login to Amazon Web Services at http://aws.amazon.com and select the tab.
- In the select the option to add the Amazon Elastic Block Storage Volumes
- In order to support configuration as a brick, assemble the eight Amazon EBS volumes into a RAID 0 (stripe) array using the following command:
mdadm --create ARRAYNAME --level=0 --raid-devices=8 list of all devices
# mdadm --create ARRAYNAME --level=0 --raid-devices=8 list of all devicesCopy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to create a software RAID 0 of eight volumes:mdadm --create /dev/md0 --level=0 --raid-devices=8 /dev/xvdf1 /dev/xvdf2 /dev/xvdf3 /dev/xvdf4 /dev/xvdf5 /dev/xvdf6 /dev/xvdf7 /dev/xvdf8 mdadm --examine --scan > /etc/mdadm.conf
# mdadm --create /dev/md0 --level=0 --raid-devices=8 /dev/xvdf1 /dev/xvdf2 /dev/xvdf3 /dev/xvdf4 /dev/xvdf5 /dev/xvdf6 /dev/xvdf7 /dev/xvdf8 # mdadm --examine --scan > /etc/mdadm.confCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Create a Logical Volume (LV) using the following commands:
pvcreate /dev/md0 vgcreate glustervg /dev/md0 vgchange -a y glustervg lvcreate -a y -l 100%VG -n glusterlv glustervg
# pvcreate /dev/md0 # vgcreate glustervg /dev/md0 # vgchange -a y glustervg # lvcreate -a y -l 100%VG -n glusterlv glustervgCopy to Clipboard Copied! Toggle word wrap Toggle overflow In these commands,glustervgis the name of the volume group andglusterlvis the name of the logical volume. Red Hat Storage uses the logical volume created over EBS RAID as a brick. For more information about logical volumes, see the Red Hat Enterprise Linux Logical Volume Manager Administration Guide. - Format the logical volume using the following command:
mkfs.xfs -i size=512 DEVICE
# mkfs.xfs -i size=512 DEVICECopy to Clipboard Copied! Toggle word wrap Toggle overflow For example, to format/dev/glustervg/glusterlv:mkfs.xfs -i size=512 /dev/glustervg/glusterlv
# mkfs.xfs -i size=512 /dev/glustervg/glusterlvCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Mount the device using the following commands:
mkdir -p /export/glusterlv mount /dev/glustervg/glusterlv /export/glusterlv
# mkdir -p /export/glusterlv # mount /dev/glustervg/glusterlv /export/glusterlvCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Using the following command, add the device to
/etc/fstabso that it mounts automatically when the system reboots:echo "/dev/glustervg/glusterlv /export/glusterlv xfs defaults 0 2" >> /etc/fstab
# echo "/dev/glustervg/glusterlv /export/glusterlv xfs defaults 0 2" >> /etc/fstabCopy to Clipboard Copied! Toggle word wrap Toggle overflow
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 Storage Volumes.