Increasing AWS EC2 ubuntu instance disk space
As Chris Moore mentioned in a comment, the disk space is automatically increased on boot for any modern EC2 Ubuntu server, making this much easier. Here's the steps:
- Open EC2 -> Elastic Block Store -> Volumes. Find the volume you want to increase by looking at the Attachment Information column.
- Select the volume and click Actions -> Modify Volume, then select the new volume size you want.
- Open EC2 -> Instances -> Instances, select your EC2 instance and click Actions -> Instance State -> Reboot.
You're done! ð
No, you're missing something - you end up with your old partition size.
Here's how you do it (pay attention to resize2fs
/ xfs_growfs
commands):
Resizing the Root Disk on a Running EBS Boot EC2 Instance.
Example:
# In case your Filesystem is either ext2, ext3, or ext4
$ sudo resize2fs /dev/sda1
# Or if you have XFS
$ sudo apt-get install -y xfsprogs
$ sudo xfs_growfs /
In addition to the answer above, Amazon put out a guide as well. I used both resources when I was expanding my volume.