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

Cid Miranda
Jan 4, 2021
©Cid Mirandahttps://www.flickr.com/photos/cidska/

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 nvme0n1, was changed to 1.6TB.

Type the command df -hT to verify the actual space of partition dev/nvme0n1p1, that is 1.4TB

Type the command

sudo growpart /dev/nvme0n1 1

sudo xfs_growfs /dev/nvme0n1p1

to change size of volume.

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

--

--

Cid Miranda

#Blockchain #Web3 #DeFi #Developer #HODL #DYOR #Bitcoin Programmer, musician, photographer. For a collaborative and inclusive world.