Increasing the disk space for AWS instances is easy and fast – also for running instances. Here are the steps:
Increase the volume size
- Login to your AWS account
- Select the instance from the list and select the Storage tab in the lower pane:
3. Click on the link of the Volume ID
4. Right-Click on the Volume ID to open the following menu and click on “Modify volume”:
Which will open the following page:
5. Modify the Size in GB to the new larger value and click on “Modify” and the volume is adapted to the selected size.
Resize the filesystem
In case of Ubuntu (with the standard disk layout – otherwise please check your disks with lsblk):
sudo growpart /dev/nvme0n1 1
sudo resize2fs /dev/nvme0n1p1
In case of RedHat/CentOS/Rocky/Amazon Linux (with the standard disk layout – otherwise please check your disks with lsblk):
sudo growpart /dev/nvme0n1 1
sudo xfs_growfs -d /
Here is an example of the the output of lsblk which can look similar to this:
Enjoy the new free space on your disk! 😊