<font size=2 face="sans-serif">Hi</font>
<br>
<br><font size=2 face="sans-serif">For virtual servers it is nice to use
the whole disk for LVM instead of creating a LVM partition on the disk.
Then you can just increase the size of the disk in VMware and later extend
the file system instead of having to add another disk and extend.</font>
<br><font size=2 face="sans-serif">Is it possible to use this setup in
the kickstart? What syntax do one use if it is possible?</font>
<br>
<br><font size=2 face="sans-serif">If I have done it manually it whould
have been like this:</font>
<br><font size=2 face="sans-serif">pvcreate /dev/sdb (instead of using
a LVM partition called /dev/sdb1)</font>
<br><font size=2 face="sans-serif">vgcreate DataVG /dev/sdb</font>
<br><font size=2 face="sans-serif">lvcreate -n DataLV -l 100%FREE DataVG
DataLV</font>
<br>
<br><font size=2 face="sans-serif">At the moment I have the following partitioning
script in my kickstart file for RHEL6/7 as a pre script:</font>
<br>
<br><font size=2 face="sans-serif">DISK_TYPE=$(parted -s /dev/sda print
|grep Model | awk '{print $2}')</font>
<br><font size=2 face="sans-serif">echo "Disk type = $DISK_TYPE"</font>
<br>
<br><font size=2 face="sans-serif">if [ "$DISK_TYPE" = "VMware"
]</font>
<br>
<br><font size=2 face="sans-serif">then</font>
<br><font size=2 face="sans-serif">echo "This is a VMware server,
disk type=$DISK_TYPE"</font>
<br><font size=2 face="sans-serif">cat > /tmp/partitioning.cfg <<EOF</font>
<br><font size=2 face="sans-serif">part /boot --fstype="xfs"
--size=1024 --ondisk=sda</font>
<br><font size=2 face="sans-serif">part pv.01 --size=10240 --grow --ondisk=sda</font>
<br><font size=2 face="sans-serif">volgroup VGos pv.01</font>
<br><font size=2 face="sans-serif">logvol / --vgname=VGos --name=LVroot
--size=10240 --grow</font>
<br><font size=2 face="sans-serif">logvol swap --vgname=VGos --name=LVswap
--recommended</font>
<br><font size=2 face="sans-serif">part pv.02 --size=1000 --grow --ondisk=sdb</font>
<br><font size=2 face="sans-serif">volgroup VGdata pv.02</font>
<br><font size=2 face="sans-serif">logvol /usr/users --vgname=VGdata --name=LVhome
--size=20480</font>
<br><font size=2 face="sans-serif">logvol /app --vgname=VGdata --name=LVapp
--size=1000 --grow</font>
<br><font size=2 face="sans-serif">EOF</font>
<br>
<br><font size=2 face="sans-serif">else</font>
<br><font size=2 face="sans-serif">echo "This is a Physical server,
disk type=$DISK_TYPE"</font>
<br><font size=2 face="sans-serif">cat > /tmp/partitioning.cfg <<EOF</font>
<br><font size=2 face="sans-serif">part /boot --fstype="xfs"
--size=1024 --ondisk=sda</font>
<br><font size=2 face="sans-serif">part pv.01 --size=10240 --grow --ondisk=sda</font>
<br><font size=2 face="sans-serif">volgroup VGos pv.01</font>
<br><font size=2 face="sans-serif">logvol / --vgname=VGos --name=LVroot
--size=10240 --grow</font>
<br><font size=2 face="sans-serif">logvol swap --vgname=VGos --name=LVswap
--recommended</font>
<br><font size=2 face="sans-serif">logvol /var --vgname=VGos --name=LVvar
--size=20480</font>
<br><font size=2 face="sans-serif">EOF</font>
<br>
<br><font size=2 face="sans-serif">fi</font>
<br>
<br>
<br><font size=2 face="sans-serif">Regards Jerry</font>