RHEL10: re-installing a system automatically using a kickstart fails with error "The object with LVM ID xxx doesn't exist"
Environment
- Red Hat Enterprise Linux 10.0
- anaconda
- kickstart
Issue
-
When reinstalling a system using a kickstart and custom partition layout, the reinstallation fails while configuring the storage with the following error message
Error An error occurred while activating your storage configuration. The object with LVM ID '<VG>/<LV>' doesn't exist
Resolution
The solution is to delete the existing volume groups, through using a %pre script, as shown in the example below:
%pre --interpreter=/bin/bash --erroronfail --log=/tmp/ks-pre.log
#
# KCS https://access.redhat.com/solutions/7124138
#
# TODO: Here below adjust to the list of devices that are to be reformatted:
DEVICES=( /dev/mapper/mpatha /dev/sda /dev/sdb /dev/sdc /dev/sdd )
vgnames=()
while read pv vg; do
for dev in ${DEVICES[@]}; do
if [[ "$pv" == $dev[0-9]* ]]; then
vgnames+=( $vg )
break
fi
done
done <<< $(pvs --noheadings -o pv_name,vg_name)
for vg in $(printf "%s\n" ${vgnames[@]} | sort -u); do
vgremove -ff $vg
done
%end
Root Cause
The issue is tracked by JIRA RHEL-95367 - Cannot reinstall system with kickstart, getting "The object with LVM ID xxx doesn't exist".
As of writing, it seems that there is a race occurring when Anaconda re-formats the disks and deletes the existing logical volumes.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments