Revamp package a bit
This commit is contained in:
parent
58ed7b81e7
commit
e3b500920b
@ -1 +1 @@
|
||||
multipath-tools-090729.tgz
|
||||
multipath-tools-091027.tar.gz
|
||||
|
@ -1,16 +1,28 @@
|
||||
From 8191fb07d8212e29ad44370abb60e174e1c34bb5 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 08:15:15 +0200
|
||||
Subject: [PATCH 01/12] RH: queue without daemon
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 50a728c... 86b1320... M libmultipath/config.h
|
||||
:100644 100644 ee4de68... 7888e8e... M libmultipath/dict.c
|
||||
:100644 100644 afd1246... 2e7a0d1... M libmultipath/structs.h
|
||||
:100644 100644 c222da4... 9afa615... M multipath.conf.annotated
|
||||
:100644 100644 3e0fd6e... 44d1329... M multipath.conf.synthetic
|
||||
:100644 100644 41a9bd0... 90de6df... M multipathd/main.c
|
||||
libmultipath/config.h | 1 +
|
||||
libmultipath/dict.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
libmultipath/structs.h | 6 ++++++
|
||||
multipath.conf.annotated | 9 +++++++++
|
||||
multipath.conf.synthetic | 1 +
|
||||
multipathd/main.c | 5 +++++
|
||||
6 files changed, 57 insertions(+)
|
||||
6 files changed, 57 insertions(+), 0 deletions(-)
|
||||
|
||||
Index: multipath-tools-090724/libmultipath/config.h
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/config.h
|
||||
+++ multipath-tools-090724/libmultipath/config.h
|
||||
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
||||
index 50a728c..86b1320 100644
|
||||
--- a/libmultipath/config.h
|
||||
+++ b/libmultipath/config.h
|
||||
@@ -72,6 +72,7 @@ struct config {
|
||||
int pg_timeout;
|
||||
int max_fds;
|
||||
@ -19,10 +31,10 @@ Index: multipath-tools-090724/libmultipath/config.h
|
||||
int daemon;
|
||||
int flush_on_last_del;
|
||||
int attribute_flags;
|
||||
Index: multipath-tools-090724/libmultipath/dict.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/dict.c
|
||||
+++ multipath-tools-090724/libmultipath/dict.c
|
||||
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
||||
index ee4de68..7888e8e 100644
|
||||
--- a/libmultipath/dict.c
|
||||
+++ b/libmultipath/dict.c
|
||||
@@ -333,6 +333,28 @@ def_no_path_retry_handler(vector strvec)
|
||||
}
|
||||
|
||||
@ -52,7 +64,7 @@ Index: multipath-tools-090724/libmultipath/dict.c
|
||||
def_pg_timeout_handler(vector strvec)
|
||||
{
|
||||
int pg_timeout;
|
||||
@@ -1846,6 +1868,18 @@ snprint_def_no_path_retry (char * buff,
|
||||
@@ -1846,6 +1868,18 @@ snprint_def_no_path_retry (char * buff, int len, void * data)
|
||||
}
|
||||
|
||||
static int
|
||||
@ -79,10 +91,10 @@ Index: multipath-tools-090724/libmultipath/dict.c
|
||||
install_keyword("pg_timeout", &def_pg_timeout_handler, &snprint_def_pg_timeout);
|
||||
install_keyword("flush_on_last_del", &def_flush_on_last_del_handler, &snprint_def_flush_on_last_del);
|
||||
install_keyword("user_friendly_names", &names_handler, &snprint_def_user_friendly_names);
|
||||
Index: multipath-tools-090724/libmultipath/structs.h
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/structs.h
|
||||
+++ multipath-tools-090724/libmultipath/structs.h
|
||||
diff --git a/libmultipath/structs.h b/libmultipath/structs.h
|
||||
index afd1246..2e7a0d1 100644
|
||||
--- a/libmultipath/structs.h
|
||||
+++ b/libmultipath/structs.h
|
||||
@@ -63,6 +63,12 @@ enum pgstates {
|
||||
PGSTATE_ACTIVE
|
||||
};
|
||||
@ -96,11 +108,11 @@ Index: multipath-tools-090724/libmultipath/structs.h
|
||||
enum pgtimeouts {
|
||||
PGTIMEOUT_UNDEF,
|
||||
PGTIMEOUT_NONE
|
||||
Index: multipath-tools-090724/multipath.conf.annotated
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath.conf.annotated
|
||||
+++ multipath-tools-090724/multipath.conf.annotated
|
||||
@@ -151,6 +151,15 @@
|
||||
diff --git a/multipath.conf.annotated b/multipath.conf.annotated
|
||||
index c222da4..9afa615 100644
|
||||
--- a/multipath.conf.annotated
|
||||
+++ b/multipath.conf.annotated
|
||||
@@ -153,6 +153,15 @@
|
||||
# no_path_retry queue
|
||||
#
|
||||
# #
|
||||
@ -116,10 +128,10 @@ Index: multipath-tools-090724/multipath.conf.annotated
|
||||
# # name : user_friendly_names
|
||||
# # scope : multipath
|
||||
# # desc : If set to "yes", using the bindings file
|
||||
Index: multipath-tools-090724/multipath.conf.synthetic
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath.conf.synthetic
|
||||
+++ multipath-tools-090724/multipath.conf.synthetic
|
||||
diff --git a/multipath.conf.synthetic b/multipath.conf.synthetic
|
||||
index 3e0fd6e..44d1329 100644
|
||||
--- a/multipath.conf.synthetic
|
||||
+++ b/multipath.conf.synthetic
|
||||
@@ -16,6 +16,7 @@
|
||||
# rr_weight priorities
|
||||
# failback immediate
|
||||
@ -128,10 +140,10 @@ Index: multipath-tools-090724/multipath.conf.synthetic
|
||||
# user_friendly_names no
|
||||
# mode 644
|
||||
# uid 0
|
||||
Index: multipath-tools-090724/multipathd/main.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipathd/main.c
|
||||
+++ multipath-tools-090724/multipathd/main.c
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 41a9bd0..90de6df 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -1334,6 +1334,8 @@ child (void * param)
|
||||
pthread_t check_thr, uevent_thr, uxlsnr_thr;
|
||||
pthread_attr_t log_attr, misc_attr;
|
||||
@ -151,3 +163,6 @@ Index: multipath-tools-090724/multipathd/main.c
|
||||
remove_maps_and_stop_waiters(vecs);
|
||||
free_pathvec(vecs->pathvec, FREE_PATHS);
|
||||
|
||||
--
|
||||
1.6.5.1
|
||||
|
123
0001-for-upstream-add-tpg_pref-prioritizer.patch
Normal file
123
0001-for-upstream-add-tpg_pref-prioritizer.patch
Normal file
@ -0,0 +1,123 @@
|
||||
From faf6bfc96b98562626e0ea12aecb582032ff4cab Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Mon, 19 Oct 2009 07:02:02 +0200
|
||||
Subject: [PATCH 1/1] for-upstream: add tpg_pref prioritizer
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 fc9277f... 1f40859... M libmultipath/prio.h
|
||||
:100644 100644 949a60a... 5021c04... M libmultipath/prioritizers/Makefile
|
||||
:100644 100644 0048a44... 22513ab... M libmultipath/prioritizers/alua.c
|
||||
:100644 100644 0531052... cd9c29d... M libmultipath/prioritizers/alua_rtpg.c
|
||||
:100644 100644 bddbbdd... daf95a6... M libmultipath/prioritizers/alua_spc3.h
|
||||
libmultipath/prio.h | 1 +
|
||||
libmultipath/prioritizers/Makefile | 10 ++++++++++
|
||||
libmultipath/prioritizers/alua.c | 7 +++++++
|
||||
libmultipath/prioritizers/alua_rtpg.c | 4 ++++
|
||||
libmultipath/prioritizers/alua_spc3.h | 6 ++++++
|
||||
5 files changed, 28 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/prio.h b/libmultipath/prio.h
|
||||
index fc9277f..1f40859 100644
|
||||
--- a/libmultipath/prio.h
|
||||
+++ b/libmultipath/prio.h
|
||||
@@ -16,6 +16,7 @@
|
||||
* Known prioritizers for use in hwtable.c
|
||||
*/
|
||||
#define PRIO_ALUA "alua"
|
||||
+#define PRIO_TPG_PREF "tpg_pref"
|
||||
#define PRIO_CONST "const"
|
||||
#define PRIO_EMC "emc"
|
||||
#define PRIO_HDS "hds"
|
||||
diff --git a/libmultipath/prioritizers/Makefile b/libmultipath/prioritizers/Makefile
|
||||
index 949a60a..5021c04 100644
|
||||
--- a/libmultipath/prioritizers/Makefile
|
||||
+++ b/libmultipath/prioritizers/Makefile
|
||||
@@ -11,6 +11,7 @@ LIBS = \
|
||||
libprioemc.so \
|
||||
libpriordac.so \
|
||||
libprioalua.so \
|
||||
+ libpriotpg_pref.so \
|
||||
libprionetapp.so \
|
||||
libpriohds.so
|
||||
|
||||
@@ -21,9 +22,18 @@ all: $(LIBS)
|
||||
libprioalua.so: alua.o alua_rtpg.o
|
||||
$(CC) $(SHARED_FLAGS) -o $@ $^
|
||||
|
||||
+libpriotpg_pref.so: pref.o pref_rtpg.o
|
||||
+ $(CC) $(SHARED_FLAGS) -o $@ $^
|
||||
+
|
||||
libprio%.so: %.o
|
||||
$(CC) $(SHARED_FLAGS) -o $@ $^
|
||||
|
||||
+pref.o: alua.c
|
||||
+ $(CC) $(CFLAGS) -DTPG_PREF -c -o $@ $<
|
||||
+
|
||||
+pref_rtpg.o: alua_rtpg.c
|
||||
+ $(CC) $(CFLAGS) -DTPG_PREF -c -o $@ $<
|
||||
+
|
||||
install: $(LIBS)
|
||||
$(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir)
|
||||
|
||||
diff --git a/libmultipath/prioritizers/alua.c b/libmultipath/prioritizers/alua.c
|
||||
index 0048a44..22513ab 100644
|
||||
--- a/libmultipath/prioritizers/alua.c
|
||||
+++ b/libmultipath/prioritizers/alua.c
|
||||
@@ -28,6 +28,12 @@
|
||||
int
|
||||
get_alua_info(int fd)
|
||||
{
|
||||
+#ifdef TPG_PREF
|
||||
+ char * aas_string[] = {
|
||||
+ [AAS_OPTIMIZED] = "preferred",
|
||||
+ [AAS_STANDBY] = "non-preferred",
|
||||
+ };
|
||||
+#else
|
||||
char * aas_string[] = {
|
||||
[AAS_OPTIMIZED] = "active/optimized",
|
||||
[AAS_NON_OPTIMIZED] = "active/non-optimized",
|
||||
@@ -35,6 +41,7 @@ get_alua_info(int fd)
|
||||
[AAS_UNAVAILABLE] = "unavailable",
|
||||
[AAS_TRANSITIONING] = "transitioning between states",
|
||||
};
|
||||
+#endif
|
||||
int rc;
|
||||
int tpg;
|
||||
|
||||
diff --git a/libmultipath/prioritizers/alua_rtpg.c b/libmultipath/prioritizers/alua_rtpg.c
|
||||
index 0531052..cd9c29d 100644
|
||||
--- a/libmultipath/prioritizers/alua_rtpg.c
|
||||
+++ b/libmultipath/prioritizers/alua_rtpg.c
|
||||
@@ -293,7 +293,11 @@ get_asymmetric_access_state(int fd, unsigned int tpg)
|
||||
"group.\n");
|
||||
} else {
|
||||
PRINT_DEBUG("pref=%i\n", dscr->b0);
|
||||
+#ifdef TPG_PREF
|
||||
+ rc = rtpg_tpg_dscr_get_pref(dscr);
|
||||
+#else
|
||||
rc = rtpg_tpg_dscr_get_aas(dscr);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
diff --git a/libmultipath/prioritizers/alua_spc3.h b/libmultipath/prioritizers/alua_spc3.h
|
||||
index bddbbdd..daf95a6 100644
|
||||
--- a/libmultipath/prioritizers/alua_spc3.h
|
||||
+++ b/libmultipath/prioritizers/alua_spc3.h
|
||||
@@ -302,6 +302,12 @@ rtpg_tpg_dscr_get_aas(struct rtpg_tpg_dscr *d)
|
||||
return (d->b0 & 0x0f);
|
||||
}
|
||||
|
||||
+static inline int
|
||||
+rtpg_tpg_dscr_get_pref(struct rtpg_tpg_dscr *d)
|
||||
+{
|
||||
+ return ((d->b0 & 0x80)?AAS_OPTIMIZED:AAS_STANDBY);
|
||||
+}
|
||||
+
|
||||
struct rtpg_data {
|
||||
unsigned char length[4]; /* size-4 */
|
||||
struct rtpg_tpg_dscr data[0];
|
||||
--
|
||||
1.6.5.1
|
||||
|
@ -1,7 +1,24 @@
|
||||
Index: multipath-tools-090724/libmultipath/checkers/tur.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/checkers/tur.c
|
||||
+++ multipath-tools-090724/libmultipath/checkers/tur.c
|
||||
From f9ddbc18b7580f75c15bf6f3e10f08d6f016caca Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 08:18:00 +0200
|
||||
Subject: [PATCH 02/12] RH: path checker
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 e06dc52... 47107a2... M libmultipath/checkers/tur.c
|
||||
:100644 100644 98d1618... 00aa5ea... M libmultipath/discovery.c
|
||||
:100644 100644 7283f36... 17cd4af... M libmultipath/discovery.h
|
||||
:100644 100644 90de6df... 5d3625a... M multipathd/main.c
|
||||
libmultipath/checkers/tur.c | 1 -
|
||||
libmultipath/discovery.c | 62 +++++++++++++++++++++++++++++++++---------
|
||||
libmultipath/discovery.h | 2 +
|
||||
multipathd/main.c | 21 +-------------
|
||||
4 files changed, 52 insertions(+), 34 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/checkers/tur.c b/libmultipath/checkers/tur.c
|
||||
index e06dc52..47107a2 100644
|
||||
--- a/libmultipath/checkers/tur.c
|
||||
+++ b/libmultipath/checkers/tur.c
|
||||
@@ -69,7 +69,6 @@ libcheck_check (struct checker * c)
|
||||
case DID_NO_CONNECT:
|
||||
case DID_BAD_TARGET:
|
||||
@ -10,11 +27,11 @@ Index: multipath-tools-090724/libmultipath/checkers/tur.c
|
||||
case DID_TRANSPORT_FAILFAST:
|
||||
break;
|
||||
default:
|
||||
Index: multipath-tools-090724/libmultipath/discovery.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/discovery.c
|
||||
+++ multipath-tools-090724/libmultipath/discovery.c
|
||||
@@ -579,10 +579,9 @@ struct sysfs_device *sysfs_device_from_p
|
||||
diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c
|
||||
index 98d1618..00aa5ea 100644
|
||||
--- a/libmultipath/discovery.c
|
||||
+++ b/libmultipath/discovery.c
|
||||
@@ -579,10 +579,9 @@ struct sysfs_device *sysfs_device_from_path(struct path *pp)
|
||||
}
|
||||
|
||||
int
|
||||
@ -65,7 +82,7 @@ Index: multipath-tools-090724/libmultipath/discovery.c
|
||||
extern int
|
||||
sysfs_pathinfo(struct path * pp)
|
||||
{
|
||||
@@ -699,36 +723,43 @@ cciss_ioctl_pathinfo (struct path * pp,
|
||||
@@ -699,36 +723,43 @@ cciss_ioctl_pathinfo (struct path * pp, int mask)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -100,15 +117,15 @@ Index: multipath-tools-090724/libmultipath/discovery.c
|
||||
- pp->state = PATH_DOWN;
|
||||
- return 0;
|
||||
+ return PATH_DOWN;
|
||||
}
|
||||
- pp->state = checker_check(c);
|
||||
- condlog(3, "%s: state = %i", pp->dev, pp->state);
|
||||
- if (pp->state == PATH_DOWN && strlen(checker_message(c)))
|
||||
+ }
|
||||
+ if (daemon) {
|
||||
+ if (path_blocked(pp))
|
||||
+ return PATH_PENDING;
|
||||
+ checker_set_async(c);
|
||||
+ }
|
||||
}
|
||||
- pp->state = checker_check(c);
|
||||
- condlog(3, "%s: state = %i", pp->dev, pp->state);
|
||||
- if (pp->state == PATH_DOWN && strlen(checker_message(c)))
|
||||
+ state = checker_check(c);
|
||||
+ condlog(3, "%s: state = %i", pp->dev, state);
|
||||
+ if (state == PATH_DOWN && strlen(checker_message(c)))
|
||||
@ -119,7 +136,7 @@ Index: multipath-tools-090724/libmultipath/discovery.c
|
||||
}
|
||||
|
||||
static int
|
||||
@@ -813,8 +844,11 @@ pathinfo (struct path *pp, vector hwtabl
|
||||
@@ -813,8 +844,11 @@ pathinfo (struct path *pp, vector hwtable, int mask)
|
||||
cciss_ioctl_pathinfo(pp, mask))
|
||||
goto blank;
|
||||
|
||||
@ -133,11 +150,11 @@ Index: multipath-tools-090724/libmultipath/discovery.c
|
||||
|
||||
/*
|
||||
* Retrieve path priority, even for PATH_DOWN paths if it has never
|
||||
Index: multipath-tools-090724/libmultipath/discovery.h
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/discovery.h
|
||||
+++ multipath-tools-090724/libmultipath/discovery.h
|
||||
@@ -30,6 +30,8 @@ int path_discovery (vector pathvec, stru
|
||||
diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h
|
||||
index 7283f36..17cd4af 100644
|
||||
--- a/libmultipath/discovery.h
|
||||
+++ b/libmultipath/discovery.h
|
||||
@@ -30,6 +30,8 @@ int path_discovery (vector pathvec, struct config * conf, int flag);
|
||||
int do_tur (char *);
|
||||
int devt2devname (char *, char *);
|
||||
int path_offline (struct path *);
|
||||
@ -146,11 +163,11 @@ Index: multipath-tools-090724/libmultipath/discovery.h
|
||||
int pathinfo (struct path *, vector hwtable, int mask);
|
||||
struct path * store_pathinfo (vector pathvec, vector hwtable,
|
||||
char * devname, int flag);
|
||||
Index: multipath-tools-090724/multipathd/main.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipathd/main.c
|
||||
+++ multipath-tools-090724/multipathd/main.c
|
||||
@@ -908,26 +908,9 @@ check_path (struct vectors * vecs, struc
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 90de6df..5d3625a 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -908,26 +908,9 @@ check_path (struct vectors * vecs, struct path * pp)
|
||||
*/
|
||||
pp->tick = conf->checkint;
|
||||
|
||||
@ -179,3 +196,6 @@ Index: multipath-tools-090724/multipathd/main.c
|
||||
condlog(2, "%s: unusable path", pp->dev);
|
||||
pathinfo(pp, conf->hwtable, 0);
|
||||
return;
|
||||
--
|
||||
1.6.5.1
|
||||
|
@ -1,7 +1,18 @@
|
||||
Index: multipath-tools-090724/multipathd/multipathd.init.redhat
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipathd/multipathd.init.redhat
|
||||
+++ multipath-tools-090724/multipathd/multipathd.init.redhat
|
||||
From e6a23cc9de85a66d774567515592bdbdba7b2ca4 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 08:19:01 +0200
|
||||
Subject: [PATCH 03/12] RH: root init script
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 ee776f0... e46b1b8... M multipathd/multipathd.init.redhat
|
||||
multipathd/multipathd.init.redhat | 38 ++++++++++++++++++++++++++++++++++++-
|
||||
1 files changed, 37 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/multipathd/multipathd.init.redhat b/multipathd/multipathd.init.redhat
|
||||
index ee776f0..e46b1b8 100644
|
||||
--- a/multipathd/multipathd.init.redhat
|
||||
+++ b/multipathd/multipathd.init.redhat
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# multipathd Starts the multipath daemon
|
||||
@ -19,7 +30,7 @@ Index: multipath-tools-090724/multipathd/multipathd.init.redhat
|
||||
|
||||
|
||||
. $initdir/functions
|
||||
@@ -25,6 +26,36 @@ test -r $sysconfig/$prog && . $sysconfig
|
||||
@@ -25,6 +26,36 @@ test -r $sysconfig/$prog && . $sysconfig/$prog
|
||||
|
||||
RETVAL=0
|
||||
|
||||
@ -68,3 +79,6 @@ Index: multipath-tools-090724/multipathd/multipathd.init.redhat
|
||||
echo -n $"Stopping $prog daemon: "
|
||||
killproc $DAEMON
|
||||
RETVAL=$?
|
||||
--
|
||||
1.6.5.1
|
||||
|
48
0004-RH-fix-kpartx.patch
Normal file
48
0004-RH-fix-kpartx.patch
Normal file
@ -0,0 +1,48 @@
|
||||
From 8d443fe2c58e22166426438e6f6d5757934f7b31 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 08:23:42 +0200
|
||||
Subject: [PATCH 04/12] RH: fix kpartx
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 b61a81f... 103ed0a... M kpartx/kpartx.c
|
||||
kpartx/kpartx.c | 6 ++++--
|
||||
1 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
|
||||
index b61a81f..103ed0a 100644
|
||||
--- a/kpartx/kpartx.c
|
||||
+++ b/kpartx/kpartx.c
|
||||
@@ -488,6 +488,7 @@ main(int argc, char **argv){
|
||||
d = c;
|
||||
while (c) {
|
||||
for (j = 0; j < n; j++) {
|
||||
+ uint64_t start;
|
||||
int k = slices[j].container - 1;
|
||||
|
||||
if (slices[j].size == 0)
|
||||
@@ -498,7 +499,7 @@ main(int argc, char **argv){
|
||||
continue;
|
||||
|
||||
/* Skip all simple slices */
|
||||
- if (k < 0)
|
||||
+ if (slices[j].container == 0)
|
||||
continue;
|
||||
|
||||
/* Check container slice */
|
||||
@@ -513,10 +514,11 @@ main(int argc, char **argv){
|
||||
}
|
||||
strip_slash(partname);
|
||||
|
||||
+ start = slices[j].start - slices[k].start;
|
||||
if (safe_sprintf(params, "%d:%d %" PRIu64,
|
||||
slices[k].major,
|
||||
slices[k].minor,
|
||||
- slices[j].start)) {
|
||||
+ start)) {
|
||||
fprintf(stderr, "params too small\n");
|
||||
exit(1);
|
||||
}
|
||||
--
|
||||
1.6.5.1
|
||||
|
@ -1,13 +1,90 @@
|
||||
---
|
||||
Makefile | 3 -
|
||||
cciss_id/Makefile | 47 +++++++++++++++++++
|
||||
cciss_id/cciss_id.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 177 insertions(+), 1 deletion(-)
|
||||
From a3db7def912c2fd3756cfd99c1165db075281caa Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 09:26:02 +0200
|
||||
Subject: [PATCH 05/12] RH: cciss_id
|
||||
|
||||
Index: multipath-tools-090724/cciss_id/cciss_id.c
|
||||
===================================================================
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 54be0a5... 7e4b7b1... M Makefile
|
||||
:000000 100644 0000000... 6db12a4... A cciss_id/Makefile
|
||||
:000000 100644 0000000... 091b5fe... A cciss_id/cciss_id.c
|
||||
Makefile | 3 +-
|
||||
cciss_id/Makefile | 47 +++++++++++++++++++
|
||||
cciss_id/cciss_id.c | 128 +++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
3 files changed, 177 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 54be0a5..7e4b7b1 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -25,7 +25,8 @@ BUILDDIRS = \
|
||||
libmultipath/checkers \
|
||||
multipath \
|
||||
multipathd \
|
||||
- kpartx
|
||||
+ kpartx \
|
||||
+ cciss_id
|
||||
|
||||
ifeq ($(MULTIPATH_VERSION),)
|
||||
VERSION = $(shell basename ${PWD} | cut -d'-' -f3)
|
||||
diff --git a/cciss_id/Makefile b/cciss_id/Makefile
|
||||
new file mode 100644
|
||||
index 0000000..6db12a4
|
||||
--- /dev/null
|
||||
+++ multipath-tools-090724/cciss_id/cciss_id.c
|
||||
+++ b/cciss_id/Makefile
|
||||
@@ -0,0 +1,47 @@
|
||||
+
|
||||
+# *****************************************************************************
|
||||
+# * *
|
||||
+# * (C) Copyright 2007 Hewlett-Packard Development Company, L.P *
|
||||
+# * *
|
||||
+# * This program is free software; you can redistribute it and/or modify it *
|
||||
+# * under the terms of the GNU General Public License as published by the Free*
|
||||
+# * Software Foundation; either version 2 of the License, or (at your option)*
|
||||
+# * any later version. *
|
||||
+# * *
|
||||
+# * This program is distributed in the hope that it will be useful, but *
|
||||
+# * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY*
|
||||
+# * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
|
||||
+# * for more details. *
|
||||
+# * *
|
||||
+# * You should have received a copy of the GNU General Public License along *
|
||||
+# * with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
+# * 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
+# * *
|
||||
+# * *
|
||||
+# * *
|
||||
+# * *
|
||||
+# *****************************************************************************
|
||||
+
|
||||
+include ../Makefile.inc
|
||||
+
|
||||
+OBJS = cciss_id.o
|
||||
+CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
|
||||
+
|
||||
+LDFLAGS = -ldevmapper
|
||||
+
|
||||
+EXEC = cciss_id
|
||||
+
|
||||
+all: $(EXEC)
|
||||
+
|
||||
+$(EXEC): $(OBJS)
|
||||
+ $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
|
||||
+
|
||||
+install:
|
||||
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
||||
+
|
||||
+uninstall:
|
||||
+ rm $(DESTDIR)$(bindir)/$(EXEC)
|
||||
+
|
||||
+clean:
|
||||
+ rm -f core.* *.o $(EXEC) *.gz
|
||||
diff --git a/cciss_id/cciss_id.c b/cciss_id/cciss_id.c
|
||||
new file mode 100644
|
||||
index 0000000..091b5fe
|
||||
--- /dev/null
|
||||
+++ b/cciss_id/cciss_id.c
|
||||
@@ -0,0 +1,128 @@
|
||||
+/*
|
||||
+ *****************************************************************************
|
||||
@ -137,69 +214,6 @@ Index: multipath-tools-090724/cciss_id/cciss_id.c
|
||||
+ close(fd);
|
||||
+ return 0;
|
||||
+}
|
||||
Index: multipath-tools-090724/cciss_id/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ multipath-tools-090724/cciss_id/Makefile
|
||||
@@ -0,0 +1,47 @@
|
||||
+
|
||||
+# *****************************************************************************
|
||||
+# * *
|
||||
+# * (C) Copyright 2007 Hewlett-Packard Development Company, L.P *
|
||||
+# * *
|
||||
+# * This program is free software; you can redistribute it and/or modify it *
|
||||
+# * under the terms of the GNU General Public License as published by the Free*
|
||||
+# * Software Foundation; either version 2 of the License, or (at your option)*
|
||||
+# * any later version. *
|
||||
+# * *
|
||||
+# * This program is distributed in the hope that it will be useful, but *
|
||||
+# * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY*
|
||||
+# * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
|
||||
+# * for more details. *
|
||||
+# * *
|
||||
+# * You should have received a copy of the GNU General Public License along *
|
||||
+# * with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
+# * 675 Mass Ave, Cambridge, MA 02139, USA. *
|
||||
+# * *
|
||||
+# * *
|
||||
+# * *
|
||||
+# * *
|
||||
+# *****************************************************************************
|
||||
+
|
||||
+include ../Makefile.inc
|
||||
+
|
||||
+OBJS = cciss_id.o
|
||||
+CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
|
||||
+
|
||||
+LDFLAGS = -ldevmapper
|
||||
+
|
||||
+EXEC = cciss_id
|
||||
+
|
||||
+all: $(EXEC)
|
||||
+
|
||||
+$(EXEC): $(OBJS)
|
||||
+ $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS)
|
||||
+
|
||||
+install:
|
||||
+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
+ $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
||||
+
|
||||
+uninstall:
|
||||
+ rm $(DESTDIR)$(bindir)/$(EXEC)
|
||||
+
|
||||
+clean:
|
||||
+ rm -f core.* *.o $(EXEC) *.gz
|
||||
Index: multipath-tools-090724/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/Makefile
|
||||
+++ multipath-tools-090724/Makefile
|
||||
@@ -25,7 +25,8 @@ BUILDDIRS = \
|
||||
libmultipath/checkers \
|
||||
multipath \
|
||||
multipathd \
|
||||
- kpartx
|
||||
+ kpartx \
|
||||
+ cciss_id
|
||||
|
||||
ifeq ($(MULTIPATH_VERSION),)
|
||||
VERSION = $(shell basename ${PWD} | cut -d'-' -f3)
|
||||
--
|
||||
1.6.5.1
|
||||
|
56
0006-RH-move-bindings.patch
Normal file
56
0006-RH-move-bindings.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From ff4c0c9ccbf8abe4a67c2a6cceef07bda9d38d7d Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 09:26:25 +0200
|
||||
Subject: [PATCH 06/12] RH: move bindings
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 84e5d6b... 5a38d25... M libmultipath/defaults.h
|
||||
:100644 100644 9afa615... 7b6453f... M multipath.conf.annotated
|
||||
:100644 100644 a165e4e... 4340e51... M multipath/multipath.conf.5
|
||||
libmultipath/defaults.h | 2 +-
|
||||
multipath.conf.annotated | 2 +-
|
||||
multipath/multipath.conf.5 | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h
|
||||
index 84e5d6b..5a38d25 100644
|
||||
--- a/libmultipath/defaults.h
|
||||
+++ b/libmultipath/defaults.h
|
||||
@@ -19,6 +19,6 @@
|
||||
#define DEFAULT_PIDFILE "/var/run/multipathd.pid"
|
||||
#define DEFAULT_SOCKET "/var/run/multipathd.sock"
|
||||
#define DEFAULT_CONFIGFILE "/etc/multipath.conf"
|
||||
-#define DEFAULT_BINDINGS_FILE "/var/lib/multipath/bindings"
|
||||
+#define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings"
|
||||
|
||||
char * set_default (char * str);
|
||||
diff --git a/multipath.conf.annotated b/multipath.conf.annotated
|
||||
index 9afa615..7b6453f 100644
|
||||
--- a/multipath.conf.annotated
|
||||
+++ b/multipath.conf.annotated
|
||||
@@ -165,7 +165,7 @@
|
||||
# # name : user_friendly_names
|
||||
# # scope : multipath
|
||||
# # desc : If set to "yes", using the bindings file
|
||||
-# # /var/lib/multipath/bindings to assign a persistent and
|
||||
+# # /etc/multipath/bindings to assign a persistent and
|
||||
# # unique alias to the multipath, in the form of mpath<n>.
|
||||
# # If set to "no" use the WWID as the alias. In either case
|
||||
# # this be will be overriden by any specific aliases in this
|
||||
diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5
|
||||
index a165e4e..4340e51 100644
|
||||
--- a/multipath/multipath.conf.5
|
||||
+++ b/multipath/multipath.conf.5
|
||||
@@ -224,7 +224,7 @@ for never stop queueing. Default is 0.
|
||||
If set to
|
||||
.I yes
|
||||
, using the bindings file
|
||||
-.I /var/lib/multipath/bindings
|
||||
+.I /etc/multipath/bindings
|
||||
to assign a persistent and unique alias to the multipath, in the form of mpath<n>.
|
||||
If set to
|
||||
.I no
|
||||
--
|
||||
1.6.5.1
|
||||
|
39
0007-RH-do-not-remove.patch
Normal file
39
0007-RH-do-not-remove.patch
Normal file
@ -0,0 +1,39 @@
|
||||
From b3519ef2eda768672d47c61f0acf8c87d74db427 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 13 Oct 2009 09:33:59 +0200
|
||||
Subject: [PATCH 07/12] RH: do not remove
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 5d3625a... 244b8d5... M multipathd/main.c
|
||||
multipathd/main.c | 13 ++++++++++++-
|
||||
1 files changed, 12 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/multipathd/main.c b/multipathd/main.c
|
||||
index 5d3625a..244b8d5 100644
|
||||
--- a/multipathd/main.c
|
||||
+++ b/multipathd/main.c
|
||||
@@ -290,8 +290,19 @@ ev_add_map (struct sysfs_device * dev, struct vectors * vecs)
|
||||
static int
|
||||
uev_remove_map (struct sysfs_device * dev, struct vectors * vecs)
|
||||
{
|
||||
+ struct multipath * mpp;
|
||||
+
|
||||
condlog(2, "%s: remove map (uevent)", dev->kernel);
|
||||
- return ev_remove_map(dev->kernel, vecs);
|
||||
+
|
||||
+ mpp = find_mp_by_str(vecs->mpvec, dev->kernel);
|
||||
+ if (!mpp) {
|
||||
+ condlog(2, "%s: devmap not registered, can't remove",
|
||||
+ dev->kernel);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ orphan_paths(vecs->pathvec, mpp);
|
||||
+ remove_map_and_stop_waiter(mpp, vecs, 1);
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int
|
||||
--
|
||||
1.6.5.1
|
||||
|
62
0008-RH-Make-build-system-RH-Fedora-friendly.patch
Normal file
62
0008-RH-Make-build-system-RH-Fedora-friendly.patch
Normal file
@ -0,0 +1,62 @@
|
||||
From f5e11246063b07d6dce6d37d3b74662475baa981 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Thu, 15 Oct 2009 04:39:27 +0200
|
||||
Subject: [PATCH 08/12] RH: Make build system RH/Fedora friendly
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 7ec25d5... 06fb625... M Makefile.inc
|
||||
:100644 100644 21e4ad4... 06d79c0... M kpartx/Makefile
|
||||
:100644 100644 32d9ef5... 25e1483... M multipathd/Makefile
|
||||
Makefile.inc | 2 +-
|
||||
kpartx/Makefile | 8 ++++----
|
||||
multipathd/Makefile | 1 +
|
||||
3 files changed, 6 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Makefile.inc b/Makefile.inc
|
||||
index 7ec25d5..06fb625 100644
|
||||
--- a/Makefile.inc
|
||||
+++ b/Makefile.inc
|
||||
@@ -28,7 +28,7 @@ libudevdir = ${prefix}/lib/udev
|
||||
multipathdir = $(TOPDIR)/libmultipath
|
||||
mandir = $(prefix)/usr/share/man/man8
|
||||
man5dir = $(prefix)/usr/share/man/man5
|
||||
-rcdir = $(prefix)/etc/init.d
|
||||
+rcdir = $(prefix)/etc/rc.d/init.d
|
||||
syslibdir = $(prefix)/$(LIB)
|
||||
libdir = $(prefix)/$(LIB)/multipath
|
||||
|
||||
diff --git a/kpartx/Makefile b/kpartx/Makefile
|
||||
index 21e4ad4..06d79c0 100644
|
||||
--- a/kpartx/Makefile
|
||||
+++ b/kpartx/Makefile
|
||||
@@ -20,10 +20,10 @@ $(EXEC): $(OBJS)
|
||||
install: $(EXEC) $(EXEC).8
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
|
||||
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
|
||||
- $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
|
||||
- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
+# $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
|
||||
+# $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
|
||||
+# $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
+# $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
|
||||
diff --git a/multipathd/Makefile b/multipathd/Makefile
|
||||
index 32d9ef5..25e1483 100644
|
||||
--- a/multipathd/Makefile
|
||||
+++ b/multipathd/Makefile
|
||||
@@ -35,6 +35,7 @@ install:
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
|
||||
+ $(INSTALL_PROGRAM) -m 755 multipathd.init.redhat $(DESTDIR)$(rcdir)/$(EXEC)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
|
||||
--
|
||||
1.6.5.1
|
||||
|
70
0009-RH-multipathd-blacklist-all-by-default.patch
Normal file
70
0009-RH-multipathd-blacklist-all-by-default.patch
Normal file
@ -0,0 +1,70 @@
|
||||
From 61b2002c6b2752c15b431e400cd614edc8c5b039 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Mon, 19 Oct 2009 07:05:45 +0200
|
||||
Subject: [PATCH 09/12] RH: multipathd blacklist all by default
|
||||
|
||||
If there is no configuration installed on the system, blacklist
|
||||
everything by default.
|
||||
|
||||
BZ#528059
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 e7e962e... 5aa1ab0... M libmultipath/config.c
|
||||
:100644 100644 86b1320... 7e90e75... M libmultipath/config.h
|
||||
libmultipath/config.c | 18 +++++++++++++++++-
|
||||
libmultipath/config.h | 1 +
|
||||
2 files changed, 18 insertions(+), 1 deletions(-)
|
||||
|
||||
diff --git a/libmultipath/config.c b/libmultipath/config.c
|
||||
index e7e962e..5aa1ab0 100644
|
||||
--- a/libmultipath/config.c
|
||||
+++ b/libmultipath/config.c
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "blacklist.h"
|
||||
#include "defaults.h"
|
||||
#include "prio.h"
|
||||
+#include "version.h"
|
||||
|
||||
static int
|
||||
hwe_strmatch (struct hwentry *hwe1, struct hwentry *hwe2)
|
||||
@@ -463,8 +464,23 @@ load_config (char * file)
|
||||
condlog(0, "error parsing config file");
|
||||
goto out;
|
||||
}
|
||||
+ } else {
|
||||
+ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices.");
|
||||
+ condlog(0, "A default multipath.conf file is located at");
|
||||
+ condlog(0,
|
||||
+"/usr/share/doc/device-mapper-multipath-%d.%d.%d/multipath.conf",
|
||||
+ MULTIPATH_VERSION(VERSION_CODE));
|
||||
+ conf->blist_devnode = vector_alloc();
|
||||
+ if (!conf->blist_devnode) {
|
||||
+ condlog(0, "cannot allocate blacklist\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (store_ble(conf->blist_devnode, strdup(".*"),
|
||||
+ ORIGIN_NO_CONFIG)) {
|
||||
+ condlog(0, "cannot store default no-config blacklist\n");
|
||||
+ goto out;
|
||||
+ }
|
||||
}
|
||||
-
|
||||
/*
|
||||
* remove duplica in hwtable. config file takes precedence
|
||||
* over build-in hwtable
|
||||
diff --git a/libmultipath/config.h b/libmultipath/config.h
|
||||
index 86b1320..7e90e75 100644
|
||||
--- a/libmultipath/config.h
|
||||
+++ b/libmultipath/config.h
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
#define ORIGIN_DEFAULT 0
|
||||
#define ORIGIN_CONFIG 1
|
||||
+#define ORIGIN_NO_CONFIG 2
|
||||
|
||||
enum devtypes {
|
||||
DEV_NONE,
|
||||
--
|
||||
1.6.5.1
|
||||
|
37
0010-RH-multipath-rules-udev-changes.patch
Normal file
37
0010-RH-multipath-rules-udev-changes.patch
Normal file
@ -0,0 +1,37 @@
|
||||
From 5a43356b54c2672441ce67cd9602904a5df04117 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Mon, 19 Oct 2009 07:07:01 +0200
|
||||
Subject: [PATCH 10/12] RH: multipath rules + udev changes
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 ac97749... 064196d... M multipath/multipath.rules
|
||||
multipath/multipath.rules | 18 +++++++++++-------
|
||||
1 files changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/multipath/multipath.rules b/multipath/multipath.rules
|
||||
index ac97749..064196d 100644
|
||||
--- a/multipath/multipath.rules
|
||||
+++ b/multipath/multipath.rules
|
||||
@@ -1,7 +1,11 @@
|
||||
-#
|
||||
-# udev rules for multipathing.
|
||||
-# The persistent symlinks are created with the kpartx rules
|
||||
-#
|
||||
-
|
||||
-# socket for uevents
|
||||
-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
|
||||
+# multipath wants the devmaps presented as meaninglful device names
|
||||
+# so name them after their devmap name
|
||||
+SUBSYSTEM!="block", GOTO="end_mpath"
|
||||
+RUN+="socket:/org/kernel/dm/multipath_event"
|
||||
+KERNEL!="dm-*", GOTO="end_mpath"
|
||||
+ACTION!="change", GOTO="end_mpath"
|
||||
+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
|
||||
+ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
|
||||
+ENV{DM_ACTION}=="PATH_FAILED", GOTO="end_mpath"
|
||||
+RUN+="/sbin/kpartx -a -p p $tempnode"
|
||||
+LABEL="end_mpath"
|
||||
--
|
||||
1.6.5.1
|
||||
|
29
0011-RH-fix-init-script-LSB-headers.patch
Normal file
29
0011-RH-fix-init-script-LSB-headers.patch
Normal file
@ -0,0 +1,29 @@
|
||||
From 887b0721d29eed45621b5a7fefaf462378cc9dcd Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Mon, 19 Oct 2009 08:33:07 +0200
|
||||
Subject: [PATCH 11/12] RH: fix init script LSB headers
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 e46b1b8... cfc9cf5... M multipathd/multipathd.init.redhat
|
||||
multipathd/multipathd.init.redhat | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/multipathd/multipathd.init.redhat b/multipathd/multipathd.init.redhat
|
||||
index e46b1b8..cfc9cf5 100644
|
||||
--- a/multipathd/multipathd.init.redhat
|
||||
+++ b/multipathd/multipathd.init.redhat
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: multipathd
|
||||
+# Required-Start:
|
||||
+# Required-Stop:
|
||||
+# Default-Start:
|
||||
+# Default-Stop:
|
||||
# Short-Description: Control multipathd
|
||||
# Description: This service monitors and manages
|
||||
# device-mapper multipath devices
|
||||
--
|
||||
1.6.5.1
|
||||
|
@ -0,0 +1,29 @@
|
||||
From c104e104645fcf271956e174eca9ccbf0e443014 Mon Sep 17 00:00:00 2001
|
||||
From: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
Date: Tue, 20 Oct 2009 15:17:13 +0200
|
||||
Subject: [PATCH 12/12] RH: explicitly disable dm udev sync support in kpartx
|
||||
|
||||
Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
|
||||
---
|
||||
:100644 100644 103ed0a... 9619edb... M kpartx/kpartx.c
|
||||
kpartx/kpartx.c | 4 ++++
|
||||
1 files changed, 4 insertions(+), 0 deletions(-)
|
||||
|
||||
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
|
||||
index 103ed0a..9619edb 100644
|
||||
--- a/kpartx/kpartx.c
|
||||
+++ b/kpartx/kpartx.c
|
||||
@@ -256,6 +256,10 @@ main(int argc, char **argv){
|
||||
exit(1);
|
||||
}
|
||||
|
||||
+#ifdef DM_COOKIE_MAGIC
|
||||
+ dm_udev_set_sync_support(0);
|
||||
+#endif
|
||||
+
|
||||
if (dm_prereq(DM_TARGET, 0, 0, 0) && (what == ADD || what == DELETE)) {
|
||||
fprintf(stderr, "device mapper prerequisites not met\n");
|
||||
exit(1);
|
||||
--
|
||||
1.6.5.1
|
||||
|
@ -1,172 +0,0 @@
|
||||
Add the ability to change the location of the user_friendly_names
|
||||
binding file.
|
||||
|
||||
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
||||
---
|
||||
libmultipath/config.c | 11 ++++++++---
|
||||
libmultipath/dict.c | 24 ++++++++++++++++++++++++
|
||||
multipath.conf.annotated | 9 +++++++++
|
||||
multipath.conf.defaults | 1 +
|
||||
multipath/main.c | 4 +++-
|
||||
multipath/multipath.conf.5 | 8 ++++++--
|
||||
6 files changed, 51 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: multipath-tools-090513/libmultipath/config.c
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/libmultipath/config.c
|
||||
+++ multipath-tools-090513/libmultipath/config.c
|
||||
@@ -405,6 +405,9 @@ free_config (struct config * conf)
|
||||
if (conf->checker_name)
|
||||
FREE(conf->checker_name);
|
||||
|
||||
+ if (conf->bindings_file)
|
||||
+ FREE(conf->bindings_file);
|
||||
+
|
||||
free_blacklist(conf->blist_devnode);
|
||||
free_blacklist(conf->blist_wwid);
|
||||
free_blacklist_device(conf->blist_device);
|
||||
@@ -437,7 +440,6 @@ load_config (char * file)
|
||||
conf->dev_type = DEV_NONE;
|
||||
conf->minio = 1000;
|
||||
conf->max_fds = 0;
|
||||
- conf->bindings_file = DEFAULT_BINDINGS_FILE;
|
||||
conf->multipath_dir = set_default(DEFAULT_MULTIPATHDIR);
|
||||
conf->flush_on_last_del = 0;
|
||||
conf->attribute_flags = 0;
|
||||
@@ -535,9 +537,12 @@ load_config (char * file)
|
||||
if (conf->hwhandler == NULL)
|
||||
conf->hwhandler = set_default(DEFAULT_HWHANDLER);
|
||||
|
||||
+ if (conf->bindings_file == NULL)
|
||||
+ conf->bindings_file = set_default(DEFAULT_BINDINGS_FILE);
|
||||
+
|
||||
if (!conf->selector || !conf->udev_dir || !conf->multipath_dir ||
|
||||
- !conf->getuid || !conf->features ||
|
||||
- !conf->hwhandler)
|
||||
+ !conf->getuid || !conf->features || !conf->hwhandler ||
|
||||
+ !conf->bindings_file)
|
||||
goto out;
|
||||
|
||||
if (!conf->prio_name)
|
||||
Index: multipath-tools-090513/libmultipath/dict.c
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/libmultipath/dict.c
|
||||
+++ multipath-tools-090513/libmultipath/dict.c
|
||||
@@ -423,6 +423,17 @@ names_handler(vector strvec)
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static int
|
||||
+def_bindings_file_handler(vector strvec)
|
||||
+{
|
||||
+ conf->bindings_file = set_value(strvec);
|
||||
+
|
||||
+ if (!conf->bindings_file)
|
||||
+ return 1;
|
||||
+
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* blacklist block handlers
|
||||
*/
|
||||
@@ -1920,6 +1931,18 @@ snprint_def_user_friendly_names (char *
|
||||
}
|
||||
|
||||
static int
|
||||
+snprint_def_bindings_file(char * buff, int len, void * data)
|
||||
+{
|
||||
+ if (conf->bindings_file == NULL)
|
||||
+ return 0;
|
||||
+ if (strlen(conf->bindings_file) == strlen(DEFAULT_BINDINGS_FILE) &&
|
||||
+ !strcmp(conf->bindings_file, DEFAULT_BINDINGS_FILE))
|
||||
+ return 0;
|
||||
+
|
||||
+ return snprintf(buff, len, "%s", conf->bindings_file);
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
snprint_ble_simple (char * buff, int len, void * data)
|
||||
{
|
||||
struct blentry * ble = (struct blentry *)data;
|
||||
@@ -1969,6 +1992,7 @@ init_keywords(void)
|
||||
install_keyword("pg_timeout", &def_pg_timeout_handler, &snprint_def_pg_timeout);
|
||||
install_keyword("flush_on_last_del", &def_flush_on_last_del_handler, &snprint_def_flush_on_last_del);
|
||||
install_keyword("user_friendly_names", &names_handler, &snprint_def_user_friendly_names);
|
||||
+ install_keyword("bindings_file", &def_bindings_file_handler, &snprint_def_bindings_file);
|
||||
install_keyword("mode", &def_mode_handler, &snprint_def_mode);
|
||||
install_keyword("uid", &def_uid_handler, &snprint_def_uid);
|
||||
install_keyword("gid", &def_gid_handler, &snprint_def_gid);
|
||||
Index: multipath-tools-090513/multipath.conf.annotated
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/multipath.conf.annotated
|
||||
+++ multipath-tools-090513/multipath.conf.annotated
|
||||
@@ -198,6 +198,15 @@
|
||||
# # default : determined by the process
|
||||
# gid disk
|
||||
#
|
||||
+# #
|
||||
+# # name : bindings_file
|
||||
+# # scope : multipath
|
||||
+# # desc : The location of the bindings file that is used with
|
||||
+# the user_friendly_names option
|
||||
+# # values : <full_pathname>
|
||||
+# # default : "/var/lib/multipath/bindings"
|
||||
+# bindings_file "/etc/multipath_bindings"
|
||||
+#
|
||||
#}
|
||||
#
|
||||
##
|
||||
Index: multipath-tools-090513/multipath.conf.defaults
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/multipath.conf.defaults
|
||||
+++ multipath-tools-090513/multipath.conf.defaults
|
||||
@@ -14,6 +14,7 @@
|
||||
# failback manual
|
||||
# no_path_retry fail
|
||||
# user_friendly_names no
|
||||
+# bindings_file "/var/lib/multipath/bindings"
|
||||
#}
|
||||
#
|
||||
#blacklist {
|
||||
Index: multipath-tools-090513/multipath/main.c
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/multipath/main.c
|
||||
+++ multipath-tools-090513/multipath/main.c
|
||||
@@ -362,7 +362,9 @@ main (int argc, char *argv[])
|
||||
conf->verbosity = atoi(optarg);
|
||||
break;
|
||||
case 'b':
|
||||
- conf->bindings_file = optarg;
|
||||
+ if (conf->bindings_file)
|
||||
+ FREE(conf->bindings_file);
|
||||
+ conf->bindings_file = STRDUP(optarg);
|
||||
break;
|
||||
case 'd':
|
||||
conf->dry_run = 1;
|
||||
Index: multipath-tools-090513/multipath/multipath.conf.5
|
||||
===================================================================
|
||||
--- multipath-tools-090513.orig/multipath/multipath.conf.5
|
||||
+++ multipath-tools-090513/multipath/multipath.conf.5
|
||||
@@ -221,8 +221,7 @@ for never stop queueing. Default is 0.
|
||||
.B user_friendly_names
|
||||
If set to
|
||||
.I yes
|
||||
-, using the bindings file
|
||||
-.I /var/lib/multipath/bindings
|
||||
+, using the bindings file (by default \fI/var/lib/multipath/bindings\fR)
|
||||
to assign a persistent and unique alias to the multipath, in the form of mpath<n>.
|
||||
If set to
|
||||
.I no
|
||||
@@ -231,6 +230,11 @@ be overriden by any specific aliases in
|
||||
Default is
|
||||
.I no
|
||||
.TP
|
||||
+.B bindings_file
|
||||
+Specify the location of the bindings file used by the user_friendly_names
|
||||
+option. Default is
|
||||
+.I /var/lib/multipath/bindings
|
||||
+.TP
|
||||
.B max_fds
|
||||
Specify the maximum number of file descriptors that can be opened by multipath
|
||||
and multipathd. This is equivalent to ulimit -n. A value of \fImax\fR will set
|
@ -1,85 +1,85 @@
|
||||
Summary: Tools to manage multipath devices using device-mapper
|
||||
Name: device-mapper-multipath
|
||||
Version: 0.4.9
|
||||
Release: 5%{?dist}
|
||||
Release: 10%{?dist}
|
||||
License: GPL+
|
||||
Group: System Environment/Base
|
||||
URL: http://christophe.varoqui.free.fr/
|
||||
|
||||
Source0: multipath-tools-090729.tgz
|
||||
Patch0: fix_missed_uevs.patch
|
||||
Patch1: log_all_messages.patch
|
||||
Patch2: queue_without_daemon.patch
|
||||
Patch3: path_checker.patch
|
||||
Patch4: root_init_script.patch
|
||||
Patch5: uninstall.patch
|
||||
Patch6: select_lib.patch
|
||||
Patch7: directio_message_cleanup.patch
|
||||
Patch8: fix_kpartx.patch
|
||||
Patch9: redhatification.patch
|
||||
Patch10: mpath_wait.patch
|
||||
Patch11: multipath_rules.patch
|
||||
Patch12: cciss_id.patch
|
||||
Patch13: stop_warnings.patch
|
||||
Patch14: move_bindings.patch
|
||||
Patch15: dont_remove.patch
|
||||
Patch16: udev_change.patch
|
||||
Source0: multipath-tools-091027.tar.gz
|
||||
Source1: multipath.conf.redhat
|
||||
# patch that should go upstream
|
||||
Patch1: 0001-for-upstream-add-tpg_pref-prioritizer.patch
|
||||
# local patches
|
||||
Patch1001: 0001-RH-queue-without-daemon.patch
|
||||
Patch1002: 0002-RH-path-checker.patch
|
||||
Patch1003: 0003-RH-root-init-script.patch
|
||||
Patch1004: 0004-RH-fix-kpartx.patch
|
||||
Patch1005: 0005-RH-cciss_id.patch
|
||||
Patch1006: 0006-RH-move-bindings.patch
|
||||
Patch1007: 0007-RH-do-not-remove.patch
|
||||
Patch1008: 0008-RH-Make-build-system-RH-Fedora-friendly.patch
|
||||
Patch1009: 0009-RH-multipathd-blacklist-all-by-default.patch
|
||||
Patch1010: 0010-RH-multipath-rules-udev-changes.patch
|
||||
Patch1011: 0011-RH-fix-init-script-LSB-headers.patch
|
||||
Patch1012: 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
# runtime
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
Requires: kpartx = %{version}-%{release}
|
||||
Requires: device-mapper >= 1.02.02-2
|
||||
Requires: device-mapper >= 1.02.39-1
|
||||
Requires(post): chkconfig
|
||||
Requires(preun): chkconfig
|
||||
Requires(preun): initscripts
|
||||
Requires(postun): initscripts
|
||||
BuildRequires: libaio-devel, device-mapper-devel
|
||||
|
||||
# build/setup
|
||||
BuildRequires: libaio-devel, device-mapper-devel >= 1.02.39-1
|
||||
BuildRequires: libselinux-devel, libsepol-devel
|
||||
BuildRequires: readline-devel, ncurses-devel
|
||||
|
||||
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
|
||||
|
||||
%description
|
||||
%{name} provides tools to manage multipath devices by
|
||||
instructing the device-mapper multipath kernel module what to do.
|
||||
The tools are :
|
||||
* multipath : Scan the system for multipath devices and assemble them.
|
||||
* multipathd : Detects when paths fail and execs multipath to update things.
|
||||
* multipath - Scan the system for multipath devices and assemble them.
|
||||
* multipathd - Detects when paths fail and execs multipath to update things.
|
||||
|
||||
%package libs
|
||||
Summary: %{name} modules and shared library
|
||||
Summary: The %{name} modules and shared library
|
||||
License: GPL+
|
||||
Group: System Environment/Libraries
|
||||
|
||||
%description libs
|
||||
%{name}-libs provides the path checker and prioritizer modules. It also
|
||||
contains the multipath shared library, libmultipath.
|
||||
The %{name}-libs provides the path checker
|
||||
and prioritizer modules. It also contains the multipath shared library,
|
||||
libmultipath.
|
||||
|
||||
%package -n kpartx
|
||||
Summary: Partition device manager for device-mapper devices
|
||||
Group: System Environment/Base
|
||||
Provides: kpartx = %{version}-%{release}
|
||||
|
||||
%description -n kpartx
|
||||
kpartx manages partition creation and removal for device-mapper devices.
|
||||
|
||||
%prep
|
||||
%setup -q -n multipath-tools
|
||||
%patch0 -p1 -b .fix_missed_uevs
|
||||
%patch1 -p1 -b .log_all_messages
|
||||
%patch2 -p1 -b .queue_without_daemon
|
||||
%patch3 -p1 -b .path_checker
|
||||
%patch4 -p1 -b .root_init_script
|
||||
%patch5 -p1 -b .uninstall.patch
|
||||
%patch6 -p1 -b .select_lib
|
||||
%patch7 -p1 -b .directio_message_cleanup
|
||||
%patch8 -p1 -b .fix_kpartx
|
||||
%patch9 -p1 -b .redhatification
|
||||
%patch10 -p1 -b .mpath_wait
|
||||
%patch11 -p1 -b .multipath_rules
|
||||
%patch12 -p1 -b .cciss_id
|
||||
%patch13 -p1 -b .stop_warnings
|
||||
%patch14 -p1 -b .move_bindings
|
||||
%patch15 -p1 -b .dont_remove
|
||||
%patch16 -p1 -b .udev_change
|
||||
%patch1 -p1
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
%patch1004 -p1
|
||||
%patch1005 -p1
|
||||
%patch1006 -p1
|
||||
%patch1007 -p1
|
||||
%patch1008 -p1
|
||||
%patch1009 -p1
|
||||
%patch1010 -p1
|
||||
%patch1011 -p1
|
||||
%patch1012 -p1
|
||||
cp %{SOURCE1} .
|
||||
|
||||
%build
|
||||
%define _sbindir /sbin
|
||||
@ -88,17 +88,25 @@ kpartx manages partition creation and removal for device-mapper devices.
|
||||
make %{?_smp_mflags} LIB=%{_lib}
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
make install DESTDIR=$RPM_BUILD_ROOT bindir=%{_sbindir} syslibdir=%{_libdir} libdir=%{_libmpathdir} rcdir=%{_initrddir}
|
||||
install -m 0644 multipath/multipath.conf.redhat $RPM_BUILD_ROOT/etc/multipath.conf
|
||||
install -m 0755 multipathd/multipathd.init.redhat $RPM_BUILD_ROOT/%{_initrddir}/multipathd
|
||||
install -d $RPM_BUILD_ROOT/etc/multipath
|
||||
rm -rf %{buildroot}
|
||||
|
||||
make install \
|
||||
DESTDIR=%{buildroot} \
|
||||
bindir=%{_sbindir} \
|
||||
syslibdir=%{_libdir} \
|
||||
libdir=%{_libmpathdir} \
|
||||
rcdir=%{_initrddir}
|
||||
|
||||
# tree fix up
|
||||
# install -m 0644 %{SOURCE1} %{buildroot}/etc/multipath.conf
|
||||
install -d %{buildroot}/etc/multipath
|
||||
mv %{buildroot}/etc/udev/rules.d/multipath.rules \
|
||||
%{buildroot}/etc/udev/rules.d/40-multipath.rules
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
rm -rf %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/ldconfig
|
||||
/sbin/chkconfig --add multipathd
|
||||
if [ "$1" -gt "1" -a ! -e /etc/multipath/bindings -a \
|
||||
-f /var/lib/multipath/bindings ]; then
|
||||
@ -106,17 +114,15 @@ if [ "$1" -gt "1" -a ! -e /etc/multipath/bindings -a \
|
||||
ln -s /etc/multipath/bindings /var/lib/multipath/bindings
|
||||
fi
|
||||
|
||||
|
||||
%preun
|
||||
if [ "$1" = 0 ]; then
|
||||
/sbin/service multipathd stop /dev/null 2>&1
|
||||
/sbin/chkconfig --del multipathd
|
||||
/sbin/service multipathd stop /dev/null 2>&1
|
||||
/sbin/chkconfig --del multipathd
|
||||
fi
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service multipathd condrestart >/dev/null 2>&1 || :
|
||||
/sbin/service multipathd condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
@ -124,21 +130,26 @@ fi
|
||||
%{_sbindir}/multipath
|
||||
%{_sbindir}/multipathd
|
||||
%{_sbindir}/cciss_id
|
||||
%{_sbindir}/mpath_wait
|
||||
%{_initrddir}/multipathd
|
||||
%{_mandir}/man5/multipath.conf.5.gz
|
||||
%{_mandir}/man8/multipath.8.gz
|
||||
%{_mandir}/man8/multipathd.8.gz
|
||||
%config /etc/udev/rules.d/40-multipath.rules
|
||||
%config(noreplace) /etc/multipath.conf
|
||||
%doc AUTHOR COPYING README* FAQ multipath.conf.annotated multipath.conf.defaults multipath.conf.synthetic
|
||||
%doc AUTHOR COPYING FAQ
|
||||
%doc multipath.conf.redhat multipath.conf.annotated
|
||||
%doc multipath.conf.defaults multipath.conf.synthetic
|
||||
%dir /etc/multipath
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHOR COPYING
|
||||
%{_libdir}/libmultipath.so
|
||||
%{_libmpathdir}
|
||||
%dir %{_libmpathdir}
|
||||
%{_libmpathdir}/*
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%files -n kpartx
|
||||
%defattr(-,root,root,-)
|
||||
@ -146,7 +157,64 @@ fi
|
||||
%{_mandir}/man8/kpartx.8.gz
|
||||
|
||||
%changelog
|
||||
* Thu Aug 20 2009 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.8-5
|
||||
* Tue Oct 27 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.4.9-10
|
||||
- Updated to latest upstream 0.4.9 code : multipath-tools-091027.tar.gz
|
||||
(git commit id: a946bd4e2a529e5fba9c9547d03d3f91806618a3)
|
||||
- Drop unrequired for-upstream patches.
|
||||
- BuildRequires and Requires new device-mapper version for udev sync support.
|
||||
|
||||
* Tue Oct 20 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.4.9-9
|
||||
- 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch
|
||||
|
||||
* Mon Oct 19 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.4.9-8
|
||||
- Split patches in "for-upstream" and "RH" series.
|
||||
- Replace 0011-RH-multipathd-blacklist-all-by-default.patch with
|
||||
version from Benjamin Marzinski.
|
||||
- Update udev rules 0010-RH-multipath-rules-udev-changes.patch.
|
||||
- rpmlint cleanup:
|
||||
* Drop useless-provides kpartx.
|
||||
* Cleanup tab vs spaces usage.
|
||||
* Summary not capitalized.
|
||||
* Missing docs in libs package.
|
||||
* Fix init script LSB headers.
|
||||
- Drop README* files from doc sections (they are empty).
|
||||
|
||||
* Thu Oct 15 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.4.9-7
|
||||
- Add patch 0010-RH-Set-friendly-defaults.patch:
|
||||
* set rcdir to fedora default.
|
||||
* do not install kpartx udev bits.
|
||||
* install redhat init script.
|
||||
* Cleanup spec file install target.
|
||||
- Add patch 0011-RH-multipathd-blacklist-all-by-default.patch:
|
||||
* Fix BZ#528059
|
||||
* Stop installing default config in /etc and move it to the doc dir.
|
||||
|
||||
* Tue Oct 13 2009 Fabio M. Di Nitto <fdinitto@redhat.com> - 0.4.9-6
|
||||
- Updated to latest upstream 0.4.9 code : multipath-tools-091013.tar.gz
|
||||
(git commit id: aa0a885e1f19359c41b63151bfcface38ccca176)
|
||||
- Drop, now upstream, patches:
|
||||
* fix_missed_uevs.patch.
|
||||
* log_all_messages.patch.
|
||||
* uninstall.patch.
|
||||
* select_lib.patch.
|
||||
* directio_message_cleanup.patch.
|
||||
* stop_warnings.patch.
|
||||
- Drop redhatification.patch in favour of spec file hacks.
|
||||
- Drop mpath_wait.patch: no longer required.
|
||||
- Merge multipath_rules.patch and udev_change.patch.
|
||||
- Rename all patches based on source.
|
||||
- Add patch 0009-RH-fix-hp-sw-hardware-table-entries.patch to fix
|
||||
default entry for hp_sw and match current kernel.
|
||||
- Add multipath.conf.redhat as source instead of patch.
|
||||
- spec file:
|
||||
* divide runtime and build/setup bits.
|
||||
* update BuildRoot.
|
||||
* update install section to apply all the little hacks here and there,
|
||||
in favour of patches against upstream.
|
||||
* move ldconfig invokation to libs package where it belong.
|
||||
* fix libs package directory ownership and files.
|
||||
|
||||
* Thu Aug 20 2009 Benjamin Marzinski <bmarzins@redhat.com> - 0.4.9-5
|
||||
- Fixed problem where maps were being added and then removed.
|
||||
- Changed the udev rules to fix some issues.
|
||||
|
||||
|
@ -1,17 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/checkers/directio.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/checkers/directio.c
|
||||
+++ multipath-tools-090724/libmultipath/checkers/directio.c
|
||||
@@ -148,10 +148,11 @@ check_state(int fd, struct directio_cont
|
||||
}
|
||||
ct->running++;
|
||||
|
||||
+ errno = 0;
|
||||
r = io_getevents(ct->ioctx, 1L, 1L, &event, &timeout);
|
||||
|
||||
if (r < 0 ) {
|
||||
- LOG(3, "async io getevents returned %li (errno=%s)", r,
|
||||
+ LOG(3, "async io getevents returned %li (%s)", r,
|
||||
strerror(errno));
|
||||
rc = PATH_UNCHECKED;
|
||||
} else if (r < 1L) {
|
@ -1,28 +0,0 @@
|
||||
Index: multipath-tools/multipathd/main.c
|
||||
===================================================================
|
||||
--- multipath-tools.orig/multipathd/main.c
|
||||
+++ multipath-tools/multipathd/main.c
|
||||
@@ -290,8 +290,23 @@ ev_add_map (struct sysfs_device * dev, s
|
||||
static int
|
||||
uev_remove_map (struct sysfs_device * dev, struct vectors * vecs)
|
||||
{
|
||||
+ struct multipath * mpp;
|
||||
+
|
||||
condlog(2, "%s: remove map (uevent)", dev->kernel);
|
||||
+#if 0
|
||||
return ev_remove_map(dev->kernel, vecs);
|
||||
+#else
|
||||
+ mpp = find_mp_by_str(vecs->mpvec, dev->kernel);
|
||||
+
|
||||
+ if (!mpp) {
|
||||
+ condlog(2, "%s: devmap not registered, can't remove",
|
||||
+ dev->kernel);
|
||||
+ return 0;
|
||||
+ }
|
||||
+ orphan_paths(vecs->pathvec, mpp);
|
||||
+ remove_map_and_stop_waiter(mpp, vecs, 1);
|
||||
+ return 0;
|
||||
+#endif
|
||||
}
|
||||
|
||||
int
|
@ -1,34 +0,0 @@
|
||||
Index: multipath-tools-090724/kpartx/kpartx.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/kpartx/kpartx.c
|
||||
+++ multipath-tools-090724/kpartx/kpartx.c
|
||||
@@ -489,6 +489,7 @@ main(int argc, char **argv){
|
||||
d = c;
|
||||
while (c) {
|
||||
for (j = 0; j < n; j++) {
|
||||
+ uint64_t start;
|
||||
int k = slices[j].container - 1;
|
||||
|
||||
if (slices[j].size == 0)
|
||||
@@ -499,7 +500,7 @@ main(int argc, char **argv){
|
||||
continue;
|
||||
|
||||
/* Skip all simple slices */
|
||||
- if (k < 0)
|
||||
+ if (slices[j].container == 0)
|
||||
continue;
|
||||
|
||||
/* Check container slice */
|
||||
@@ -514,10 +515,11 @@ main(int argc, char **argv){
|
||||
}
|
||||
strip_slash(partname);
|
||||
|
||||
+ start = slices[j].start - slices[k].start;
|
||||
if (safe_sprintf(params, "%d:%d %" PRIu64,
|
||||
slices[k].major,
|
||||
slices[k].minor,
|
||||
- slices[j].start)) {
|
||||
+ start)) {
|
||||
fprintf(stderr, "params too small\n");
|
||||
exit(1);
|
||||
}
|
@ -1,26 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/uevent.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/uevent.c
|
||||
+++ multipath-tools-090724/libmultipath/uevent.c
|
||||
@@ -231,7 +231,8 @@ int uevent_listen(int (*uev_trigger)(str
|
||||
smsg.msg_control = cred_msg;
|
||||
smsg.msg_controllen = sizeof(cred_msg);
|
||||
|
||||
- if (recvmsg(sock, &smsg, 0) < 0) {
|
||||
+ buflen = recvmsg(sock, &smsg, 0);
|
||||
+ if (buflen < 0) {
|
||||
if (errno != EINTR)
|
||||
condlog(0, "error receiving message");
|
||||
continue;
|
||||
@@ -286,8 +287,10 @@ int uevent_listen(int (*uev_trigger)(str
|
||||
/* action string */
|
||||
uev->action = buffer;
|
||||
pos = strchr(buffer, '@');
|
||||
- if (!pos)
|
||||
+ if (!pos) {
|
||||
+ condlog(3, "bad action string '%s'", buffer);
|
||||
continue;
|
||||
+ }
|
||||
pos[0] = '\0';
|
||||
|
||||
/* sysfs path */
|
1
import.log
Normal file
1
import.log
Normal file
@ -0,0 +1 @@
|
||||
device-mapper-multipath-0_4_9-10_fc13:HEAD:device-mapper-multipath-0.4.9-10.fc13.src.rpm:1256637500
|
@ -1,13 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/log.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/log.c
|
||||
+++ multipath-tools-090724/libmultipath/log.c
|
||||
@@ -181,7 +181,7 @@ int log_dequeue (void * buff)
|
||||
|
||||
memset((void *)src, 0, len);
|
||||
|
||||
- return la->empty;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
/*
|
@ -1,38 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/defaults.h
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/defaults.h
|
||||
+++ multipath-tools-090724/libmultipath/defaults.h
|
||||
@@ -19,6 +19,6 @@
|
||||
#define DEFAULT_PIDFILE "/var/run/multipathd.pid"
|
||||
#define DEFAULT_SOCKET "/var/run/multipathd.sock"
|
||||
#define DEFAULT_CONFIGFILE "/etc/multipath.conf"
|
||||
-#define DEFAULT_BINDINGS_FILE "/var/lib/multipath/bindings"
|
||||
+#define DEFAULT_BINDINGS_FILE "/etc/multipath/bindings"
|
||||
|
||||
char * set_default (char * str);
|
||||
Index: multipath-tools-090724/multipath.conf.annotated
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath.conf.annotated
|
||||
+++ multipath-tools-090724/multipath.conf.annotated
|
||||
@@ -163,7 +163,7 @@
|
||||
# # name : user_friendly_names
|
||||
# # scope : multipath
|
||||
# # desc : If set to "yes", using the bindings file
|
||||
-# # /var/lib/multipath/bindings to assign a persistent and
|
||||
+# # /etc/multipath/bindings to assign a persistent and
|
||||
# # unique alias to the multipath, in the form of mpath<n>.
|
||||
# # If set to "no" use the WWID as the alias. In either case
|
||||
# # this be will be overriden by any specific aliases in this
|
||||
Index: multipath-tools-090724/multipath/multipath.conf.5
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath/multipath.conf.5
|
||||
+++ multipath-tools-090724/multipath/multipath.conf.5
|
||||
@@ -222,7 +222,7 @@ for never stop queueing. Default is 0.
|
||||
If set to
|
||||
.I yes
|
||||
, using the bindings file
|
||||
-.I /var/lib/multipath/bindings
|
||||
+.I /etc/multipath/bindings
|
||||
to assign a persistent and unique alias to the multipath, in the form of mpath<n>.
|
||||
If set to
|
||||
.I no
|
@ -1,48 +0,0 @@
|
||||
---
|
||||
multipath/Makefile | 3 ++-
|
||||
multipath/mpath_wait | 17 +++++++++++++++++
|
||||
2 files changed, 19 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: multipath-tools-090724/multipath/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath/Makefile
|
||||
+++ multipath-tools-090724/multipath/Makefile
|
||||
@@ -20,7 +20,7 @@ $(EXEC): $(OBJS)
|
||||
|
||||
install:
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
- $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/
|
||||
+ $(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
$(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
@@ -34,6 +34,7 @@ install:
|
||||
uninstall:
|
||||
rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
|
||||
rm $(DESTDIR)$(bindir)/$(EXEC)
|
||||
+ rm $(DESTDIR)$(bindir)/mpath_wait
|
||||
rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
|
||||
rm $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz
|
||||
|
||||
Index: multipath-tools-090724/multipath/mpath_wait
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ multipath-tools-090724/multipath/mpath_wait
|
||||
@@ -0,0 +1,17 @@
|
||||
+#!/bin/bash
|
||||
+
|
||||
+retry=3
|
||||
+sec=1
|
||||
+
|
||||
+/sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
|
||||
+ret=$?
|
||||
+
|
||||
+while [ "$ret" -ne 0 -a "$retry" -gt 0 ]
|
||||
+do
|
||||
+ sleep $sec
|
||||
+ /sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
|
||||
+ ret=$?
|
||||
+ retry=$(($retry - 1))
|
||||
+done
|
||||
+
|
||||
+exit $ret
|
97
multipath.conf.redhat
Normal file
97
multipath.conf.redhat
Normal file
@ -0,0 +1,97 @@
|
||||
# This is a basic configuration file with some examples, for device mapper
|
||||
# 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 list of configuration options with descriptions, see
|
||||
# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
|
||||
|
||||
|
||||
# Blacklist all devices by default. Remove this to enable multipathing
|
||||
# on the default devices.
|
||||
blacklist {
|
||||
devnode "*"
|
||||
}
|
||||
|
||||
## By default, devices with vendor = "IBM" and product = "S/390.*" are
|
||||
## blacklisted. To enable mulitpathing on these devies, uncomment the
|
||||
## following lines.
|
||||
#blacklist_exceptions {
|
||||
# device {
|
||||
# vendor "IBM"
|
||||
# product "S/390.*"
|
||||
# }
|
||||
#}
|
||||
|
||||
## Use user friendly names, instead of using WWIDs as names.
|
||||
defaults {
|
||||
user_friendly_names yes
|
||||
}
|
||||
##
|
||||
## Here is an example of how to configure some standard options.
|
||||
##
|
||||
#
|
||||
#defaults {
|
||||
# udev_dir /dev
|
||||
# polling_interval 10
|
||||
# selector "round-robin 0"
|
||||
# path_grouping_policy multibus
|
||||
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||
# prio alua
|
||||
# path_checker readsector0
|
||||
# rr_min_io 100
|
||||
# max_fds 8192
|
||||
# rr_weight priorities
|
||||
# failback immediate
|
||||
# no_path_retry fail
|
||||
# user_friendly_names yes
|
||||
#}
|
||||
##
|
||||
## The wwid line in the following blacklist section is shown as an example
|
||||
## of how to blacklist devices by wwid. The 2 devnode lines are the
|
||||
## compiled in default blacklist. If you want to blacklist entire types
|
||||
## of devices, such as all scsi devices, you should use a devnode line.
|
||||
## However, if you want to blacklist specific devices, you should use
|
||||
## a wwid line. Since there is no guarantee that a specific device will
|
||||
## not change names on reboot (from /dev/sda to /dev/sdb for example)
|
||||
## devnode lines are not recommended for blacklisting specific devices.
|
||||
##
|
||||
#blacklist {
|
||||
# wwid 26353900f02796769
|
||||
# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
|
||||
# devnode "^hd[a-z]"
|
||||
#}
|
||||
#multipaths {
|
||||
# multipath {
|
||||
# wwid 3600508b4000156d700012000000b0000
|
||||
# alias yellow
|
||||
# path_grouping_policy multibus
|
||||
# path_checker readsector0
|
||||
# path_selector "round-robin 0"
|
||||
# failback manual
|
||||
# rr_weight priorities
|
||||
# no_path_retry 5
|
||||
# }
|
||||
# multipath {
|
||||
# wwid 1DEC_____321816758474
|
||||
# alias red
|
||||
# }
|
||||
#}
|
||||
#devices {
|
||||
# device {
|
||||
# vendor "COMPAQ "
|
||||
# product "HSV110 (C)COMPAQ"
|
||||
# path_grouping_policy multibus
|
||||
# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||
# path_checker readsector0
|
||||
# path_selector "round-robin 0"
|
||||
# hardware_handler "0"
|
||||
# failback 15
|
||||
# rr_weight priorities
|
||||
# no_path_retry queue
|
||||
# }
|
||||
# device {
|
||||
# vendor "COMPAQ "
|
||||
# product "MSA1000 "
|
||||
# path_grouping_policy multibus
|
||||
# }
|
||||
#}
|
@ -1,47 +0,0 @@
|
||||
---
|
||||
multipath/Makefile | 4 ++--
|
||||
multipath/multipath.rules | 13 +++++++------
|
||||
2 files changed, 9 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: multipath-tools-090724/multipath/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath/Makefile
|
||||
+++ multipath-tools-090724/multipath/Makefile
|
||||
@@ -22,7 +22,7 @@ install:
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) mpath_wait $(DESTDIR)$(bindir)/
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
- $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
+ $(INSTALL_PROGRAM) -m 644 multipath.rules $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
||||
@@ -32,7 +32,7 @@ install:
|
||||
fi
|
||||
|
||||
uninstall:
|
||||
- rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
|
||||
+ rm $(DESTDIR)/etc/udev/rules.d/40-multipath.rules
|
||||
rm $(DESTDIR)$(bindir)/$(EXEC)
|
||||
rm $(DESTDIR)$(bindir)/mpath_wait
|
||||
rm $(DESTDIR)$(mandir)/$(EXEC).8.gz
|
||||
Index: multipath-tools-090724/multipath/multipath.rules
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/multipath/multipath.rules
|
||||
+++ multipath-tools-090724/multipath/multipath.rules
|
||||
@@ -1,7 +1,8 @@
|
||||
-#
|
||||
-# udev rules for multipathing.
|
||||
-# The persistent symlinks are created with the kpartx rules
|
||||
-#
|
||||
-
|
||||
-# socket for uevents
|
||||
-SUBSYSTEM=="block", RUN+="socket:/org/kernel/dm/multipath_event"
|
||||
+# multipath wants the devmaps presented as meaninglful device names
|
||||
+# so name them after their devmap name
|
||||
+SUBSYSTEM!="block", GOTO="end_mpath"
|
||||
+RUN+="socket:/org/kernel/dm/multipath_event"
|
||||
+KERNEL!="dm-[0-9]*", GOTO="end_mpath"
|
||||
+PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
|
||||
+ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
|
||||
+LABEL="end_mpath"
|
@ -1,173 +0,0 @@
|
||||
Index: multipath-tools/libmultipath/hwtable.c
|
||||
===================================================================
|
||||
--- multipath-tools.orig/libmultipath/hwtable.c
|
||||
+++ multipath-tools/libmultipath/hwtable.c
|
||||
@@ -589,7 +589,7 @@ static struct hwentry default_hw[] = {
|
||||
.vendor = "IBM",
|
||||
.product = "S/390 DASD ECKD",
|
||||
.bl_product = "S/390.*",
|
||||
- .getuid = "/sbin/dasdinfo -u -b %n",
|
||||
+ .getuid = "/sbin/dasd_id /dev/%n",
|
||||
.features = "1 queue_if_no_path",
|
||||
.hwhandler = DEFAULT_HWHANDLER,
|
||||
.selector = DEFAULT_SELECTOR,
|
||||
Index: multipath-tools/Makefile.inc
|
||||
===================================================================
|
||||
--- multipath-tools.orig/Makefile.inc
|
||||
+++ multipath-tools/Makefile.inc
|
||||
@@ -28,7 +28,7 @@ libudevdir = ${prefix}/lib/udev
|
||||
multipathdir = $(TOPDIR)/libmultipath
|
||||
mandir = $(prefix)/usr/share/man/man8
|
||||
man5dir = $(prefix)/usr/share/man/man5
|
||||
-rcdir = $(prefix)/etc/init.d
|
||||
+rcdir = $(prefix)/etc/rc.d/init.d
|
||||
syslibdir = $(prefix)/$(LIB)
|
||||
libdir = $(prefix)/$(LIB)/multipath
|
||||
|
||||
Index: multipath-tools/multipathd/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools.orig/multipathd/Makefile
|
||||
+++ multipath-tools/multipathd/Makefile
|
||||
@@ -35,6 +35,7 @@ install:
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(rcdir)
|
||||
+ $(INSTALL_PROGRAM) -m 755 multipathd.init.redhat $(DESTDIR)$(rcdir)/$(EXEC)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
|
||||
Index: multipath-tools/multipath/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools.orig/multipath/Makefile
|
||||
+++ multipath-tools/multipath/Makefile
|
||||
@@ -27,6 +27,9 @@ install:
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir)
|
||||
+ if [ ! -e $(DESTDIR)//etc/multipath.conf ]; then \
|
||||
+ $(INSTALL_PROGRAM) -m 644 multipath.conf.redhat $(DESTDIR)/etc/multipath.conf; \
|
||||
+ fi
|
||||
|
||||
uninstall:
|
||||
rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
|
||||
Index: multipath-tools/multipath/multipath.conf.redhat
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ multipath-tools/multipath/multipath.conf.redhat
|
||||
@@ -0,0 +1,97 @@
|
||||
+# This is a basic configuration file with some examples, for device mapper
|
||||
+# 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 list of configuration options with descriptions, see
|
||||
+# /usr/share/doc/device-mapper-multipath-0.4.9/multipath.conf.annotated
|
||||
+
|
||||
+
|
||||
+# Blacklist all devices by default. Remove this to enable multipathing
|
||||
+# on the default devices.
|
||||
+blacklist {
|
||||
+ devnode "*"
|
||||
+}
|
||||
+
|
||||
+## By default, devices with vendor = "IBM" and product = "S/390.*" are
|
||||
+## blacklisted. To enable mulitpathing on these devies, uncomment the
|
||||
+## following lines.
|
||||
+#blacklist_exceptions {
|
||||
+# device {
|
||||
+# vendor "IBM"
|
||||
+# product "S/390.*"
|
||||
+# }
|
||||
+#}
|
||||
+
|
||||
+## Use user friendly names, instead of using WWIDs as names.
|
||||
+defaults {
|
||||
+ user_friendly_names yes
|
||||
+}
|
||||
+##
|
||||
+## Here is an example of how to configure some standard options.
|
||||
+##
|
||||
+#
|
||||
+#defaults {
|
||||
+# udev_dir /dev
|
||||
+# polling_interval 10
|
||||
+# selector "round-robin 0"
|
||||
+# path_grouping_policy multibus
|
||||
+# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||
+# prio alua
|
||||
+# path_checker readsector0
|
||||
+# rr_min_io 100
|
||||
+# max_fds 8192
|
||||
+# rr_weight priorities
|
||||
+# failback immediate
|
||||
+# no_path_retry fail
|
||||
+# user_friendly_names yes
|
||||
+#}
|
||||
+##
|
||||
+## The wwid line in the following blacklist section is shown as an example
|
||||
+## of how to blacklist devices by wwid. The 2 devnode lines are the
|
||||
+## compiled in default blacklist. If you want to blacklist entire types
|
||||
+## of devices, such as all scsi devices, you should use a devnode line.
|
||||
+## However, if you want to blacklist specific devices, you should use
|
||||
+## a wwid line. Since there is no guarantee that a specific device will
|
||||
+## not change names on reboot (from /dev/sda to /dev/sdb for example)
|
||||
+## devnode lines are not recommended for blacklisting specific devices.
|
||||
+##
|
||||
+#blacklist {
|
||||
+# wwid 26353900f02796769
|
||||
+# devnode "^(ram|raw|loop|fd|md|dm-|sr|scd|st)[0-9]*"
|
||||
+# devnode "^hd[a-z]"
|
||||
+#}
|
||||
+#multipaths {
|
||||
+# multipath {
|
||||
+# wwid 3600508b4000156d700012000000b0000
|
||||
+# alias yellow
|
||||
+# path_grouping_policy multibus
|
||||
+# path_checker readsector0
|
||||
+# path_selector "round-robin 0"
|
||||
+# failback manual
|
||||
+# rr_weight priorities
|
||||
+# no_path_retry 5
|
||||
+# }
|
||||
+# multipath {
|
||||
+# wwid 1DEC_____321816758474
|
||||
+# alias red
|
||||
+# }
|
||||
+#}
|
||||
+#devices {
|
||||
+# device {
|
||||
+# vendor "COMPAQ "
|
||||
+# product "HSV110 (C)COMPAQ"
|
||||
+# path_grouping_policy multibus
|
||||
+# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||
+# path_checker readsector0
|
||||
+# path_selector "round-robin 0"
|
||||
+# hardware_handler "0"
|
||||
+# failback 15
|
||||
+# rr_weight priorities
|
||||
+# no_path_retry queue
|
||||
+# }
|
||||
+# device {
|
||||
+# vendor "COMPAQ "
|
||||
+# product "MSA1000 "
|
||||
+# path_grouping_policy multibus
|
||||
+# }
|
||||
+#}
|
||||
Index: multipath-tools/kpartx/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools.orig/kpartx/Makefile
|
||||
+++ multipath-tools/kpartx/Makefile
|
||||
@@ -20,10 +20,10 @@ $(EXEC): $(OBJS)
|
||||
install: $(EXEC) $(EXEC).8
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir)
|
||||
$(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)
|
||||
- $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
|
||||
- $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
|
||||
- $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
- $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
+# $(INSTALL_PROGRAM) -d $(DESTDIR)$(libudevdir)
|
||||
+# $(INSTALL_PROGRAM) -m 755 kpartx_id $(DESTDIR)$(libudevdir)
|
||||
+# $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/udev/rules.d
|
||||
+# $(INSTALL_PROGRAM) -m 644 kpartx.rules $(DESTDIR)/etc/udev/rules.d/
|
||||
$(INSTALL_PROGRAM) -d $(DESTDIR)$(mandir)
|
||||
$(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(mandir)
|
||||
|
@ -1,49 +0,0 @@
|
||||
Index: multipath-tools/libmultipath/defaults.h
|
||||
===================================================================
|
||||
--- multipath-tools.orig/libmultipath/defaults.h
|
||||
+++ multipath-tools/libmultipath/defaults.h
|
||||
@@ -1,6 +1,6 @@
|
||||
#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n"
|
||||
#define DEFAULT_UDEVDIR "/dev"
|
||||
-#define DEFAULT_MULTIPATHDIR "/lib/multipath"
|
||||
+#define DEFAULT_MULTIPATHDIR "/" LIB_STRING "/multipath"
|
||||
#define DEFAULT_SELECTOR "round-robin 0"
|
||||
#define DEFAULT_FEATURES "0"
|
||||
#define DEFAULT_HWHANDLER "0"
|
||||
Index: multipath-tools/Makefile.inc
|
||||
===================================================================
|
||||
--- multipath-tools.orig/Makefile.inc
|
||||
+++ multipath-tools/Makefile.inc
|
||||
@@ -13,6 +13,14 @@ ifeq ($(TOPDIR),)
|
||||
TOPDIR = ..
|
||||
endif
|
||||
|
||||
+ifndef LIB
|
||||
+ ifeq ($(shell test -d /lib64 && echo 1),1)
|
||||
+ LIB=lib64
|
||||
+ else
|
||||
+ LIB=lib
|
||||
+ endif
|
||||
+endif
|
||||
+
|
||||
prefix =
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(exec_prefix)/sbin
|
||||
@@ -21,14 +29,14 @@ multipathdir = $(TOPDIR)/libmultipath
|
||||
mandir = $(prefix)/usr/share/man/man8
|
||||
man5dir = $(prefix)/usr/share/man/man5
|
||||
rcdir = $(prefix)/etc/init.d
|
||||
-syslibdir = $(prefix)/lib
|
||||
-libdir = $(prefix)/lib/multipath
|
||||
+syslibdir = $(prefix)/$(LIB)
|
||||
+libdir = $(prefix)/$(LIB)/multipath
|
||||
|
||||
GZIP = /bin/gzip -9 -c
|
||||
INSTALL_PROGRAM = install
|
||||
|
||||
OPTFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
|
||||
-CFLAGS = $(OPTFLAGS) -fPIC
|
||||
+CFLAGS = $(OPTFLAGS) -fPIC -DLIB_STRING=\"${LIB}\"
|
||||
SHARED_FLAGS = -shared
|
||||
|
||||
%.o: %.c
|
2
sources
2
sources
@ -1 +1 @@
|
||||
89a2e3d5ee8e78c7fb487cae00345815 multipath-tools-090729.tgz
|
||||
af9cc98e278066cabfa2f47e8852f506 multipath-tools-091027.tar.gz
|
||||
|
@ -1,24 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/log_pthread.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/log_pthread.c
|
||||
+++ multipath-tools-090724/libmultipath/log_pthread.c
|
||||
@@ -56,6 +56,7 @@ static void * log_thread (void * et)
|
||||
|
||||
flush_logqueue();
|
||||
}
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
void log_thread_start (pthread_attr_t *attr)
|
||||
Index: multipath-tools-090724/libmultipath/uevent.c
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/uevent.c
|
||||
+++ multipath-tools-090724/libmultipath/uevent.c
|
||||
@@ -101,6 +101,7 @@ uevq_thread(void * et)
|
||||
|
||||
service_uevq();
|
||||
}
|
||||
+ return NULL;
|
||||
}
|
||||
|
||||
int uevent_listen(int (*uev_trigger)(struct uevent *, void * trigger_data),
|
@ -1,55 +0,0 @@
|
||||
---
|
||||
multipath/mpath_wait | 21 +++++++++++++++------
|
||||
multipath/multipath.rules | 5 ++++-
|
||||
2 files changed, 19 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: multipath-tools/multipath/mpath_wait
|
||||
===================================================================
|
||||
--- multipath-tools.orig/multipath/mpath_wait
|
||||
+++ multipath-tools/multipath/mpath_wait
|
||||
@@ -3,14 +3,23 @@
|
||||
retry=3
|
||||
sec=1
|
||||
|
||||
-/sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
|
||||
-ret=$?
|
||||
+dev=`/sbin/dmsetup ls --target multipath -j $1 -m $2 --exec 'echo'`
|
||||
+if [ -n "$dev" ]; then
|
||||
+ /usr/bin/stat $dev > /dev/null 2>&1
|
||||
+ ret=$?
|
||||
+else
|
||||
+ ret=1
|
||||
+fi
|
||||
|
||||
-while [ "$ret" -ne 0 -a "$retry" -gt 0 ]
|
||||
-do
|
||||
+while [ "$ret" -ne 0 -a "$retry" -gt 0 ]; do
|
||||
sleep $sec
|
||||
- /sbin/dmsetup info -c --noheadings -j $1 -m $2 2> /dev/null | grep -q .*:${1}:${2}:L.*:.*:.*:.*:.*
|
||||
- ret=$?
|
||||
+ if [ -z "$dev" ]; then
|
||||
+ dev=`/sbin/dmsetup ls --target multipath -j $1 -m $2 --exec 'echo'`
|
||||
+ fi
|
||||
+ if [ -n "$dev" ]; then
|
||||
+ /usr/bin/stat $dev > /dev/null 2>&1
|
||||
+ ret=$?
|
||||
+ fi
|
||||
retry=$(($retry - 1))
|
||||
done
|
||||
|
||||
Index: multipath-tools/multipath/multipath.rules
|
||||
===================================================================
|
||||
--- multipath-tools.orig/multipath/multipath.rules
|
||||
+++ multipath-tools/multipath/multipath.rules
|
||||
@@ -2,7 +2,10 @@
|
||||
# so name them after their devmap name
|
||||
SUBSYSTEM!="block", GOTO="end_mpath"
|
||||
RUN+="socket:/org/kernel/dm/multipath_event"
|
||||
+ACTION!="change", GOTO="end_mpath"
|
||||
KERNEL!="dm-[0-9]*", GOTO="end_mpath"
|
||||
+ENV{DM_SUSPENDED}=="1", GOTO="end_mpath"
|
||||
+ENV{DM_UUID}=="*?", ENV{DM_UUID}!="mpath-?*", GOTO="end_mpath"
|
||||
PROGRAM!="/sbin/mpath_wait %M %m", GOTO="end_mpath"
|
||||
-ACTION=="add", RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
|
||||
+RUN+="/sbin/dmsetup ls --target multipath --exec '/sbin/kpartx -a -p p' -j %M -m %m"
|
||||
LABEL="end_mpath"
|
@ -1,26 +0,0 @@
|
||||
Index: multipath-tools-090724/libmultipath/checkers/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/checkers/Makefile
|
||||
+++ multipath-tools-090724/libmultipath/checkers/Makefile
|
||||
@@ -27,7 +27,7 @@ install:
|
||||
$(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DESTDIR)$(libdir)/$(LIBS)
|
||||
+ for file in $(LIBS); do rm -f $(DESTDIR)$(libdir)/$$file; done
|
||||
|
||||
clean:
|
||||
rm -f core *.a *.o *.gz *.so
|
||||
Index: multipath-tools-090724/libmultipath/prioritizers/Makefile
|
||||
===================================================================
|
||||
--- multipath-tools-090724.orig/libmultipath/prioritizers/Makefile
|
||||
+++ multipath-tools-090724/libmultipath/prioritizers/Makefile
|
||||
@@ -28,7 +28,7 @@ install: $(LIBS)
|
||||
$(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir)
|
||||
|
||||
uninstall:
|
||||
- rm -f $(DESTDIR)$(libdir)/libprio*.so
|
||||
+ for file in $(LIBS); do rm -f $(DESTDIR)$(libdir)/$$file; done
|
||||
|
||||
clean:
|
||||
rm -f core *.a *.o *.gz *.so
|
Loading…
Reference in New Issue
Block a user