From 7585548e0a58c3b342df8201f56f994c503c42807c9bf0aca9a67848d03fbd5a Mon Sep 17 00:00:00 2001 From: Robert Milasan Date: Mon, 11 Jun 2012 13:04:35 +0000 Subject: [PATCH] - Drop RUN+="socket:..." and update the multipath.rule like Fedora does. OBS-URL: https://build.opensuse.org/package/show/Base:System/multipath-tools?expand=0&rev=33 --- 0001-multipath.rules.patch | 35 +++++++++++++++++++++++++++++++++++ multipath-tools.changes | 6 ++++++ multipath-tools.spec | 2 ++ 3 files changed, 43 insertions(+) create mode 100644 0001-multipath.rules.patch diff --git a/0001-multipath.rules.patch b/0001-multipath.rules.patch new file mode 100644 index 0000000..b08d914 --- /dev/null +++ b/0001-multipath.rules.patch @@ -0,0 +1,35 @@ +Index: multipath-tools-0.4.9/multipath/multipath.rules +=================================================================== +--- multipath-tools-0.4.9.orig/multipath/multipath.rules ++++ multipath-tools-0.4.9/multipath/multipath.rules +@@ -1,7 +1,25 @@ + # +-# udev rules for multipathing. +-# The persistent symlinks are created with the kpartx rules +-# ++# multipath wants the devmaps presented as meaninglful device names ++# so name them after their devmap name ++SUBSYSTEM!="block", GOTO="end_mpath" ++ ++ENV{MPATH_SBIN_PATH}="/sbin" ++TEST!="$env{MPATH_SBIN_PATH}/multipath", ENV{MPATH_SBIN_PATH}="/usr/sbin" ++ ++ACTION=="add", ENV{DEVTYPE}!="partition", \ ++ ENV{DM_MULTIPATH_DEVICE_PATH}!="1", \ ++ PROGRAM=="$env{MPATH_SBIN_PATH}/multipath -c $tempnode", \ ++ ENV{DM_MULTIPATH_DEVICE_PATH}="1" ++ ++ENV{DM_MULTIPATH_DEVICE_PATH}=="1", ENV{DEVTYPE}!="partition", \ ++ RUN+="/usr/sbin/partx -d --nr 1-1024 $env{DEVNAME}" ++ ++KERNEL!="dm-*", GOTO="end_mpath" ++ACTION!="change", GOTO="end_mpath" ++ENV{DM_UUID}=="mpath-?*|part[0-9]*-mpath-?*", OPTIONS+="link_priority=10" ++ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath" ++ENV{DM_SUSPENDED}=="1", GOTO="end_mpath" ++ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath" ++RUN+="$env{MPATH_SBIN_PATH}/kpartx -a -p p $tempnode" + +-# socket for uevents +-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event" ++LABEL="end_mpath" diff --git a/multipath-tools.changes b/multipath-tools.changes index 9ae7679..1f5b1e1 100644 --- a/multipath-tools.changes +++ b/multipath-tools.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Jun 11 12:58:05 UTC 2012 - rmilasan@suse.com + +- Drop RUN+="socket:..." and update the multipath.rule like Fedora + does. + ------------------------------------------------------------------- Wed May 30 17:32:10 CEST 2012 - hare@suse.de diff --git a/multipath-tools.spec b/multipath-tools.spec index f09f19e..6b13277 100644 --- a/multipath-tools.spec +++ b/multipath-tools.spec @@ -32,6 +32,7 @@ Group: System/Base Source: multipath-tools-%{version}.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-build Patch0: %{name}-%{version}-opensuse-12.2.diff.bz2 +Patch1: 0001-multipath.rules.patch %description This package provides the tools to manage multipathed devices by @@ -72,6 +73,7 @@ Authors: %prep %setup -q -n multipath-tools-%{version} %patch0 -p1 +%patch1 -p1 %build make CC="%__cc" OPTFLAGS="$RPM_OPT_FLAGS" LIB=%_lib