I'm looking through this guide for how to add an EBS volume to an Amazon EC2 instance, and I've found this little part of instructions hard to follow:
Create an XFS file system on the EBS volume and mount it as /vol
grep -q xfs /proc/filesystems || sudo modprobe xfs
sudo mkfs.xfs /dev/sdh
echo "/dev/sdh /vol xfs noatime 0 0" | sudo tee -a /etc/fstab
sudo mkdir -m 000 /vol
sudo mount /vol
You now have a 10 GB (or whatever size you specified) EBS volume mounted under /vol with an XFS file system, and it will be automatically mounted if the instance reboots.
I don't believe I have mkfs.xfs installed, although mkfs is a valid command. This is a little too much piping and advanced syntax for me - I'm trying to figure out how to make this work on Ubuntu 10.04 and am not having any luck with it.
Can someone tell me what is being attempted here so I can try and understand it and get it working for my Ubuntu EC2 Instance?
update
A few things I figured out:
- on my instance I had to use
/dev/xvdhand not/dev/sdh - still not sure what
grep -q xfs /proc/filesystems || sudo modprobe xfsis doing as running each of those commands does not show any results. - afaik the fstab is just to automatically connect the volume at boot