Step 1. Go to Amazon Web Services and select EC2 option under the Compute.
Image may be NSFW.
Clik here to view.
Step 2. Now at the left most side of the page there is a option named Volumes under Elastic Block Store.Click on it.
Image may be NSFW.
Clik here to view.
Step 3. Now at the top of the page there is a option in big blue button Create Volume.Click on it.
Image may be NSFW.
Clik here to view.
Step 4. Now Create a New Volume by entering the following settings & Click on Create.
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.Image may be NSFW.
Clik here to view.
Step 5. Now our new Volume is Successfully Created and show in available state.
Image may be NSFW.
Clik here to view.
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 .
Image may be NSFW.
Clik here to view.
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.
Image may be NSFW.
Clik here to view.
Step 8. Now your volume is successfully attached with your Instance.
Image may be NSFW.
Clik here to view.
Step 9. Now Check your New Disk by running bellow command.
# fdisk -l
Image may be NSFW.
Clik here to view.
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
Image may be NSFW.
Clik here to view.
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
Image may be NSFW.
Clik here to view.
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
Image may be NSFW.
Clik here to view.
Step 13. Run below command to mount your volume permanently.
# mount -a
Step 14.. To check your mounted volume run below command
# df -TH
Image may be NSFW.
Clik here to view.
Note: /dev/xvdf is permanently mount wih /upload folder.