Update kickstarts to remove cgts-vg as needed
In some scenarious, such as when the cgts-vg volume group spans multiple disks, the disk wiping in the kickstarts is insufficient to clear existing LVM metadata, and anaconda reports a failure to create the cgts-vg volume group as a result. This update adds explicit cleanup of the logical and physical volumes associated with cgts-vg, if not already wiped by the user prior to installation, and removes cgts-vg itself. This is done ahead of the anaconda partitioning, avoiding any conflict with automatic creation of the new cgts-vg. Change-Id: Id33cab02e1cecbfee8035cc55213c99ef3cea34d Closes-Bug: 1854082 Signed-off-by: Don Penney <don.penney@windriver.com>
This commit is contained in:
parent
97d07e0f30
commit
eb851a9da0
@ -66,6 +66,11 @@ fi
|
|||||||
# Deactivate existing volume groups to avoid Anaconda issues with pre-existing groups
|
# Deactivate existing volume groups to avoid Anaconda issues with pre-existing groups
|
||||||
vgs --noheadings -o vg_name | xargs --no-run-if-empty -n 1 vgchange -an
|
vgs --noheadings -o vg_name | xargs --no-run-if-empty -n 1 vgchange -an
|
||||||
|
|
||||||
|
# Remove volumes and group for cgts-vg, if any
|
||||||
|
lvremove --force cgts-vg
|
||||||
|
pvs --select 'vg_name=cgts-vg' --noheadings -o pv_name | xargs --no-run-if-empty pvremove --force --force --yes
|
||||||
|
vgs --select 'vg_name=cgts-vg' --noheadings -o vg_name | xargs --no-run-if-empty vgremove --force
|
||||||
|
|
||||||
ONLYUSE_HDD=""
|
ONLYUSE_HDD=""
|
||||||
if [ "$(curl -sf http://pxecontroller:6385/v1/upgrade/$(hostname)/in_upgrade 2>/dev/null)" = "true" ]; then
|
if [ "$(curl -sf http://pxecontroller:6385/v1/upgrade/$(hostname)/in_upgrade 2>/dev/null)" = "true" ]; then
|
||||||
# In an upgrade, only wipe the disk with the rootfs and boot partition
|
# In an upgrade, only wipe the disk with the rootfs and boot partition
|
||||||
|
Loading…
Reference in New Issue
Block a user