[CentOS-virt] CentOS Images on AWS with partitions on /dev/xvda1 are awkwared to resize

Thu Apr 30 03:39:50 UTC 2015
Nico Kadel-Garcia <nkadel at gmail.com>

On Wed, Apr 29, 2015 at 11:24 PM, Kelly Prescott <kprescott at coolip.net> wrote:
> This is not really a problem at all.
> when you launch your image for the first time, you can specify a larger /
> volume size and cloud-init-tools will take care of the rest.
> This is well documented in the AWS userguides.
>
> -- Kelly Prescott

I just had that discussion with an experienced AWS user, who hadn't
noticed that the documentation at
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/storage_expand_partition.html
says the following, very clearly:

      Unmount the partition if it is mounted. Run the umount command
with the value of MOUNTPOINT from the lsblk command. In this example,
the MOUNTPOINT value for the partition is /mnt.

Notice the "unmount the parition part".  This is not feasible with a
"/" partition unless you've booted from separate media and have
console access or remote SSH access with that separate media. I'm
experienced enough to actually configure a second disk and ensure
booting from *that* to re-arrange the primary disk's filesystems, but
I'm looking for a better way.

I'm also staring at the "cloud-init" docs you mentioned at
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonLinuxAMIBasics.html#CloudInit.
I see nothing about resizing the base OS image size, especially the
"/" partition. Do you see something relevant?

                                Nico Kadel-Garcia