Description
Description
Ability to extend existing LVM volume groups and logical volumes instead of creating new volume groups or logical volumes.
Motivation
Currently, there is no builtin part of disko to extend LVM volume groups or logical volumes. So if someone used disko to install their system, they'd have to resort to imperative CLI tooling to add another physical volume to a volume group or to extend a logical volume.
Moreover, if CLI tooling is depended on later after install, the current disko configuration no longer represents the current disk layout making it no longer reproducible. Because of this, using imperative CLI tooling is undesired to maintain a constant tested and reproducible state with the disko configuration in case of re-installation.
Proposal
Keep the same API for nix options and CLI tools: disko
and disko-install
. This would fit under the already existing format
mode without destroy
. Before formatting, check for existing partitions, LVM layout, etc and reuse existing layout if possible.
Requirements for this to happen:
- disk of the same device path must exist.
- volume group of the same name must exist (otherwise, this is a new VG)
- logical volume of the same name must exist (otherwise, this is a new LV)
Under the hood, this would use the existing LVM commands: vgextend
and lvextend
when it can be deduced that the volume group or logical volume exists given the above requirements.