How to extend your AWS EBS volume size

Posted on Nov. 6, 2019
aws
ebs
1076

If you have an aws ec2 instance and a volume attached to it, now you want to increase the size of your volume to have more data.

To do this you can follow these simple steps.

  • Go to EC2 volumes and choose the volume you want.
  • Under Actions -> Modify Volume.
  • Modify the size you want and click on Modify

I have a volume with size 8 GB and extending it to 20GB.

Procedure is done from aws console end, now we have to log in to our instance and extend the volume size.

Before going to that check your volume status is in-use or wait for few minutes.

 

Currently I am having only 8GB of volume space only.

Now if you execute the lsblk command you can see the size of volume and partitions like below.

The xvda1 partition is my previous original volume size and I am going to extend that to full root volume size.

Lets check volume size is updated or not with lsblk

Now the last step to extend the filesystem use resize2fs for ext2, ext3 and ext4 filesystems, xfs_growfs for XFS file system.

Now the full 20GB size is available to use and successfully extended our file system.




0 comments

Please log in to leave a comment.