diff --git a/kickstart/files/kickstart.cfg b/kickstart/files/kickstart.cfg index 1669505c..68f11851 100644 --- a/kickstart/files/kickstart.cfg +++ b/kickstart/files/kickstart.cfg @@ -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}." diff --git a/kickstart/files/miniboot.cfg b/kickstart/files/miniboot.cfg index dd707f53..e250dbe7 100644 --- a/kickstart/files/miniboot.cfg +++ b/kickstart/files/miniboot.cfg @@ -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}."