Anaconda creates partitions when using LVM

Latest response

I am doing kickstart installs for many years now. But out of the sudden, Anaconda started to create a partition for those disks I am putting under LVM. Is this intentional or a implemented bug?
Even though I have this in my kickstart file (example):

OS:

part pv.02 --fstype="lvmpv" --ondisk=sdc --size=16383 --grow
volgroup vgos --pesize=4096 pv.02
logvol / --fstype=ext4 --vgname=vgos --size=256 --name=root
logvol /usr --fstype=ext4 --vgname=vgos --size=3072 --name=usr

It still creates a partition:

sdc 8:32 0 16G 0 disk
└─sdc1 8:33 0 16G 0 part
├─vgos-root 253:0 0 256M 0 lvm /
├─vgos-usr 253:2 0 3G 0 lvm /usr

My intention is to put the entire disk under the control of LVM.

Responses

Hi Stephan,

I see that as per the latest RHEL8 kickstart command options:

It is also possible to specify an entire drive, rather than a partition, in which case Anaconda will format and use the drive without creating a partition table. Note, however, that installation of GRUB2 is not supported on a device formatted in this way, and must be placed on a drive with a partition table.

partition pv.1 --onpart=hdb

Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/performing_an_advanced_rhel_installation/kickstart-commands-and-options-reference_installing-rhel-as-an-experienced-user#part-or-partition_kickstart-commands-for-handling-storage

I need to check/test this option. Let me try creating a VM and test this option.

So, try out the "--onpart=sdc" instead of "--ondisk=sdc" and check if that helps.

Yes, that did it. Thanks for your help.

You are welcome Stephan. Thanks for letting us know.