<p dir="ltr">Hi thanks for the answers!</p>
<p dir="ltr">But how is the support right now in OpenStack with centos/fedora images regarding the auto resizing during boot? does the disk size set in the flavor is respected or not, or does it work only with fedora and newer kernels than what CentOS uses...things like that is what I'm looking for</p>
<div class="gmail_quote">On May 6, 2014 4:09 AM, "Kashyap Chamarthy" <<a href="mailto:kchamart@redhat.com">kchamart@redhat.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Mon, May 05, 2014 at 10:22:26PM -0430, Elías David wrote:<br>
> Hello all,<br>
><br>
> I would like to know what's the current state of auto resizing the root<br>
> partition in current RDO Icehouse, more specifically, CentOS and Fedora<br>
> images.<br>
><br>
> I've read many versions of the story so I'm not really sure what works and<br>
> what doesn't.<br>
><br>
> For instance, I've read that currently, auto resizing of a CentOS 6.5 image<br>
> for would require the filesystem to be ext3 and I've also read that auto<br>
> resizing currently works only with kernels >= 3.8, so what's really the<br>
> deal with this currently?<br>
><br>
> Also, it's as simple as having cloud-init, dracut-modules-growroot and<br>
> cloud-initramfs-tools installed on the image or are there any other steps<br>
> required for the auto resizing to work?<br>
<br>
<br>
I personally find[1] virt-resize (which works the same way on any<br>
images) very useful when I'd like to do resizing, as it works consistent<br>
well.<br>
<br>
I just tried on a Fedora 20 qcow2 cloud image with these below four commands<br>
and their complete output.<br>
<br>
1. Examine the root filesystem size _inside_ the cloud image:<br>
<br>
$ virt-filesystems --long --all -h -a fedora-latest.x86_64.qcow2<br>
<br>
Name Type VFS Label MBR Size Parent<br>
/dev/sda1 filesystem ext4 _/ - 1.9G -<br>
/dev/sda1 partition - - 83 1.9G /dev/sda<br>
/dev/sda device - - - 2.0G -<br>
<br>
2. Create a new qcow2 disk of 10G:<br>
<br>
$ qemu-img create -f qcow2 -o preallocation=metadata \<br>
newdisk.qcow2 10G<br>
<br>
3. Perform the resize operation:<br>
<br>
$ virt-resize --expand /dev/sda1 fedora-latest.x86_64.qcow2 \<br>
newdisk.qcow2<br>
Examining fedora-latest.x86_64.qcow2 ...<br>
**********<br>
<br>
Summary of changes:<br>
<br>
/dev/sda1: This partition will be resized from 1.9G to 10.0G. The<br>
filesystem ext4 on /dev/sda1 will be expanded using the 'resize2fs'<br>
method.<br>
<br>
**********<br>
Setting up initial partition table on newdisk.qcow2 ...<br>
Copying /dev/sda1 ...<br>
100% ⟦▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒⟧ 00:00<br>
Expanding /dev/sda1 using the 'resize2fs' method ...<br>
<br>
Resize operation completed with no errors. Before deleting the old<br>
disk, carefully check that the resized disk boots and works correctly.<br>
<br>
4. Examine the root file system size in the new disk (should reflect<br>
correctly):<br>
<br>
$ virt-filesystems --long --all -h -a newdisk.qcow2<br>
Name Type VFS Label MBR Size Parent<br>
/dev/sda1 filesystem ext4 _/ - 10G -<br>
/dev/sda1 partition - - 83 10G /dev/sda<br>
/dev/sda device - - - 10G -<br>
<br>
<br>
Hope that helps.<br>
<br>
<br>
[1] <a href="http://kashyapc.com/2013/04/13/resize-a-fedora-19-guest-with-libguestfs-tools/" target="_blank">http://kashyapc.com/2013/04/13/resize-a-fedora-19-guest-with-libguestfs-tools/</a><br>
<br>
<br>
<br>
--<br>
/kashyap<br>
</blockquote></div>