I've got a CentOS 7 machine which I want to re-image using kickstart, whilst preserving the data on a single logical volume. Here's how the current image's partitions were configured using kickstart.
Code: Select all
# Creating RAID Partitions
part raid.bootdiska --size=1000 --ondisk=sda
part raid.bootdiskb --size=1000 --ondisk=sdb
part raid.preservediska --size=1000 --ondisk=sda
part raid.preservediskb --size=1000 --ondisk=sdb
part raid.diska --size=800000 --ondisk=sda
part raid.diskb --size=800000 --ondisk=sdb
# Creating RAID Devices
raid /boot --fstype=ext4 --level=1 --device=rd0 raid.bootdiska raid.bootdiskb
raid /preserve --fstype=ext4 --level1 --device=rd1 raid.preservediska raid.preservediskb
raid pv.disk --fstype=ext4 --level=1 --device=rd2 raid.diska raid.diskb
# Creating Logical Group and Volumes
volgroup delta --pesize=131072 pv.disk
logvol / --fstype=ext4 --name=root --vgname=delta --size=50000
logvol swap --name=swap --vgname=delta --size=8000
logvol /projects --fstype=ext4 --name=projects --vgname=delta --size=600000
Code: Select all
# Creating RAID Partitions
## No entries needed as we'll be using the existing RAID Partitions
# Creating RAID Devices
raid /boot --device=rd0 --useexisting
raid /preserve --device=rd1 --noformat
raid pv.disk --device=rd2 --noformat
#Creating Logical Group and Volumes
volgroup delta --noformat
logvol / --fstype=ext4 --name=root --vgname=delta --useexisting
logvol swap --name=swap --vgname=delta --useexisting
logvol /projects --fstype=ext4 --name=projects --vgname=delta --noformat
I'm not looking for critique / criticism of kickstart, or alternative solutions beyond kickstart. If anyone can see what I'm doing wrong, or knows that what I'm trying to do with the root logvol is impossible, please could you let me know?
Cheers,
CD