Expanding EBS Volume on an EC2 Instance without restarting
Overview
If you’ve increased your AWS EBS volume size but it’s not reflecting inside your VM, follow these steps to make the new space available.Step 1: Verify the EBS Volume Size on AWS
Run the following command to check if the volume size has been updated on AWS:Step 2: Check if the OS Recognizes the New Size
Run the following command inside the VM:Step 3: Expand the Partition
Since the partition (nvme0n1p1) is still at 19.9GB while the disk is 30GB, you need to extend it using growpart:
Step 4: Resize the Filesystem
After expanding the partition, resize the filesystem.-
For EXT4 Filesystem (Ubuntu/Debian):
-
For XFS Filesystem (Amazon Linux 2, RHEL, CentOS 7+):
