We are going to attach a new disk on a existing VM. Please do follow the below steps.
Click on
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.
|
Here it shows xvdf (50GB) is available for a mount.
You can also fdisk -l command for same.
Mount your volume using below command.
|
Create a new directory and mount a new volume with each.
|
Now check disk fragmentation.
|
Add an entry in /etc/fstab for mounting it automatically after reboot.
|
Add this line at the end of a file.
|
Save and Reboot system.