Merge "Wipe all LVs during kickstart"
This commit is contained in:
commit
f6ab5912b3
@ -1297,6 +1297,15 @@ if [ ${#vgs[@]} -eq 0 ] ; then
|
|||||||
ilog "No volume groups found"
|
ilog "No volume groups found"
|
||||||
else
|
else
|
||||||
for vg in ${vgs[@]} ; do
|
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}"
|
ilog "Disable volume group ${vg}"
|
||||||
exec_no_fds "$STOR_DEV_FDS" "vgchange -an --select vg_uuid=${vg} 2>/dev/null" 5 0.5
|
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}."
|
[ $? -ne 0 ] && report_failure_with_msg "Failed to disable ${vg}."
|
||||||
|
@ -1228,6 +1228,15 @@ if [ ${#vgs[@]} -eq 0 ] ; then
|
|||||||
ilog "No volume groups found"
|
ilog "No volume groups found"
|
||||||
else
|
else
|
||||||
for vg in ${vgs[@]}; do
|
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}"
|
ilog "Disable volume group ${vg}"
|
||||||
exec_no_fds "$STOR_DEV_FDS" "vgchange -an --select vg_uuid=${vg} 2>/dev/null" 5 0.5
|
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}."
|
[ $? -ne 0 ] && report_failure_with_msg "Failed to disable ${vg}."
|
||||||
|
Loading…
Reference in New Issue
Block a user