So you just decided to create a new EBS volume to be used with one of your Amazon AWS Instances. Why would you do this? I could think of many reasons, but the one for me is using it as a repository for my git files, so they are preserved in case my instance is shut down or corrupt.
To do this, follow the steps below:
Go to your AWS Management Console, choose your region and find the "Elastic Block Stores"(EBS) / Volumes option.
and choose a name and add the tags in case you need and use them.
and select the instance you want this volume to be attached to.
$ sudo fdisk -l to see a list of all the volumes. The new volume should be there. In my case it is called /dev/xvdf.
$ sudo mkfs -t ext4 /dev/xvdf.$ sudo vi /etc/fstab/dev/xvdf /mnt/repo ext4 defaults,noatime 0 0
$ mount /mnt/repo$ df -ak
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/xvda1 8256952 986580 7186504 13% /
tmpfs 308520 0 308520 0% /dev/shm
/dev/xvdf 1032088 34052 945608 4% /mnt/repo