Jump to Navigation

037 - XFS Filesystem for EC2

The XFS filesystem seems to be the preferred choice for the persistent storage for EC2, due to its ability
to freeze the filesystem during a snapshot operation, and you'll need the following to be installed
to take advantage of that:

Example (Fedora, CentOS):

yum -y install kmod-xfs.i686
yum -y install xfsdump.i386
yum -y install xfsprogs.i386
yum -y install dmapi

In Elasticfox, select the Volumes and Snapshots tab. Select the volume you created and click on the green
checkmark to attach it to your running instance. A dialog will appear asking for you to select the instance
to attach this to (there should only be the one in the pull-down list) and a device path.
Enter a path of /dev/sdh for this volume and proceed. Your volume should shortly be attached to your instance.

Switch back to the instance to format and mount the volume. Run the following commands to create
an XFS filesystem on the device, and create a mount point for it at /ec2-data.

mkfs.xfs /dev/sdh
mkdir /ec2-data

Edit /etc/fstab and insert the following line at the end of that file:

/dev/sdh /ec2-data xfs defaults 0 0

Now you can mount the persistent store volume at the path /ec2-data using the following command:

mount /ec2-data



Main menu 2

Story | by Dr. Radut