diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh index 4e2e2602..b23836f4 100755 --- a/modules.d/90dm/dm-shutdown.sh +++ b/modules.d/90dm/dm-shutdown.sh @@ -9,8 +9,18 @@ _remove_dm() { [ -e ${s} ] || continue _remove_dm ${s##*/} done - devname=$(cat /sys/block/${dev}/dm/name) - dmsetup -v --noudevsync remove "$devname" || return $? + # multipath devices might have MD devices on top, + # which are removed after this script. So do not + # remove those to avoid spurious errors + case $(cat /sys/block/${dev}/dm/uuid) in + mpath-*) + return 0 + ;; + *) + devname=$(cat /sys/block/${dev}/dm/name) + dmsetup -v --noudevsync remove "$devname" || return $? + ;; + esac return 0 } diff --git a/modules.d/90dm/module-setup.sh b/modules.d/90dm/module-setup.sh index 2b8e39ff..02d97c24 100755 --- a/modules.d/90dm/module-setup.sh +++ b/modules.d/90dm/module-setup.sh @@ -38,6 +38,6 @@ install() { inst_rules "$moddir/59-persistent-storage-dm.rules" prepare_udev_rules 59-persistent-storage-dm.rules - inst_hook shutdown 30 "$moddir/dm-shutdown.sh" + inst_hook shutdown 25 "$moddir/dm-shutdown.sh" }