Red Hat Bugzilla – Bug 1306247
[RFE] abstract partitions from volgroup/btrfs
Last modified: 2016-02-10 10:43:08 EST
Use case: having a generic kickstart usable on wide range of hardware configurations
Currently, anaconda (blivet?) has several similar features like 'reqpart --add-boot', which takes care of BIOS/UEFI/PReP/etc. and proper /boot placement (on boot drive), 'clearpart --all', etc.
However the thing is that - if we want a single volume group on the system, holding /, /home, /var/log, etc., we still have to scan the drives on the system and do something like this (for 4 drives):
part pv.1 --size=1 --grow --ondisk=dasda
part pv.2 --size=1 --grow --ondisk=dasdb
part pv.3 --size=1 --grow --ondisk=dasdc
part pv.4 --size=1 --grow --ondisk=dasdd
volgroup vg0 pv.1 pv.2 pv.3 pv.4
Similarly for btrfs, which also needs corresponding 'part' commands.
This RFE therefore requests any kind of automation that would allow us to essentially say
volgroup vg0 --use-all-drives-as-pvs
as anaconda probably knows best which drives are usable on the system (same logic as 'clearpart --all', respecting 'ignoredisk').
However considering additional options one can specify for 'part', like '--encrypted', more thought on this is likely required. As an alternative, a more modular 'autopart' could be probably used (ie. one that can be used with custom 'logvol' commands).
This would allow the kickstart to be usable from x86 BIOS/UEFI systems to IBM zSeries systems, which can have many small (1GB) drives, allowing the user to simply care only about the logical partitions (LVM LVs / btrfs subvols) and the overall disk space available (which can be already dynamically assigned thanks to '--grow --maxsize' or '--percent').
Blivet already has its DeviceFactory classes, which are what anaconda uses to get a full stack with a single method call into blivet. We could expose that via kickstart and it would only require changes to pykickstart and pyanaconda.kickstart. Of course, the question of whether we want more storage-related kickstart commands is one to consider before deciding to proceed.