Resizing EBS volume
Unfortunately, you can not currently resize an EBS volume on the fly. However, you can pretty easily resize with a quick reboot. The process is as follows:
- Create a snapshot of your current volume
- Create a new volume from that snapshot (bigger of course)
- Restart your instance using the new volume
- Resize the “partition” on that volume
The first three items can be done in the AWS interface. Number four is done in the command line with root access.
Once everything is up and running again df seems to say that you don’t have any more space. But of course since the volume came from a snapshot of a smaller “partition” it was not too shocking to see…
1 2 3 4 | df -h Filesystem Size Used Avail Use% Mounted on [...] /dev/xvdf 8.0G 3.5G 4.5G 44% /some/mount/point |
The command line tool you want is resize2fs
1 | sudo resize2fs /dev/xvdf |
And now everything should be happy…
1 2 3 4 | df -h Filesystem Size Used Avail Use% Mounted on [...] /dev/xvdf 45G 3.5G 41G 8% /some/mount/point |
Thank you so much!! Finally managed to get these partitions going.