Published December 16, 2018 by

How to Increase EBS Volume Size of AWS EC2 Linux Instance

If we face data limitations in our EC2 instance's volume, we can modify or resize it.

In this tutorial, I will show you how to increase the EBS volume size in AWS using a Linux instance.

First, stop EC2 instance:


You can also perform this step in running instance without stopping it, but if possible to take downtime, then I suggest stopping the instance. 

Select instance>>Actions>>Insatnce State>>Stop


Now, Go to Volumes and Modify

Select Volume>>Actions>>Modify Volume

Here insert a new value of SSD size.
Here it will ask for your permission.

Wait for few minutes till it goes an in-use-completed(100%) state.



Whenever state changes to in-use - completed state, Login in an ec2 instance and follow the below steps.

Expand the modified partition using growpart
 sudo growpart /dev/xvda 1

To extend a Linux file system for Linux ext2, ext3, or ext4 file system (like Ubuntu)
 sudo resize2fs /dev/xvda1

To extend a Linux file system for the xfs file system (like CentOS)
 sudo xfs_growfs -d /mnt

Using df -h command check partition is extended or not.
 df -h