how size of partition is defined for kickstart installation
Hi
I'm installing rhel 5.7 with kickstart with following params for partitions on sda drive (30GB):
clearpart --all --initlabel --linux
part /boot --fstype ext3 --size=150 --asprimary --ondisk=sda
part pv.1 --size=0 --grow --ondisk=sda
volgroup rootVG pv.1
logvol / --fstype ext3 --name=root --vgname=rootVG --size=11000 --grow
logvol /var --fstype ext3 --name=var --vgname=rootVG --size=12000 --grow --maxsize=20000
logvol swap --fstype swap --name=swap --vgname=rootVG --size=8192
logvol /tmp --fstype ext3 --name=tmp --vgname=rootVG --size=4000
I don't quite understand how the size of partitions is defined in such case. This is what I got after installation:
[root@myhost ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootVG-root
8.4G 6.0G 2.0G 76% /
/dev/mapper/rootVG-var
9.1G 3.0G 5.7G 35% /var
/dev/mapper/rootVG-tmp
3.8G 75M 3.6G 3% /tmp
/dev/sda1 145M 20M 118M 15% /boot
#swap size is exactly the same as defined in kickstart
[root@myhost ~]# cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/rootVG-swap partition 8388600 156 -1
It seems like --size param is interpreted by rhel as "I wish" instead of "I need" :)
Are there are hints how algorithm for granting space for partition works? Does it have some priorities (swap before other types and etc.) ?
Responses
Having two logvol lines with 'grow' isn't something I would have expected to work.
Is your concern about the output that / and /var are less than what you have specified? or all the partitions are less than you expected?
There are two suggestions I have for getting the result to match what you expect:
1. If you want 12G, specify 12 x 1024 as your size (similar to your 8G example for swap).
2. Make sure you take into account the reserved blocks on the filesystem which defaults to 5% which won't be available or visible with df.
Use the following to determine how much space is in reserved blocks for each filesystem:
tune2fs -l /dev/mapper/rootVG-var | grep ^Res.*count
When you added "--grow", you turned that 12000MB and 11000MB request into an "I wish". Given that you requested more disk space to be allocated to your partitions than you stated exist on the disk, this is probably a Good Thing(TM): minus the "--grow" options, the KickStart would have failed. That you used "--grow" twice, anaconda made a best effort to meet the parameters specified.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
