EC2 AWS — How to resize /data volume with no downtime

©Cid Miranda

Hi, in this article i will share how to resize a volume in AWS, with no downtime. This apply to cassandra, kafka, solr, zookeeper, as we tested before.

First, we have to identify what partition to resize. Access “volumes” menu in aws ec2:

After, choose the volume that you want do change, right click -> Edit:

Insert the new size and click “mofify”

Access the host with ssh and execute the command lsblk and you will see that the size of the partition was changed.

Type the command df -hT to verify the actual space, that is 400GB

Type the command sudo xfs_growfs /dev/nvme1n1 to change size of volume.

If you get an error, try this:

sudo growpart /dev/nvme1n1 1
sudo xfs_growfs /dev/nvme1n1p1

Type the command df -hT and you will see the new volume size