device-mapper-multipath-0.4.9-51

Add 0032-RHBZ-956464-mpathconf-defaults.patch
  * fix defaults listed in usage
Add 0033-RHBZ-829963-e-series-conf.patch
Add 0034-RHBZ-851416-mpathconf-display.patch
  * display whether or not multipathd is running in the status
Add 0035-RHBZ-891921-list-mpp.patch
  * add a new path format wilcard to list the multipath device associated
    with a path
Add 0036-RHBZ-949239-load-multipath-module.patch
  * load the dm-multipath kernel module when multipathd starts
Add 0037-RHBZ-768873-fix-rename.patch
  * When deciding on a multipth devices name on reload, don't default to
    the existing name if there is no config file alias and user_friendly_names
    isn't set. Use the wwid.
Modify multipath.conf
Resolves: bz #768873, #950252
This commit is contained in:
Benjamin Marzinski 2013-05-17 10:33:14 -05:00
parent f5329c27a7
commit 545c4d7632
8 changed files with 291 additions and 5 deletions

View File

@ -0,0 +1,19 @@
---
multipath/mpathconf | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: multipath-tools-130222/multipath/mpathconf
===================================================================
--- multipath-tools-130222.orig/multipath/mpathconf
+++ multipath-tools-130222/multipath/mpathconf
@@ -31,8 +31,8 @@ function usage
echo "Commands:"
echo "Enable: --enable "
echo "Disable: --disable"
- echo "Set user_friendly_names (Default n): --user_friendly_names <y|n>"
- echo "Set find_multipaths (Default n): --find_multipaths <y|n>"
+ echo "Set user_friendly_names (Default y): --user_friendly_names <y|n>"
+ echo "Set find_multipaths (Default y): --find_multipaths <y|n>"
echo "Load the dm-multipath modules on enable (Default y): --with_module <y|n>"
echo "start/stop/reload multipathd (Default n): --with_multipathd <y|n>"
echo ""

View File

