How To Create EBS(Elastic Block Store) in AWS


Step 1. Go to Amazon Web Services and select EC2 option under the Compute.

EBS Amazon Web services main page

Step 2. Now at the left most side of the page there is a option named Volumes under Elastic Block Store.Click on it.

EBS Resourse page pic

Step 3. Now at the top of the page there is a option in big blue button Create Volume.Click on it.

EBS Create Volume Page

Step 4. Now Create a New Volume by entering the following settings & Click on Create.

Volume Type : General Purpose SSD(GP2)
Size(GiB) : 2
Availability Zone :  us-west-2a

Note: Specify the size of volume according to your requirements.As for now i am taking 2 GiB.
Note: Check your instance Availability Zone by clicking on Instance.The volume will be  available to instances in the same Availability Zone.As for now i am taking us-west-2a because my instance Availability Zone is us-west-2a.EBS Create Volume Page 1

Step 5. Now our new Volume is Successfully Created and show in available state.

ELB Volume available state

Step 6. Now we are going to attach this volume with our Instance.For this Click on Actions Button Which is Available at the top of the page .

ELB Action page

Step 7. After Click on Action there is a Attach Volume Option just Click on it.Now in Instance Column choose Instance to which the volume will be attached & in Device Column select Device name for attachment it must be different from main volume Device name of that instance.Now click on Attach.

ELB Attach Volume Page

Step 8. Now your volume is successfully attached with your Instance.

ELB in-use state page

Step 9. Now Check your New Disk by running bellow command.

# fdisk -l

EBS cli fdisk page
Note :Now we have 2 Disk
1. /dev/xvda    :  8589 MB     (It’s my Main Instance Disk)
2. /dev/xvdf     :  2147 MB     (It’s my New Disk which i was created in upper steps)

Step 10. Now we have to create a new file system for our disk.

# mkfs -t ext3 /dev/xvdf

EBS file system page

Step 11. Now we need to create a new mount point for our volume and mount (temporary) our volume to that mount point.

# mkdir /upload

# mount /dev/xvdf /upload

EBS Temp mount pic

Step 12. To make it enable on system boot simply edit /etc/fstab file and add following entry at end of file.

# vim /etc/fstab
/dev/xvdf     /upload   ext3    defaults     0 0

EBS permanent mount

Step 13. Run below command to mount your volume permanently.

# mount -a

Step 14.. To check your mounted volume run below command

# df -TH

ELB Mount check page

Note: /dev/xvdf is permanently mount wih /upload folder.