Sunday, December 28, 2008

Kickstart and LVM, Pt 2.

I previously lamented the lack of documentation on reusing LVM after a kickstart. Scenario One involved keeping a partition and wiping out the LVM. This time, we want to keep one or more LVM.
clearpart --none
part /boot --fstype ext3 --onpart sda3
part pv.8 --onpart sda5
volgroup hvg --pesize=32768 pv.8 --noformat
logvol /            --fstype ext3  --name=root --vgname=hvg
  --size=4096 --useexisting
logvol swap     --fstype swap --name=swap --vgname=hvg
  --size=2048 --useexisting
logvol /home   --fstype ext3  --name=home --vgname=hvg
  --size=1024 --useexisting --noformat
Since both the /boot and LVM exist, we are specifying their partitions. Notice the use useexisting and noformat. It seems we need useexisting on all the LV's or they will be recreated, leaving the previous LV's unmounted, but taking up space.

No comments:

Post a Comment