[Openstack] How to create a Image which can extend the partition automatically.

Scott Moser smoser at ubuntu.com
Wed Mar 6 18:52:52 UTC 2013


On Wed, 6 Mar 2013, Lei Zhang wrote:

> On Tue, Mar 5, 2013 at 10:04 PM, Scott Moser <smoser at ubuntu.com> wrote:
>
> > cloud-init > 0.7 (cloud-init invokes resize2fs)
>
>
> How this is possible to just call `resize2fs` to re-partition. As I know,
> this tool will not modify the partition information. Right?

in current world, cloud-initramfs-growroot grows the partition table from
the initramfs before / is in use, so the kernel can then re-read the
partition table.

then, cloud-init invokes resize2fs.


In future world (really close in ubuntu images for raring), cloud-init
invokes growpart (or parted) and then resize2fs.  3.8 kernel can be told
about the grown partition and growpart and parted (patches submitted) know
how to do that.




More information about the Openstack mailing list