I’m trying to make a kickstart (for partition table in foreman) for partitioning a disk and create logical volumes.
I’m partitioning a disk with size 2000399MB and the configuration file looks like this:
<%#
kind: ptable
name: Kickstart default
model: Ptable
oses:
- AlmaLinux
- CentOS
- CentOS_Stream
- Fedora
- RedHat
- Rocky
-%>
<% if host_param('driverdisk_source') -%>
driverdisk --source=<%= host_param('driverdisk_source') %>
<% end -%>
<% if host_param('ignoredisk_options') %>
ignoredisk <%= host_param('ignoredisk_options') %>
<% end %>
part /boot --fstype="ext4" --size=500 --ondisk=sda
part pv.01 --size 1999899 --grow --ondisk=sda
volgroup vol01 pv.01
logvol / --vgname=vol01 --size=71680 --name=root
logvol /var --vgname=vol01 --size=1928219 --grow --name=var
zerombr
clearpart --all --initlabel
When I try to install this kickstart i get this error ‘Unable To Allocate Requested Partition Scheme’.
I’m pretty sure that the problem are the size of my partitioning and logical volumes because change with a lower size the error disappear. So my question is, how am I supposed to do a good partitioning and how to do “math”.
My “math” was:
Total size disk (MB): 2000399
/boot = 500
pv.01 (MB): Total size disk – /boot = 1999899
vol01 = pv.01
logvol root = 71680
logvol var = vol01 – logvol root = 1928219