[CentOS-devel] Dracut hooks question (growroot)

Thu Jul 24 04:55:35 UTC 2014
Neil Wilson <neil at brightbox.co.uk>

On 24 Jul 2014, at 02:13, Nux! <nux at li.nux.ro> wrote:

> Hi,
> 
> Been trying like mad to find a way to resize the partition of a EL7 VM template from the initramfs (basically run fdisk on /dev/vda) as I did for EL6, but with the new systemd+dracut it seems like either I find the disks in a nonexistent state or they are already in use. 
> I think I went through all relevant hooks; pre-mount is  a lie, at that stage the disk is seemingly already in use. :)
> 
> Does anyone have a tip how to go about this?
> 

You don’t need to do it in initramfs any more. 

cloud-init runs ‘growpart’ during the normal startup routine and it works fine on the newer kernels that can handle a running partition size change. 

So just install ‘cloud-utils-growpart’ and either let cloud-init take care of it or run ‘growpart’ yourself. 


Rgs

NeilW