Attach extra EBS volume to your AWS EC2 instance

You create your new volume from the "Volumes" menu in your EC2 management console.

You attach your new volume to your ec2 instance by right clicking the new volume and choose attach.

From the "Attachment Information", you can see where it is being attached, such as "/dev/sdf".

Or you can then see your new volume inside your EC2 instance:

$ cat /proc/partitions 
major minor  #blocks  name

 202        1    8388608 xvda1
 202       80   20971520 xvdf


Now format the new volume:

$ sudo mkfs.ext4 /dev/xvdf
(other example: sudo mkfs.xfs /dev/xvdb)

Then make a mount point:

$ sudo mkdir /mnt/data

mount the volume:

$ sudo mount /dev/xvdf /mnt/data/

Add it to /etc/fstab if you want it to automatically mount each time the EC2 instance starts.

Featured Post

When you copy an AWS EC2 snapshot, you can choose to encrypt the copy

Encrypted Snapshots When you copy a snapshot, you can choose to encrypt the copy (if the original snapshot was not encrypted) or you can s...