From daa6c91991d6b1472a0962f0753f4d60ee977c9b Mon Sep 17 00:00:00 2001 From: yangsong Date: Thu, 13 Dec 2018 18:30:30 +0800 Subject: [PATCH] fix rhels7.4 provision hang in anaconda with #4876 (#5855) * fix rhels7.4 provision hang in anaconda with #4876 * change vg name from system to xcatvg --- xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 index 44f1c87c6..09769e5e4 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 +++ b/xCAT-server/share/xcat/install/scripts/pre.rh.rhels7 @@ -178,6 +178,12 @@ if uname -r|grep -q '^3.*el7'; then FSTYPE=xfs EFIFSTYPE=efi fi + +#remove any exiting "xcatvg" VG to avoid fatal error +vgs > /tmp/vgs 2>&1 +vgchange -a n xcatvg +vgremove -f xcatvg + msgutil_r "$MASTER_IP" "info" "Found $instdisk, generate partition file..." "/var/log/xcat/xcat.log" "$log_label" echo "ignoredisk --only-use=$instdisk" >> /tmp/partitionfile if [ `uname -m` = "ppc64" -o `uname -m` = "ppc64le" ]; then @@ -191,8 +197,8 @@ fi echo "part /boot --size 512 --fstype $BOOTFSTYPE --ondisk $instdisk" >> /tmp/partitionfile echo "part swap --recommended --ondisk $instdisk" >> /tmp/partitionfile echo "part pv.01 --size 1 --grow --ondisk $instdisk" >> /tmp/partitionfile -echo "volgroup system pv.01" >> /tmp/partitionfile -echo "logvol / --vgname=system --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile +echo "volgroup xcatvg pv.01" >> /tmp/partitionfile +echo "logvol / --vgname=xcatvg --name=root --size 1 --grow --fstype $FSTYPE" >> /tmp/partitionfile #specify "bootloader" configuration in "/tmp/partitionfile" if there is no user customized partition file BOOTLOADER="bootloader "