cloud-init icon indicating copy to clipboard operation
cloud-init copied to clipboard

[docs]: growpart should note that it does not work with LVM.

Open lindhe opened this issue 2 years ago • 2 comments

Documentation request

After many hours of trying to understand why my VMs had too small partitions, I have come to the conclusion that the growpart module does not work with LVM. I expected it to, because the docs mentions LVM in a positive air with no warning:

Note that this only works if the partition to be resized is the last one on a disk with classic partitioning scheme (MBR, BSD, GPT). LVM, Btrfs and ZFS have no such restrictions.

https://github.com/canonical/cloud-init/blob/4f60ff099eb0a6f57595706f4d34cf713d3c02b1/cloudinit/config/cc_growpart.py#L35-L37

We should change the docs to make this clearer!

Other references

The Red Hat docs notes this:

Red Hat docs warning that growpart does not work with LVM

https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/configuring_and_managing_cloud-init_for_rhel_8/index#troubleshooting-cloud-init_configuring-cloud-init

I also found this answer on serverfault, indicating the same thing: https://serverfault.com/a/895879/116925


Reported from: https://cloudinit.readthedocs.io/en/latest/index.html

lindhe avatar Dec 24 '23 20:12 lindhe

There is an existing Github Issue to track this problem: #3265

Basically code to support LVM was added (#721) in May 2021 and then reverted (#887) shortly afterwards.

Even if the reverted code was reinstated I don't believe it covers all possible situations (e.g. I use both LVM and LVM-on-LUKS and there are occasions where I do not want the LV grown, but do want the PV grown, and others where I may want both PV and LV grown).

I am doing some work in this area currently and hope to have a PR to submit in the near future.

dermotbradley avatar Jan 01 '24 02:01 dermotbradley

There is an existing Github Issue to track this problem: #3265

Basically code to support LVM was added (#721) in May 2021 and then reverted (#887) shortly afterwards.

Even if the reverted code was reinstated I don't believe it covers all possible situations (e.g. I use both LVM and LVM-on-LUKS and there are occasions where I do not want the LV grown, but do want the PV grown, and others where I may want both PV and LV grown).

I am doing some work in this area currently and hope to have a PR to submit in the near future.

Great to know that you are working on the solution. We also had this issue(https://bugzilla.redhat.com/show_bug.cgi?id=1810878), looking forward to get fix in the near future. Thanks!

zhaohuijuan avatar Apr 17 '24 03:04 zhaohuijuan