Resizing EBS Volumes on EC2 using UBUNTU 11.04
If you need to re-size (UBUNTU 11.04) an ebs volume mounted at lets say /db
, you can do so using the following steps:
-
Shutdown all services accessing
/db
-
Unmount the volume (
umount /db
) -
Take a snapshot of the volume using the EC2 management console
-
Create a new volume from this snapshot with more space
-
Attach this volume to your running instance
-
Use
fdisk -l
to find where the device is mounted (/dev/xvdf) -
Run
e2fsck -f /dev/xvdf
-
Run
sudo resize2fs /dev/xvdf
-
Remount and you’re good to go:
mount /db