Mount a new EBS on EC2

25 Jun 2012

First of all, create a new EBS and attach it to your instance through the AWS website.

Now login through SSH and type:

cat /proc/partitions

This is to check whether or not your instance see the new EBS.

Then, we mount it with these commands:

mke2fs -F -j /dev/xvdf mkdir /mnt/ebs mount /dev/xvdf /mnt/ebs

If you want your EBS to be mounted automatically when you restart the server. Do this:

sudo nano /etc/fstab

And add this line:

/dev/xvdf /mnt/ebs ext3 defaults 0 0

Give it a kudos