Published April 30, 2018 by

How to Add New Volume to AWS Instance

Services>>EC2-Instances>>Volumes>>Create Volume

Create Volume

Volumes>>Create Volume
Please choose appropriate parameter according to your requirement. Please, note Availablity Zone must be same for your Instance Zone which with you attach volume.

Attach Volume

Select Volume>>Actions>>Attach Volume

Here it asks for confirmation. Click on Attach button.
Login to AWS instance and type lsblk to check if a drive is initialized on OS.

# lsblsk

Here it shows xvdf (20GB) is available for a mount.

You can also fdisk -l command for same.

Mount your volume using below command.

# mkfs.ext4 /dev/xvdf

Create a new directory and mount a new volume with each.

# mkdir /subhash
# mount /dev/xvdf /subhash

Now check disk fragmentation.

# df -h

Add an entry in /etc/fstab for mounting it automatically after reboot.

# vim /etc/fstab

Add this line at the end of a file.

/dev/xvdf /serverkaka ext4 defaults,nofail 0

Save and Reboot system.