Various small multipath-tools improvements
Subsystems (2)
cover Various small multipath-tools improvements
Just a few cleanup patches.
Mike Snitzer (4):
multipath-tools: update scsi_id arguments
multipath-tools: install libmultipath.so in $syslibdir
multipath-tools: update multipathd.init.redhat
multipath-tools: change default location for bindings file
Makefile.inc | 1 + libmultipath/Makefile | 6 +- libmultipath/defaults.h | 4 +- libmultipath/hwtable.c | 6 +- multipath.conf.annotated | 6 +- multipath.conf.defaults | 78 ++++++++++++++++++------------------ multipath.conf.synthetic | 4 +- multipath/Makefile | 1 + multipath/multipath.conf.5 | 2 +- multipathd/multipathd.init.redhat | 30 +++++++-------- 10 files changed, 69 insertions(+), 69 deletions(-)
PATCH 1/4 multipath-tools: update scsi_id arguments
Switch over to using --whitelisted and --device
--- libmultipath/defaults.h | 2 +- libmultipath/hwtable.c | 6 ++-- multipath.conf.annotated | 6 ++-- multipath.conf.defaults | 78 ++++++++++++++++++++++---------------------- multipath.conf.synthetic | 4 +- multipath/multipath.conf.5 | 2 +- 6 files changed, 49 insertions(+), 49 deletions(-)
libmultipath/defaults.h +1 -1
@@ -1,4 +1,4 @@ -#define DEFAULT_GETUID "/lib/udev/scsi_id -g -u -d /dev/%n" +#define DEFAULT_GETUID "/lib/udev/scsi_id --whitelisted --device=/dev/%n"#define DEFAULT_UDEVDIR "/dev"#define DEFAULT_MULTIPATHDIR "/lib/multipath"#define DEFAULT_SELECTOR "round-robin 0"
libmultipath/hwtable.c +3 -3
@@ -193,7 +193,7 @@ static struct hwentry default_hw[] = {/* HP Smart Array */ .vendor = "HP", .product = "LOGICAL VOLUME.*", - .getuid = "/lib/udev/scsi_id -n -g -u -d /dev/%n", + .getuid = DEFAULT_GETUID, .features = DEFAULT_FEATURES, .hwhandler = DEFAULT_HWHANDLER, .selector = DEFAULT_SELECTOR,
@@ -235,7 +235,7 @@ static struct hwentry default_hw[] = { { .vendor = "EMC", .product = "SYMMETRIX", - .getuid = "/lib/udev/scsi_id -g -u -ppre-spc3-83 -d /dev/%n", + .getuid = "/lib/udev/scsi_id --page=pre-spc3-83 --whitelisted --device=/dev/%n", .features = DEFAULT_FEATURES, .hwhandler = DEFAULT_HWHANDLER, .selector = DEFAULT_SELECTOR,
@@ -794,7 +794,7 @@ static struct hwentry default_hw[] = { { .vendor = "PIVOT3", .product = "RAIGE VOLUME", - .getuid = "/lib/udev/scsi_id -p 0x80 -g -u -d /dev/%n", + .getuid = "/lib/udev/scsi_id --page=0x80 --whitelisted --device=/dev/%n", .features = "1 queue_if_no_path", .hwhandler = DEFAULT_HWHANDLER, .selector = DEFAULT_SELECTOR,
multipath.conf.annotated +3 -3
@@ -55,9 +55,9 @@ # # scope : multipath # # desc : the default program and args to callout to obtain a unique # # path identifier. Absolute path required -# # default : /lib/udev/scsi_id -g -u -s +# # default : /lib/udev/scsi_id --whitelisted --device=/dev/%n # # -# getuid_callout "/lib/udev/scsi_id -g -u -d /dev/%n" +# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # # # # # name : prio
@@ -351,7 +351,7 @@ # # desc : the program and args to callout to obtain a unique # # path identifier. Absolute path required # # -# getuid_callout "/lib/udev/scsi_id -g -u -d /dev/%n" +# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # # # # # name : prio
multipath.conf.defaults +39 -39
312 lines not on this page · raw message
multipath.conf.synthetic +2 -2
@@ -7,7 +7,7 @@ # polling_interval 10 # selector "round-robin 0" # path_grouping_policy multibus -# getuid_callout "/lib/udev/scsi_id -g -u -d /dev/%n" +# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # prio const # path_checker directio # rr_min_io 100
@@ -52,7 +52,7 @@ # vendor "COMPAQ " # product "HSV110 (C)COMPAQ" # path_grouping_policy multibus -# getuid_callout "/lib/udev/scsi_id -g -u -d /dev/%n" +# getuid_callout "/lib/udev/scsi_id --whitelisted --device=/dev/%n" # path_checker directio # path_selector "round-robin 0" # hardware_handler "0"
multipath/multipath.conf.5 +1 -1
@@ -109,7 +109,7 @@ Default value is \fImultibus\fR. The default program and args to callout to obtain a unique path identifier. Should be specified with an absolute path. Default value is -.I /lib/udev/scsi_id -g -u -d /dev/%n +.I /lib/udev/scsi_id --whitelisted --device=/dev/%n .TP .B prio_callout The default program and args to callout to obtain a path priority
Signature · 1 line
1.6.0.6
PATCH 2/4 multipath-tools: install libmultipath.so in $syslibdir
In reply to Mike SnitzerAllows libmultipath.so to be installed in the proper lib dir (e.g. /lib64). $libdir is already used for /lib/multipath
--- Makefile.inc | 1 + libmultipath/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)
Makefile.inc +1 -0
@@ -21,6 +21,7 @@ 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 GZIP = /bin/gzip -9 -c
libmultipath/Makefile +3 -3
@@ -26,12 +26,12 @@ $(LIBS): $(OBJS) $(CC) $(SHARED_FLAGS) -Wl,-soname,$@ $(CFLAGS) -o $@ $(OBJS) install: - $(INSTALL_PROGRAM) -d $(DESTDIR)$(prefix)/lib - $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(prefix)/lib/$(LIBS) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) + $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS) $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir) uninstall: - rm -f $(DESTDIR)$(prefix)/lib/$(LIBS) + rm -f $(DESTDIR)$(syslibdir)/$(LIBS) clean: rm -f core *.a *.o *.gz *.so
Signature · 1 line
1.6.0.6
Re: [PATCH 2/4] multipath-tools: install libmultipath.so in $syslibdir
Quoted 3 lines · Mike Snitzer
Allows libmultipath.so to be installed in the proper lib dir (e.g. /lib64). $libdir is already used for
/lib/multipath
Mike,
am I missing something ... I don't the lib/lib64 switching code.
Quoted 38 lines
Signed-off-by Mike Snitzer <[email protected]>--- Makefile.inc | 1 + libmultipath/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)Makefile.inc +1
-0@@ -21,6 +21,7 @@ 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 GZIP = /bin/gzip -9 -clibmultipath/Makefile +3
-3@@ -26,12 +26,12 @@ $(LIBS): $(OBJS) $(CC) $(SHARED_FLAGS) -Wl,-soname,$@ $(CFLAGS) -o $@ $(OBJS) install: - $(INSTALL_PROGRAM) -d $(DESTDIR)$(prefix)/lib - $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(prefix)/lib/$(LIBS) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) + $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS) $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir) uninstall: - rm -f $(DESTDIR)$(prefix)/lib/$(LIBS) + rm -f $(DESTDIR)$(syslibdir)/$(LIBS) clean: rm -f core *.a *.o *.gz *.so
Re: [PATCH 2/4] multipath-tools: install libmultipath.so in $syslibdir
Quoted 7 lines · Christophe Varoqui
Quoted 3 lines · Mike Snitzer
Allows libmultipath.so to be installed in the proper lib dir (e.g. /lib64). $libdir is already used for
/lib/multipathMike,
am I missing something ... I don't the lib/lib64 switching code.
The standard install would still just place libmultipath.so in /lib but this patch exposes the ability to override the default e.g.:
make install syslibdir=/lib64 libdir=/lib64/multipath
The path checker and prioritizer modules would get installed in /lib64/multipath and libmultipath.so in /lib64
Quoted 42 lines
Quoted 27 lines
--- Makefile.inc | 1 + libmultipath/Makefile | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-)Makefile.inc +1
-0@@ -21,6 +21,7 @@ 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 GZIP = /bin/gzip -9 -clibmultipath/Makefile +0
-2@@ -26,12 +26,12 @@ $(LIBS): $(OBJS) $(CC) $(SHARED_FLAGS) -Wl,-soname,$@ $(CFLAGS) -o $@ $(OBJS) install: - $(INSTALL_PROGRAM) -d $(DESTDIR)$(prefix)/lib - $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(prefix)/lib/$(LIBS)libmultipath/Makefile $(LIBS): $(OBJS) · line 37
Quoted 10 lines
libmultipath/Makefile +3
-1+ $(INSTALL_PROGRAM) -d $(DESTDIR)$(syslibdir) + $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(syslibdir)/$(LIBS) $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir) uninstall: - rm -f $(DESTDIR)$(prefix)/lib/$(LIBS) + rm -f $(DESTDIR)$(syslibdir)/$(LIBS) clean: rm -f core *.a *.o *.gz *.so--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Re: Re: [PATCH 2/4] multipath-tools: install libmultipath.so in $syslibdir
Quoted 5 lines
Quoted 4 lines
Mike,
am I missing something ... I don't the lib/lib64 switching code.
Quoted 7 lines
The standard install would still just place libmultipath.so in /lib but this patch exposes the ability to override the default e.g.:
make install syslibdir=/lib64 libdir=/lib64/multipathThe path checker and prioritizer modules would get installed in
/lib64/multipathand libmultipath.so in /lib64
Oh ok, I was expecting some kind of detection code to set /lib64. I understand that this approach is sufficient for your packagers needs.
Thanks for explaining.
PATCH 3/4 multipath-tools: update multipathd.init.redhat
In reply to Mike SnitzerVarious small improvements to Red Hat's multipathd initscript.
--- multipathd/multipathd.init.redhat | 30 ++++++++++++++---------------- 1 files changed, 14 insertions(+), 16 deletions(-)
multipathd/multipathd.init.redhat +14 -16
@@ -1,13 +1,16 @@ #!/bin/bash - -# -# /etc/rc.d/init.d/multipathd # -# Starts the multipath daemon +# multipathd Starts the multipath daemon # # chkconfig: - 13 87 -# description: Manage device-mapper multipath devices -# processname: multipathd +# description: Manages device-mapper multipath devices + +### BEGIN INIT INFO +# Provides: multipathd +# Short-Description: Control multipathd +# Description: This service monitors and manages +# device-mapper multipath devices +### END INIT INFO DAEMON=/sbin/multipathd prog=`basename $DAEMON`
@@ -16,14 +19,8 @@ lockdir=/var/lock/subsys sysconfig=/etc/sysconfig -system=redhat - -if [ $system = redhat ]; then - # Source function library. - . $initdir/functions -fi +. $initdir/functions -test -x $DAEMON || exit 0 test -r $sysconfig/$prog && . $sysconfig/$prog RETVAL=0
@@ -33,6 +30,7 @@ RETVAL=0 # start() { + test -x $DAEMON || exit 5 echo -n $"Starting $prog daemon: " daemon $DAEMON RETVAL=$?
@@ -68,13 +66,13 @@ start) stop) stop ;; -reload) +force-reload|reload) reload ;; restart) restart ;; -condrestart) +condrestart|try-restart) if [ -f $lockdir/$prog ]; then restart fi
@@ -85,7 +83,7 @@ status) ;; *) echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}" - RETVAL=1 + RETVAL=2 esac exit $RETVAL
Signature · 1 line
1.6.0.6
PATCH 4/4 multipath-tools: change default location for bindings file
In reply to Mike SnitzerChange from /var/lib/multipath/bindings to /etc/multipath/bindings. On bootup, if /var is not on the same device as /, multipath may start up before /var is mounted. /etc will always be available. Use of /etc/multipath/ is to make selinux happy.
--- libmultipath/defaults.h | 2 +- multipath/Makefile | 1 + 2 files changed, 2 insertions(+), 1 deletions(-)
libmultipath/defaults.h +1 -1
@@ -18,6 +18,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);
multipath/Makefile +1 -0
@@ -27,6 +27,7 @@ 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) + $(INSTALL_PROGRAM) -d $(DESTDIR)/etc/multipath uninstall: rm $(DESTDIR)/etc/udev/rules.d/multipath.rules
Signature · 1 line
1.6.0.6
Hi Mike,
thank you for these patches.
Do you happen to have a fetchable git clone to ease integration ?
----- Mail Original -----
De: "Mike Snitzer" <[email protected]>
À: [email protected]
Envoyé: Samedi 18 Avril 2009 00h07:56 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: [dm-devel] [PATCH 0/4] Various small multipath-tools improvements
Just a few cleanup patches.
Mike Snitzer (4):
multipath-tools: update scsi_id arguments
multipath-tools: install libmultipath.so in $syslibdir
multipath-tools: update multipathd.init.redhat
multipath-tools: change default location for bindings file
Makefile.inc | 1 + libmultipath/Makefile | 6 +- libmultipath/defaults.h | 4 +- libmultipath/hwtable.c | 6 +- multipath.conf.annotated | 6 +- multipath.conf.defaults | 78 ++++++++++++++++++------------------ multipath.conf.synthetic | 4 +- multipath/Makefile | 1 + multipath/multipath.conf.5 | 2 +- multipathd/multipathd.init.redhat | 30 +++++++-------- 10 files changed, 69 insertions(+), 69 deletions(-)
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel
Hi Christophe,
I don't have a public git tree at the moment but I can look to get one setup for future patches. The patches that I posted should apply cleanly to the current HEAD (49944a3d5).
BTW, agk pointed out that moving the bindings file may require that some logic be added to migrate the old bindings to the new location. I haven't looked into it yet but will do so shortly. But for now it is probably safest to not apply the change to the bindings file location (patch 4).
Mike
Quoted 39 lines · On Sat, Apr 18 2009 at 1:41pm -0400, [email protected]…
Hi Mike,
thank you for these patches.
Do you happen to have a fetchable git clone to ease integration ?----- Mail Original -----
De: "Mike Snitzer" <[email protected]>
À: [email protected]
Envoyé: Samedi 18 Avril 2009 00h07:56 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne
Objet: [dm-devel] [PATCH 0/4] Various small multipath-tools improvementsJust a few cleanup patches.
Mike Snitzer (4):
multipath-tools: updatescsi_idarguments
multipath-tools: install libmultipath.so in $syslibdir
multipath-tools: update multipathd.init.redhat
multipath-tools: change default location for bindings fileMakefile.inc | 1 + libmultipath/Makefile | 6 +- libmultipath/defaults.h | 4 +- libmultipath/hwtable.c | 6 +- multipath.conf.annotated | 6 +- multipath.conf.defaults | 78 ++++++++++++++++++------------------ multipath.conf.synthetic | 4 +- multipath/Makefile | 1 + multipath/multipath.conf.5 | 2 +- multipathd/multipathd.init.redhat | 30 +++++++-------- 10 files changed, 69 insertions(+), 69 deletions(-)--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel