This works for instances running Amazon Linux:
0. If you need to free up space quickly
Delete some journals:
sudo journalctl --vacuum-size=100M
1. Add space in the AWS console
- Go to EC2, and select your instance.
- Scroll to the horizontal tab bar, and click storage.
- Click on the volume ID.
- Select the volume, and under actions, click "Modify Volume". If this is grayed out, you have to wait.
- Enter the new disk size and click modify.
2. Grow the partition
-
Determine the partition you want to grow:
sudo lsblk
-
Use growpart to grow the partition, changing xvda to the name of the partition you just determined:
sudo growpart /dev/xvda 1
-
Extend the filesystem to use the additional space:
sudo resize2fs /dev/root
Top comments (0)