Last active
August 13, 2021 14:18
-
-
Save JakeDEvans/908d9a75aa5fc24c9eee24f4912af9aa to your computer and use it in GitHub Desktop.
Kickstart config for full disk LVM (no partitions)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Expects 2 vm disks | |
# Disk 1 = 1GB | |
# Disk 2 = DATA (5GB or larger) | |
# Disk Layout | |
clearpart --all --initlabel --drives=sda | |
part biosboot --fstype=biosboot --size=1 --ondisk=sda | |
part /boot --fstype=xfs --size=512 --grow --ondisk=sda | |
logvol swap --fstype=swap --name=swap --vgname=vg01 --size=512 | |
logvol /tmp --fstype xfs --name=tmp --vgname=vg01 --size=1024 | |
logvol / --fstype xfs --name=root --vgname=vg01 --size=2048 --grow | |
%pre | |
pvremove -y -ff /dev/sdb | |
pvcreate /dev/sdb | |
vgcreate vg01 /dev/sdb | |
vgscan | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You could also just tell Anaconda about the VG you made, like:
Also, at least from my experience, you don't need to call
vgscan
at the end of the %pre section ... but if there's any existing LVM setup, you may need a little more to get it cleaned up. I use something like: