Environment
Red Hat Enterprise Linux 4
Red Hat Enterprise Linux 5
Red Hat Enterprise Linux 6
Red Hat Enterprise Linux 5
Red Hat Enterprise Linux 6
The following options are required under 'Disk Partition Information' section in
ks.cfg
file, for creating the Logical Volume Manager (LVM) partitions using kickstart#Disk partitioning information
part pv.<id> --ondisk=sdx
volgroup <name> <partition>
logvol <mountpoint> --vgname=<volume_group_name> --size=<size> --name=<name>
The options should be used in the sequence as they are mentioned. Physical Volume should be created first then Volume Group and then Logical Volume(s).
Example:
Two physical partitions should be created for Boot and Swap partitions and the rest of the space should be allocated using LVM.
Partition
Size
Name
/boot
150MB
/boot
swap
1GB
swap
/
8GB
lv_root
/var
4GB
lv_var
/tmp
2GB
lv_tmp
/spare
remaining space
lv_spare
Solution:
The following entries are required in ks.cfg
file, as per the above requirements:
#Disk partitioning information
part /boot --fstype ext3 --ondisk=sdx --size=150
part swap --ondisk=sdx --size=1024
part pv.01 --size=1 --ondisk=sdx --grow
volgroup vg_root pv.01
logvol / --vgname=vg_root --size=8192 --name=lv_root
logvol /var --vgname=vg_root --size=4096 --name=lv_var
logvol /tmp --vgname=vg_root --size=2048 --name=lv_tmp
logvol /spare --vgname=vg_root --size=1 --grow --name=lv_spare