Wipe all LVs during kickstart
Backup and Restore are not completing because the manifest is not applied when trying drbd-cephmon turns primary, It is occurring because the LVs are not being wiped before being removed, so some garbage is impacting drbd-cephmon turns primary and causes the manifest fails to not be applied. To ensure that drbd-cephmon turns primary on first unlock, LVs will be wiped before recreating them during kickstart procedure. Test Plan: PASS: Backup and restore on AIO-DX PASS: Install AIO-SX over the previous installation without wiping the disks and checking the install.log to verify if the disks are wiped during kickstart. PASS: Install AIO-DX, reinstall Controller-1, and checking the install.log to verify if the disks were wiped during kickstart. Closes-Bug: #2031542 Change-Id: Ib00d77fbc9dfd62e9c94f418e29f2805f8a0c036 Signed-off-by: Gustavo Ornaghi Antunes <gustavo.ornaghiantunes@windriver.com>
This commit is contained in:
parent
7a1fb6333c
commit
00b313de49
@ -1297,6 +1297,15 @@ if [ ${#vgs[@]} -eq 0 ] ; then
|
||||
ilog "No volume groups found"
|
||||
else
|
||||
for vg in ${vgs[@]} ; do
|
||||
lvs=( $(exec_no_fds "$STOR_DEV_FDS" "lvs --select vg_uuid=${vg} --noheadings -o lv_name 2>/dev/null") )
|
||||
vg_name=$(exec_no_fds "$STOR_DEV_FDS" "vgdisplay -C --noheadings --select vg_uuid=${vg} -o vg_name 2>/dev/null" | xargs)
|
||||
|
||||
ilog "Wipe any previous signatures from ${vg_name} volume group"
|
||||
for lv in ${lvs[@]} ; do
|
||||
ilog "Wipe any previous signatures from ${lv} logical volume"
|
||||
exec_no_fds "$STOR_DEV_FDS" "wipefs -a /dev/${vg_name}/${lv} 2>/dev/null" 5 0.5 || wlog "Failed to wipe signatures from ${lv}"
|
||||
done
|
||||
|
||||
ilog "Disable volume group ${vg}"
|
||||
exec_no_fds "$STOR_DEV_FDS" "vgchange -an --select vg_uuid=${vg} 2>/dev/null" 5 0.5
|
||||
[ $? -ne 0 ] && report_failure_with_msg "Failed to disable ${vg}."
|
||||
|
@ -1228,6 +1228,15 @@ if [ ${#vgs[@]} -eq 0 ] ; then
|
||||
ilog "No volume groups found"
|
||||
else
|
||||
for vg in ${vgs[@]}; do
|
||||
lvs=( $(exec_no_fds "$STOR_DEV_FDS" "lvs --select vg_uuid=${vg} --noheadings -o lv_name 2>/dev/null") )
|
||||
vg_name=$(exec_no_fds "$STOR_DEV_FDS" "vgdisplay -C --noheadings --select vg_uuid=${vg} -o vg_name 2>/dev/null" | xargs)
|
||||
|
||||
ilog "Wipe any previous signatures from ${vg_name} volume group"
|
||||
for lv in ${lvs[@]} ; do
|
||||
ilog "Wipe any previous signatures from ${lv} logical volume"
|
||||
exec_no_fds "$STOR_DEV_FDS" "wipefs -a /dev/${vg_name}/${lv} 2>/dev/null" 5 0.5 || wlog "Failed to wipe signatures from ${lv}"
|
||||
done
|
||||
|
||||
ilog "Disable volume group ${vg}"
|
||||
exec_no_fds "$STOR_DEV_FDS" "vgchange -an --select vg_uuid=${vg} 2>/dev/null" 5 0.5
|
||||
[ $? -ne 0 ] && report_failure_with_msg "Failed to disable ${vg}."
|
||||
|
Loading…
x
Reference in New Issue
Block a user