90dm: fixup dependency cycle between MD and DM shutdown
DM devices might be located on top of MD devices, so we need to call the DM shutdown script before MD shutdown. The exception here are multipath devices, which are below MD devices. So skip removing multipath devices here to avoid spurious errors. References: bsc#994860 Signed-off-by: Hannes Reinecke <hare@suse.com>master
parent
07e6357483
commit
870591acec
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue