cloud-init image resize functionality does not work
cloud-init has cc_growpart module (which is configured by default)
responsible
for resize image according to the size of the configured for an instance
flavour.
however that functionality does not work because:
- cc_growpart module (
/usr/lib/python2.7/site-packages/cloudinit/config/cc_growpart.py )
depends on /dev/block/ device links which should be created by udev. - nor udev or eudev daemons supplied by alpine packages create the links with default configuration
- growpart script ( part of https://launchpad.net/cloud-utils ) which
do the actual resize work is
not supplied for alpine.
there are several ways to fix the issue. here is one of it:
- patch cc_growpart.py with the provided in attach patch to get a rid of udev dependency
- add growpart script to the cloud-init package. can be downloaded
from
http://bazaar.launchpad.net/~cloud-utils-dev/cloud-utils/trunk/download/head:/growpart-20110225134600-d84xgz6209r194ob-1/growpart
the script have to be placed to /usr/bin - patch growpart with the provided in attach patch. yes, it will not work without it :)
- add dependencies on sfdisk and parted packages to cloud-init. well, i
know it do the same but i have no intentions
to rewrite and maintain growpart script.
i have tested the provided way and it’s working.
(from redmine: issue id 6128, created on 2016-09-09)
- Uploads: