Written by
Jimmy
on
on
Extending EC2 Elastic Block Storage
One of the biggest pains is under provisioning a compute instance with respect to disk size. I was going crazy troubleshooting an agent problem just to realize I utilized all of my disk space. I was just going to annihilate my compute instance and reprovision it until I realized I could just resize the EBS storage and extend the file system.
- Go to the volume that’s attached to the EC2 instance and reszie
- Extend the block storage acording to the AWS instructions
- Extend the block storagen each volume
- You may run into issues to extend the volume since it needs to write some data to /tmp
- You can remove apt-cache to make some space
- resize the filesystem
ubuntu@pde-test--3700:/$ sudo file -sL /dev/xvda1
/dev/xvda1: Linux rev 1.0 ext4 filesystem data, UUID=436cf32d-5e3d-46ca-b557-f870c8a25794, volume name "cloudimg-rootfs" (needs journal recovery) (extents) (64bit) (large files) (huge files)
ubuntu@pde-test--3700:/$ sudo resize2fs /dev/xvda1
References: