Published April 28, 2018 by

Modify a Volume Size in AWS EC2

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

First, stop EC2 instance:


Seclect instance>>Actions>>Insatnce State>>Stop



Now, Go to Volumes and Modify

Select Volume>>Actions>>Modify Volume

Here insert a new value of HDD size.
Here it will ask for your permission.
Wait for few minutes till it goes an in-use state.



Whenever state changes to in-use - completed state, Login in an ec2 instance and insert below command.

# sudo apt-get update
# sudo apt install xterm
# sudo growpart /dev/xvda 1
# sudo resize2fs /dev/xvda1

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

# df -h