@ -0,0 +1,44 @@
This patch provides hwtable updates for NETAPP/LSI/ENGENIO E-Series arrays,
utilizing new features to detect TPGS support, automatically.
Signed-off-by: Sean Stewart <Sean.Stewart@netapp.com>
---
---
libmultipath/hwtable.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
Index: multipath-tools-130222/libmultipath/hwtable.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/hwtable.c
+++ multipath-tools-130222/libmultipath/hwtable.c
@@ -1046,9 +1046,13 @@ static struct hwentry default_hw[] = {
.checker_name = RDAC,
.prio_name = PRIO_RDAC,
},
- /* LSI/Engenio/NetApp E-Series RDAC storage */
+ /* LSI/Engenio/NetApp E-Series RDAC storage
+ *
+ * Maintainer : Sean Stewart
+ * Mail : sean.stewart@netapp.com
+ */
{
- .vendor = "(LSI|ENGENIO)",
+ .vendor = "(NETAPP|LSI|ENGENIO)",
.product = "INF-01-00",
.bl_product = "Universal Xport",
.features = "2 pg_init_retries 50",
@@ -1056,10 +1060,12 @@ static struct hwentry default_hw[] = {
.pgpolicy = GROUP_BY_PRIO,
.pgfailback = -FAILBACK_IMMEDIATE,
.rr_weight = RR_WEIGHT_NONE,
- .no_path_retry = 15,
+ .no_path_retry = 30,
.checker_name = RDAC,
.prio_name = PRIO_RDAC,
.prio_args = NULL,
+ .detect_prio = DETECT_PRIO_ON,
+ .retain_hwhandler = RETAIN_HWHANDLER_ON,
},
{
.vendor = "STK",

View File

@ -0,0 +1,53 @@
---
multipath/mpathconf | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
Index: multipath-tools-130222/multipath/mpathconf
===================================================================
--- multipath-tools-130222.orig/multipath/mpathconf
+++ multipath-tools-130222/multipath/mpathconf
@@ -159,7 +159,7 @@ if [ -z "$MODULE" -o "$MODULE" = "y" ];
fi
if [ "$MULTIPATHD" = "y" ]; then
- if service multipathd status > /dev/null ; then
+ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then
HAVE_MULTIPATHD=1
else
HAVE_MULTIPATHD=0
@@ -210,8 +210,17 @@ if [ -n "$SHOW_STATUS" ]; then
echo "dm_multipath module is not loaded"
fi
fi
- if [ -n "$HAVE_MULTIPATHD" ]; then
- service multipathd status
+ if [ -z "$HAVE_MULTIPATHD" ]; then
+ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then
+ HAVE_MULTIPATHD=1
+ else
+ HAVE_MULTIPATHD=0
+ fi
+ fi
+ if [ "$HAVE_MULTIPATHD" = 1 ]; then
+ echo "multipathd is running"
+ else
+ echo "multipathd is not running"
fi
exit 0
fi
@@ -301,12 +310,12 @@ if [ "$ENABLE" = 1 ]; then
modprobe dm_multipath
fi
if [ "$HAVE_MULTIPATHD" = 0 ]; then
- service multipathd start
+ systemctl start multipathd.service
fi
elif [ "$ENABLE" = 0 ]; then
if [ "$HAVE_MULTIPATHD" = 1 ]; then
- service multipathd stop
+ systemctl stop multipathd.service
fi
elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then
- service multipathd reload
+ systemctl reload multipathd.service
fi

View File

@ -0,0 +1,33 @@
---
libmultipath/print.c | 11 +++++++++++
1 file changed, 11 insertions(+)
Index: multipath-tools-130222/libmultipath/print.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/print.c
+++ multipath-tools-130222/libmultipath/print.c
@@ -422,6 +422,16 @@ snprint_path_serial (char * buff, size_t
}
static int
+snprint_path_mpp (char * buff, size_t len, struct path * pp)
+{
+ if (!pp->mpp)
+ return snprintf(buff, len, "[orphan]");
+ if (!pp->mpp->alias)
+ return snprintf(buff, len, "[unknown]");
+ return snprint_str(buff, len, pp->mpp->alias);
+}
+
+static int
snprint_path_checker (char * buff, size_t len, struct path * pp)
{
struct checker * c = &pp->checker;
@@ -464,6 +474,7 @@ struct path_data pd[] = {
{'p', "pri", 0, snprint_pri},
{'S', "size", 0, snprint_path_size},
{'z', "serial", 0, snprint_path_serial},
+ {'m', "multipath", 0, snprint_path_mpp},
{0, NULL, 0 , NULL}
};

View File

@ -0,0 +1,16 @@
---
multipathd/multipathd.service | 1 +
1 file changed, 1 insertion(+)
Index: multipath-tools-130222/multipathd/multipathd.service
===================================================================
--- multipath-tools-130222.orig/multipathd/multipathd.service
+++ multipath-tools-130222/multipathd/multipathd.service
@@ -10,6 +10,7 @@ Conflicts=shutdown.target
[Service]
Type=forking
PIDFile=/var/run/multipathd.pid
+ExecStartPre=/sbin/modprobe dm-multipath
ExecStart=/sbin/multipathd
ExecReload=/sbin/multipathd reconfigure
#ExecStop=/path/to/scrip delete-me if not necessary

View File

@ -0,0 +1,87 @@
---
libmultipath/devmapper.c | 45 ---------------------------------------------
libmultipath/devmapper.h | 1 -
libmultipath/propsel.c | 2 --
3 files changed, 48 deletions(-)
Index: multipath-tools-130222/libmultipath/devmapper.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/devmapper.c
+++ multipath-tools-130222/libmultipath/devmapper.c
@@ -917,51 +917,6 @@ out:
return r;
}
-extern char *
-dm_get_name(char *uuid)
-{
- struct dm_task *dmt;
- struct dm_info info;
- char *prefixed_uuid, *name = NULL;
- const char *nametmp;
-
- dmt = dm_task_create(DM_DEVICE_INFO);
- if (!dmt)
- return NULL;
-
- prefixed_uuid = MALLOC(UUID_PREFIX_LEN + strlen(uuid) + 1);
- if (!prefixed_uuid) {
- condlog(0, "cannot create prefixed uuid : %s",
- strerror(errno));
- goto freeout;
- }
- sprintf(prefixed_uuid, UUID_PREFIX "%s", uuid);
- if (!dm_task_set_uuid(dmt, prefixed_uuid))
- goto freeout;
-
- if (!dm_task_run(dmt))
- goto freeout;
-
- if (!dm_task_get_info(dmt, &info) || !info.exists)
- goto freeout;
-
- nametmp = dm_task_get_name(dmt);
- if (nametmp && strlen(nametmp)) {
- name = MALLOC(strlen(nametmp) + 1);
- if (name)
- strcpy(name, nametmp);
- } else {
- condlog(2, "%s: no device-mapper name found", uuid);
- }
-
-freeout:
- if (prefixed_uuid)
- FREE(prefixed_uuid);
- dm_task_destroy(dmt);
-
- return name;
-}
-
int
dm_geteventnr (char *name)
{
Index: multipath-tools-130222/libmultipath/devmapper.h
===================================================================
--- multipath-tools-130222.orig/libmultipath/devmapper.h
+++ multipath-tools-130222/libmultipath/devmapper.h
@@ -40,7 +40,6 @@ int dm_remove_partmaps (const char * map
int dm_get_uuid(char *name, char *uuid);
int dm_get_info (char * mapname, struct dm_info ** dmi);
int dm_rename (char * old, char * new);
-char * dm_get_name(char * uuid);
int dm_reassign(const char * mapname);
int dm_reassign_table(const char *name, char *old, char *new);
int dm_setgeometry(struct multipath *mpp);
Index: multipath-tools-130222/libmultipath/propsel.c
===================================================================
--- multipath-tools-130222.orig/libmultipath/propsel.c
+++ multipath-tools-130222/libmultipath/propsel.c
@@ -263,8 +263,6 @@ select_alias (struct multipath * mp)
conf->bindings_file, mp->alias_prefix, conf->bindings_read_only);
}
if (mp->alias == NULL)
- mp->alias = dm_get_name(mp->wwid);
- if (mp->alias == NULL)
mp->alias = STRDUP(mp->wwid);
}

View File

@ -1,7 +1,7 @@
Summary: Tools to manage multipath devices using device-mapper Summary: Tools to manage multipath devices using device-mapper
Name: device-mapper-multipath Name: device-mapper-multipath
Version: 0.4.9 Version: 0.4.9
Release: 50%{?dist} Release: 51%{?dist}
License: GPL+ License: GPL+
Group: System Environment/Base Group: System Environment/Base
URL: http://christophe.varoqui.free.fr/ URL: http://christophe.varoqui.free.fr/
@ -39,6 +39,12 @@ Patch0028: 0028-RHBZ-929078-refresh-udev-dev.patch
Patch0029: 0029-RH-no-prio-put-msg.patch Patch0029: 0029-RH-no-prio-put-msg.patch
Patch0030: 0030-RHBZ-916528-override-queue-no-daemon.patch Patch0030: 0030-RHBZ-916528-override-queue-no-daemon.patch
Patch0031: 0031-RHBZ-957188-kpartx-use-dm-name.patch Patch0031: 0031-RHBZ-957188-kpartx-use-dm-name.patch
Patch0032: 0032-RHBZ-956464-mpathconf-defaults.patch
Patch0033: 0033-RHBZ-829963-e-series-conf.patch
Patch0034: 0034-RHBZ-851416-mpathconf-display.patch
Patch0035: 0035-RHBZ-891921-list-mpp.patch
Patch0036: 0036-RHBZ-949239-load-multipath-module.patch
Patch0037: 0037-RHBZ-768873-fix-rename.patch
# runtime # runtime
Requires: %{name}-libs = %{version}-%{release} Requires: %{name}-libs = %{version}-%{release}
@ -122,6 +128,12 @@ kpartx manages partition creation and removal for device-mapper devices.
%patch0029 -p1 %patch0029 -p1
%patch0030 -p1 %patch0030 -p1
%patch0031 -p1 %patch0031 -p1
%patch0032 -p1
%patch0033 -p1
%patch0034 -p1
%patch0035 -p1
%patch0036 -p1
%patch0037 -p1
cp %{SOURCE1} . cp %{SOURCE1} .
%build %build
@ -215,6 +227,24 @@ bin/systemctl --no-reload enable multipathd.service >/dev/null 2>&1 ||:
%{_mandir}/man8/kpartx.8.gz %{_mandir}/man8/kpartx.8.gz
%changelog %changelog
* Fri May 17 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-51
- Add 0032-RHBZ-956464-mpathconf-defaults.patch
* fix defaults listed in usage
- Add 0033-RHBZ-829963-e-series-conf.patch
- Add 0034-RHBZ-851416-mpathconf-display.patch
* display whether or not multipathd is running in the status
- Add 0035-RHBZ-891921-list-mpp.patch
* add a new path format wilcard to list the multipath device associated
with a path
- Add 0036-RHBZ-949239-load-multipath-module.patch
* load the dm-multipath kernel module when multipathd starts
- Add 0037-RHBZ-768873-fix-rename.patch
* When deciding on a multipth devices name on reload, don't default to
the existing name if there is no config file alias and user_friendly_names
isn't set. Use the wwid.
- Modify multipath.conf
- Resolves: bz #768873, #950252
* Tue Apr 30 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-50 * Tue Apr 30 2013 Benjamin Marzinski <bmarzins@redhat.com> 0.4.9-50
- Add 0031-RHBZ-957188-kpartx-use-dm-name.patch - Add 0031-RHBZ-957188-kpartx-use-dm-name.patch
* use the basename of the devices that will be created to choose the * use the basename of the devices that will be created to choose the

View File

@ -1,9 +1,13 @@
# This is a basic configuration file with some examples, for device mapper # This is a basic configuration file with some examples, for device mapper
# multipath. # multipath.
# For a complete list of the default configuration values, see #
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.defaults # For a complete list of the default configuration values, run either
# For a list of configuration options with descriptions, see # multipath -t
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated # or
# multipathd show config
#
# For a list of configuration options with descriptions, see the multipath.conf
# man page
## By default, devices with vendor = "IBM" and product = "S/390.*" are ## By default, devices with vendor = "IBM" and product = "S/390.*" are
## blacklisted. To enable mulitpathing on these devies, uncomment the ## blacklisted. To enable mulitpathing on these devies, uncomment the