Home Linux How to Increase EBS Volume Size on EC2 Instance

How to Increase EBS Volume Size on EC2 Instance

How to increase EBS volume size in aws server?

In this tutorial, you will learn how to resize volume on EC2 instance of AWS server. It’s very simple process. There is no downtime on extending volume size on EC2 instance.

Resize Volume Size

1. Log in to your AWS account and go to Volume. Select the desired volume.
2. Under Action, click on Modify volume.
3. Specify the desired volume size.

4. Click on Modify. After it will ask confirmation to modify volume, click on Yes.

Extend Linux File system

1. After increasing the size of EBS volume, extend Linux partition. To do so, SSH to the EC2 instance.
2. Execute the following command to check the size of the volume. Still its showing old volume size.

df -h

3. Below command will show the size of the increase volume above the current volume.

lsblk

For example, earlier we had xvda1 volume size is 30 GB. The resized volume xvda is 40 GB.

4. To extend the partition, run the following command. Here /dev/xvda is the partition name and 1 is the partition number.

sudo growpart /dev/xvda 1

5. Run below command to extend volume size.

sudo resize2fs /dev/xvda1

6. Now the volume size is increased. You can check it by running the following command.

df -h




That’s it. You have learned how to increase EBS volume size on EC2 instance AWS.

LEAVE A REPLY

Please enter your comment!
Please enter your name here