|
@@ -21,6 +21,7 @@ check_device()
|
|
|
fi
|
|
|
|
|
|
if pvs | grep --quiet "${DEVICE}" ; then
|
|
|
+ # check if the device has a open (e.g. mounted) lv
|
|
|
if [ $(lvs --noheadings --select vg_name="$(pvs --noheadings --select pv_name=~"${DEVICE}" -o vg_name)" --select lv_device_open!=0 | wc -l) -ne 0 ] ; then
|
|
|
fatal ${LVMUSED_E} "${DEVICE} is part of a used lvm volume"
|
|
|
fi
|