I am trying to install a CentOS 7.4 system using a kickstart file and have received the following error: 'new lv is too large to fit in free space'
There is an additional message that 752.85MiB is needed.
Here are the relevant parts of the kickstart file:
part pv.00 --size=77824 --asprimary
volgroup vg00 pv.00
logvol / --fstype=ext4 --name=lv_root --vgname=vg00 --size=40960
logvol /tmp --fstype=ext4 --name=lv_tmp --vgname=vg00 --size=16384 --fsoptions="nodev,noexec,nosuid"
logvol /var --fstype=ext4 --name=lv_var --vgname=vg00 --size=16384 --fsoptions="nodev,nosuid"
logvol swap --name=lv_swap --vgname=vg00 --size=4096
As you can see, the total size of the logical volumes is equal to the size of the physical volume : 40960 + 16384 + 16384 + 4096 = 77824
Clearly there is some overhead or metadata that is taking up part of the physical volume or the volume group, but it's unclear how that is being calculated.
I have spent all morning Googling this, and couldn't find any information, even in RedHat's Advanced LVM Configuration guides.
For the purposes of this answer, assume that --grow is not an option and I need to know the exact calculation (there will be another physical volume after this one that needs to grow, so this one needs to be a fixed size).