If you find that space somewhat limiting, it is easy to give yourself a larger root volume at instance creation time. Its easy
Launch the instance with appropriate block-device-mapping arguments
$ ec2-run-instances $AMI --key mykey --block-device-mapping /dev/sda1=:20
That will create you an instance with a 20G root volume. However the filesystem on that volume will still only occupy 8G of the space. Essentially, you'd have 12G of unused volume at the end of the disk.
Resize the root volume
if you've launched an 11.04 based image newer than alpha-2, this step is not necessary. Cloud-init will do it for you. It is just assumed that you want your root filesystem to fill all space on its partition. I honestly cannot think of a reason why you would not want that.
Now, if you are using 10.04 or 10.10 images, you can resize your root volume easily enough after the boot. Just login, and issue:
$ sudo resize2fs /dev/sda1
That operation should take only a few seconds or less, and you'll then have all the space you need.
And now only Ubuntu xfs root volumes...
ReplyDelete@Berend,
ReplyDeleteI had previously blogged about how you can use xfs as your root filesystem at [1]. I have to say, XFS as the default filesystem for Ubuntu images is unlikely, but it seems that people expect btrfs might become the default sometime in the not too distant future.
FWIW, if you do follow the blog entry and make an XFS root filesystem, cloud-init should resize it up for you on first boot in the same way. If you find out otherwise, please open a bug.
--
[1] http://ubuntu-smoser.blogspot.com/2010/11/create-image-with-xfs-root-filesystem.html
This comment has been removed by the author.
ReplyDeleteIs it possible to change this after creation, in case you just found out ;)
ReplyDeleteOf course we can create new images and rebuild but it might be nice to avoid the migration work.
For what it's worth, I do run some Ubuntu instances with XFS on the root EBS volume.
ReplyDelete