How to increase the volume of EC2 instance

In order to increasse the the volume of EC2 Instance you need to click on volume attached to your EC2. After that select the volume and choose the option “Modify Volume” from the action menu. It will open a dialog where it will ask you to input the require volume to be. You can input the higher number of volume to increase the size and press Modify button.

After the volume is modified, we need to resize its file system direclty in the EC2 instance by loggin in. This process varies from file system you are using. But the general steps are :-

Connect to EC2 instance using SSH and run the command to check its current storage size.

df -h

After that run the below command to know the current modified size.

lsblk

Now to resize the file system you can run the `resize2fs`

sudo resize2fs /dev/xvda1

Now you can verify the file system that has been resize or now by using this command

df -h

It should show the updated file size.

Leave a Reply

Your email address will not be published. Required fields are marked *