File System Resize Issues with Scientific Linux 6.x - Cloud-init 0.7.4

This article describes the process to prepare your Scientific Linux virtual machine image, for file system resize to work.

In order for file system resize to work with OpenStack, you need single partition setup. No LVM

To prepare the image follow these steps:

Step 1 - (If not configured already) Add EPEL repository to the set of configured repositories.

Step 2 - Install cloud-utils, cloud-init and dracut-modules-growroot packages

yum install -y cloud-utils cloud-init dracut-modules-growroot

Step 3 - Rebuild the Operating System Kernel Image

First backup the kernel image

cp /boot/initramfs-`uname -r`.img /boot/initramfs-`uname -r`.img.bak

Then rebuild the image

dracut -f

Step 4 - Copy VM Image to Platform9 Image Catalog

At this point, the VM Image is ready. Power off the VM. Copy the VM Image to imagelibrary data directory on the host that's assigned Image Library role.

Upon creating an instance with this image, the growroot function kicks in during startup and grows to root volume to size of disk allocated.

October 14, 2015