Resize the EBS volume in the AWS Console
- Go to EC2 Console → Volumes
- Select the volume → Actions → Modify Volume
- Enter the new size (you can only increase, not shrink)
- Confirm and wait for the state to change to
optimizing
Volume resize does not require rebooting the EC2 instance on Nitro-based instances (most instance types from 2018 onward: t3, m5, c5, r5, etc.).
Verify after resize
SSH into the EC2 instance:
lsblk
# Output:
# NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
# nvme0n1 259:0 0 100G 0 disk
# └─nvme0n1p1 259:1 0 50G 0 part /
# (disk is 100G but partition is still 50G)
df -h
# Filesystem Size Used Avail Use% Mounted on
# /dev/nvme0n1p1 50G 30G 20G 60% /
Extend the partition
# Use growpart to expand the partition
sudo growpart /dev/nvme0n1 1
# Verify
lsblk
# nvme0n1p1 is now 100G
Grow the XFS filesystem
# XFS uses xfs_growfs (not resize2fs like ext4)
sudo xfs_growfs /
# Output:
# meta-data=/dev/nvme0n1p1 isize=512 agcount=4, agsize=3276800 blks
# ...
# data blocks changed from 13107200 to 26214400
Note:
xfs_growfstakes the mount point path, not the device path. Use/if mounted at root.
Verify the result
df -h /
# Filesystem Size Used Avail Use% Mounted on
# /dev/nvme0n1p1 100G 30G 70G 30% /
Filesystem expanded successfully — no downtime, no data loss.
For ext4
If your filesystem is ext4 instead of XFS:
sudo resize2fs /dev/nvme0n1p1