dracut/0223-90dm-fixup-dependency-cycle-between-MD-and-DM-shutdo.patch

59 lines
1.9 KiB
Diff
Raw Normal View History

Accepting request 422869 from home:hreinecke:branches:Base:System - Rename patch: * From 0211-fix_multipath_check_hostonly.patch to 0303-fix_multipath_check_hostonly.patch - Rename patch: * From 0213-10i18n-keymap-find.patch to 0213-Fix-wrong-keymap-inclusion.patch - 95fcoe: Do not complain about missing /etc/hba.conf (bsc#980539) * Add 0215-95fcoe-Do-not-complain-about-missing-etc-hba.conf.patch - 95fcoe: silence lldpad warnings * Add 0216-95fcoe-silence-lldpad-warnings.patch - 95fcoe: Allow to specify the FCoE mode via the fcoe= parameter * Add 0217-95fcoe-Allow-to-specify-the-FCoE-mode-via-the-fcoe-p.patch - 40network: allow persistent interface names (bsc#995284) * Add 0218-40network-allow-persistent-interface-names.patch - 95fcoe: use interface names instead of MAC addresses * Add 0219-95fcoe-use-interface-names-instead-of-MAC-addresses.patch - 95fcoe: always set AUTO_VLAN for fcoemon (bsc#995019) * Add 0220-95fcoe-always-set-AUTO_VLAN-for-fcoemon.patch - 95fcoe: Add shutdown script (bsc#994860) * Add 0221-95fcoe-Add-shutdown-script.patch - 90dm: Fixup shutdown script (bsc#994860) * Add 0222-90dm-Fixup-shutdown-script.patch - 90dm: fixup dependency cycle between MD and DM shutdown (bsc#994860) * Add 0223-90dm-fixup-dependency-cycle-between-MD-and-DM-shutdo.patch - 90multipath: Start daemon after udev settle (bsc#986734) * Add 0304-90multipath-Start-daemon-after-udev-settle.patch - 90multipath: load dm_multipath module during startup * Add 0305-90multipath-load-dm_multipath-module-during-startup.patch - 90multipath: add shutdown script (bsc#994860) OBS-URL: https://build.opensuse.org/request/show/422869 OBS-URL: https://build.opensuse.org/package/show/Base:System/dracut?expand=0&rev=263
2016-09-01 13:57:40 +02:00
From e35fe0828445a36284b2ba0852247bf6671a2680 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Thu, 25 Aug 2016 09:49:14 +0200
Subject: [PATCH] 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>
---
modules.d/90dm/dm-shutdown.sh | 14 ++++++++++++--
modules.d/90dm/module-setup.sh | 2 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/modules.d/90dm/dm-shutdown.sh b/modules.d/90dm/dm-shutdown.sh
index 0685a68..732548b 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 419e8b1..a5ada46 100755
--- a/modules.d/90dm/module-setup.sh
+++ b/modules.d/90dm/module-setup.sh
@@ -39,6 +39,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"
}
--
2.6.6