From 4fa3700b25f28485679b1caf4a9ff46adbfb8602 Mon Sep 17 00:00:00 2001 From: Benjamin Marzinski Date: Wed, 20 Aug 2008 21:48:41 +0000 Subject: Updated to latest upstream 0.4.8 code: multipath-tools-080804.tgz (git commit id: eb87cbd0df8adf61d1c74c025f7326d833350f78) fixed 451817, 456397 (scsi_id_change.patch), 457530 (config_space_fix.patch) 457589 (static_libaio.patch) --- .cvsignore | 2 +- config_space_fix.patch | 27 +++ device-mapper-multipath.spec | 60 +++--- fix_devt.patch | 25 +++ makefiles_fix.patch | 53 ----- scsi_id_change.patch | 478 +++++++++++++++++++++++++++++++++++++++++++ sources | 2 +- static_libaio.patch | 22 ++ uevent_debug.patch | 28 --- 9 files changed, 590 insertions(+), 107 deletions(-) create mode 100644 config_space_fix.patch create mode 100644 fix_devt.patch delete mode 100644 makefiles_fix.patch create mode 100644 scsi_id_change.patch create mode 100644 static_libaio.patch delete mode 100644 uevent_debug.patch diff --git a/.cvsignore b/.cvsignore index bdf0f72..ae9f320 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -multipath-tools-080519.tgz +multipath-tools-080804.tgz diff --git a/config_space_fix.patch b/config_space_fix.patch new file mode 100644 index 0000000..25aca7a --- /dev/null +++ b/config_space_fix.patch @@ -0,0 +1,27 @@ +Index: multipath-tools/libmultipath/parser.c +=================================================================== +--- multipath-tools.orig/libmultipath/parser.c ++++ multipath-tools/libmultipath/parser.c +@@ -239,12 +239,20 @@ alloc_strvec(char *string) + in_string = 0; + else + in_string = 1; ++ } else if (!in_string && (*cp == '{' || *cp == '}')) { ++ cp++; ++ token = MALLOC(2); ++ ++ if (!token) ++ goto out; + ++ *(token) = *cp; ++ *(token + 1) = '\0'; + } else { + while ((in_string || + (!isspace((int) *cp) && isascii((int) *cp) && +- *cp != '!' && *cp != '#')) && +- *cp != '\0' && *cp != '"') ++ *cp != '!' && *cp != '#' && *cp != '{' && ++ *cp != '}')) && *cp != '\0' && *cp != '"') + cp++; + strlen = cp - start; + token = MALLOC(strlen + 1); diff --git a/device-mapper-multipath.spec b/device-mapper-multipath.spec index 9dc1fc3..c6d6f3b 100644 --- a/device-mapper-multipath.spec +++ b/device-mapper-multipath.spec @@ -1,21 +1,24 @@ Summary: Tools to manage multipath devices using device-mapper Name: device-mapper-multipath Version: 0.4.8 -Release: 5%{?dist} +Release: 6%{?dist} License: GPL+ Group: System Environment/Base URL: http://christophe.varoqui.free.fr/ -Source0: multipath-tools-080519.tgz -Patch0: makefiles_fix.patch -Patch1: linking_change.patch -Patch2: uevent_fix.patch -Patch3: sparc64fix.patch -Patch4: directio_fix.patch -Patch5: config_files.patch -Patch6: redhatification.patch -Patch7: mpath_wait.patch -Patch8: multipath_rules.patch -Patch9: cciss_id.patch +Source0: multipath-tools-080804.tgz +Patch0: linking_change.patch +Patch1: uevent_fix.patch +Patch2: sparc64fix.patch +Patch3: directio_fix.patch +Patch4: config_files.patch +Patch5: redhatification.patch +Patch6: mpath_wait.patch +Patch7: multipath_rules.patch +Patch8: cciss_id.patch +Patch9: scsi_id_change.patch +Patch10: static_libaio.patch +Patch11: config_space_fix.patch +Patch12: fix_devt.patch Requires: kpartx = %{version}-%{release} BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Requires(post): chkconfig @@ -41,17 +44,20 @@ Provides: kpartx = %{version}-%{release} kpartx manages partition creation and removal for device-mapper devices. %prep -%setup -q -n multipath-tools-080519 -%patch0 -p1 -b .makefiles_fix -%patch1 -p1 -b .linking_change -%patch2 -p1 -b .uevent_fix -%patch3 -p1 -b .sparc64fix -%patch4 -p1 -b .directio_fix -%patch5 -p1 -b .config_files -%patch6 -p1 -b .redhatification -%patch7 -p1 -b .mpath_wait -%patch8 -p1 -b .multipath_rules -%patch9 -p1 -b .cciss_id +%setup -q -n multipath-tools +%patch0 -p1 -b .linking_change +%patch1 -p1 -b .uevent_fix +%patch2 -p1 -b .sparc64fix +%patch3 -p1 -b .directio_fix +%patch4 -p1 -b .config_files +%patch5 -p1 -b .redhatification +%patch6 -p1 -b .mpath_wait +%patch7 -p1 -b .multipath_rules +%patch8 -p1 -b .cciss_id +%patch9 -p1 -b .scsi_id_change +%patch10 -p1 -b .static_libaio +%patch11 -p1 -b .config_space_fix +%patch12 -p1 -b .fix_devt %build make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT @@ -75,7 +81,7 @@ fi %postun /sbin/ldconfig -if [ "$1" - ge "1" ]; then +if [ "$1" -ge "1" ]; then /sbin/service multipathd condrestart >/dev/null 2>&1 || : fi @@ -103,6 +109,12 @@ fi %{_mandir}/man8/kpartx.8.gz %changelog +* Wed Aug 20 2008 Benjamin Marzinski 0.4.8-6 +- Updated to latest upstream 0.4.8 code: multipath-tools-080804.tgz + (git commit id: eb87cbd0df8adf61d1c74c025f7326d833350f78) +- fixed 451817, 456397 (scsi_id_change.patch), 457530 (config_space_fix.patch) + 457589 (static_libaio.patch) + * Fri Jun 13 2008 Alasdair Kergon - 0.4.8-5 - Rebuild (rogue vendor tag). (451292) diff --git a/fix_devt.patch b/fix_devt.patch new file mode 100644 index 0000000..26239a2 --- /dev/null +++ b/fix_devt.patch @@ -0,0 +1,25 @@ +Index: multipath-tools/libmultipath/discovery.c +=================================================================== +--- multipath-tools.orig/libmultipath/discovery.c ++++ multipath-tools/libmultipath/discovery.c +@@ -252,7 +252,11 @@ devt2devname (char *devname, char *devt) + continue; + + if ((major == tmpmaj) && (minor == tmpmin)) { +- sprintf(block_path, "/sys/block/%s", dev); ++ if (snprintf(block_path, FILE_NAME_SIZE, "/sys/block/%s", dev) >= FILE_NAME_SIZE) { ++ condlog(0, "device name %s is too long\n", dev); ++ fclose(fd); ++ return 1; ++ } + break; + } + } +@@ -270,6 +274,7 @@ devt2devname (char *devname, char *devt) + condlog(0, "sysfs entry %s is not a directory\n", block_path); + return 1; + } ++ basename(block_path, devname); + return 0; + } + diff --git a/makefiles_fix.patch b/makefiles_fix.patch deleted file mode 100644 index 23921c6..0000000 --- a/makefiles_fix.patch +++ /dev/null @@ -1,53 +0,0 @@ -Index: multipath-tools-080519/libmultipath/Makefile -=================================================================== ---- multipath-tools-080519.orig/libmultipath/Makefile -+++ multipath-tools-080519/libmultipath/Makefile -@@ -26,11 +26,11 @@ $(LIBS): $(OBJS) - $(CC) $(SHARED_FLAGS) $(CFLAGS) -o $@ $(OBJS) - - install: -- $(INSTALL_PROGRAM) -o root -g root -m 755 -d $(libdir) -- $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir)/$(LIBS) -+ $(INSTALL_PROGRAM) -m 755 -d $(DESTDIR)$(libdir) -+ $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir)/$(LIBS) - - uninstall: -- rm -f $(libdir)/$(LIBS) -+ rm -f $(DESTDIR)$(libdir)/$(LIBS) - - clean: - rm -f core *.a *.o *.gz *.so -Index: multipath-tools-080519/libmultipath/checkers/Makefile -=================================================================== ---- multipath-tools-080519.orig/libmultipath/checkers/Makefile -+++ multipath-tools-080519/libmultipath/checkers/Makefile -@@ -21,10 +21,10 @@ libcheck%.so: libsg.o %.o - $(CC) $(SHARED_FLAGS) -o $@ $^ - - install: -- $(INSTALL_PROGRAM) -o root -g root -m 755 $(LIBS) $(libdir) -+ $(INSTALL_PROGRAM) -m 755 $(LIBS) $(DESTDIR)$(libdir) - - uninstall: -- rm -f $(libdir)/$(LIBS) -+ rm -f $(DESTDIR)$(libdir)/$(LIBS) - - clean: - rm -f core *.a *.o *.gz *.so -Index: multipath-tools-080519/libmultipath/prioritizers/Makefile -=================================================================== ---- multipath-tools-080519.orig/libmultipath/prioritizers/Makefile -+++ multipath-tools-080519/libmultipath/prioritizers/Makefile -@@ -25,10 +25,10 @@ libprio%.so: %.o - $(CC) $(SHARED_FLAGS) -o $@ $^ - - install: $(LIBS) -- install -m 755 libprio*.so $(libdir) -+ $(INSTALL_PROGRAM) -m 755 libprio*.so $(DESTDIR)$(libdir) - - uninstall: -- rm -f $(libdir)/libprio*.so -+ rm -f $(DESTDIR)$(libdir)/libprio*.so - - clean: - rm -f core *.a *.o *.gz *.so diff --git a/scsi_id_change.patch b/scsi_id_change.patch new file mode 100644 index 0000000..dcb3936 --- /dev/null +++ b/scsi_id_change.patch @@ -0,0 +1,478 @@ +Index: multipath-tools/libmultipath/defaults.h +=================================================================== +--- multipath-tools.orig/libmultipath/defaults.h ++++ multipath-tools/libmultipath/defaults.h +@@ -1,4 +1,4 @@ +-#define DEFAULT_GETUID "/sbin/scsi_id -g -u -s /block/%n" ++#define DEFAULT_GETUID "/sbin/scsi_id --whitelisted /dev/%n" + #define DEFAULT_UDEVDIR "/dev" + #define DEFAULT_MULTIPATHDIR "/lib/multipath" + #define DEFAULT_SELECTOR "round-robin 0" +Index: multipath-tools/libmultipath/hwtable.c +=================================================================== +--- multipath-tools.orig/libmultipath/hwtable.c ++++ multipath-tools/libmultipath/hwtable.c +@@ -172,7 +172,7 @@ static struct hwentry default_hw[] = { + /* HP Smart Array */ + .vendor = "HP", + .product = "LOGICAL VOLUME.*", +- .getuid = "/sbin/scsi_id -n -g -u -s /block/%n", ++ .getuid = "/sbin/scsi_id --whitelisted /dev/%n", + .features = DEFAULT_FEATURES, + .hwhandler = DEFAULT_HWHANDLER, + .selector = DEFAULT_SELECTOR, +@@ -214,7 +214,7 @@ static struct hwentry default_hw[] = { + { + .vendor = "EMC", + .product = "SYMMETRIX", +- .getuid = "/sbin/scsi_id -g -u -ppre-spc3-83 -s /block/%n", ++ .getuid = "/sbin/scsi_id --page=pre-spc3-83 --whitelisted /dev/%n", + .features = DEFAULT_FEATURES, + .hwhandler = DEFAULT_HWHANDLER, + .selector = DEFAULT_SELECTOR, +@@ -679,7 +679,7 @@ static struct hwentry default_hw[] = { + { + .vendor = "PIVOT3", + .product = "RAIGE VOLUME", +- .getuid = "/sbin/scsi_id -p 0x80 -g -u -s /block/%n", ++ .getuid = "/sbin/scsi_id --page=0x80 --whitelisted /dev/%n", + .features = "1 queue_if_no_path", + .hwhandler = DEFAULT_HWHANDLER, + .selector = DEFAULT_SELECTOR, +Index: multipath-tools/multipath.conf.annotated +=================================================================== +--- multipath-tools.orig/multipath.conf.annotated ++++ multipath-tools/multipath.conf.annotated +@@ -55,9 +55,9 @@ + # # scope : multipath + # # desc : the default program and args to callout to obtain a unique + # # path identifier. Absolute path required +-# # default : /sbin/scsi_id -g -u -s ++# # default : /sbin/scsi_id --whitelisted + # # +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # + # # + # # name : prio +@@ -336,7 +336,7 @@ + # # desc : the program and args to callout to obtain a unique + # # path identifier. Absolute path required + # # +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # + # # + # # name : path_selector +Index: multipath-tools/multipath.conf.defaults +=================================================================== +--- multipath-tools.orig/multipath.conf.defaults ++++ multipath-tools/multipath.conf.defaults +@@ -6,7 +6,7 @@ + # polling_interval 5 + # selector "round-robin 0" + # path_grouping_policy failover +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # prio const + # path_checker directio + # rr_min_io 1000 +@@ -26,7 +26,7 @@ + # device { + # vendor "APPLE*" + # product "Xserve RAID" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -39,7 +39,7 @@ + # device { + # vendor "3PARdata" + # product "VV" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -52,7 +52,7 @@ + # device { + # vendor "DEC" + # product "HSG80" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "1 hp-sw" + # path_selector "round-robin 0" +@@ -65,7 +65,7 @@ + # device { + # vendor "HP" + # product "A6189A" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -79,7 +79,7 @@ + # device { + # vendor "(COMPAQ|HP)" + # product "(MSA|HSV)1.0.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "1 hp-sw" + # path_selector "round-robin 0" +@@ -93,7 +93,7 @@ + # device { + # vendor "HP" + # product "MSA VOLUME" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -123,7 +123,7 @@ + # device { + # vendor "(COMPAQ|HP)" + # product "HSV1[01]1|HSV2[01]0|HSV300" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -138,7 +138,7 @@ + # device { + # vendor "HP" + # product "MSA2[02]12*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -153,7 +153,7 @@ + # device { + # vendor "HP" + # product "LOGICAL VOLUME.*" +-# getuid_callout "/sbin/scsi_id -n -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -168,7 +168,7 @@ + # device { + # vendor "DDN" + # product "SAN DataDirector" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -181,7 +181,7 @@ + # device { + # vendor "EMC" + # product "SYMMETRIX" +-# getuid_callout "/sbin/scsi_id -g -u -ppre-spc3-83 -s /block/%n" ++# getuid_callout "/sbin/scsi_id --page=pre-spc3-83 --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -195,7 +195,7 @@ + # vendor "DGC" + # product ".*" + # product_blacklist "LUNZ" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # prio_callout "/sbin/mpath_prio_emc /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "1 emc" +@@ -211,7 +211,7 @@ + # device { + # vendor "FSC" + # product "CentricStor" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -224,7 +224,7 @@ + # device { + # vendor "(HITACHI|HP)" + # product "OPEN-.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -237,7 +237,7 @@ + # device { + # vendor "HITACHI" + # product "DF.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -251,7 +251,7 @@ + # device { + # vendor "IBM" + # product "ProFibre 4000R" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -264,7 +264,7 @@ + # device { + # vendor "IBM" + # product "1722-600" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -279,7 +279,7 @@ + # device { + # vendor "IBM" + # product "1742" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -294,7 +294,7 @@ + # device { + # vendor "IBM" + # product "1814" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -309,7 +309,7 @@ + # device { + # vendor "IBM" + # product "1815" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -324,7 +324,7 @@ + # device { + # vendor "IBM" + # product "3526" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -339,7 +339,7 @@ + # device { + # vendor "IBM" + # product "3542" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -352,7 +352,7 @@ + # device { + # vendor "IBM" + # product "2105(800|F20)" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -365,7 +365,7 @@ + # device { + # vendor "IBM" + # product "1750500" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -379,7 +379,7 @@ + # device { + # vendor "IBM" + # product "2107900" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -392,7 +392,7 @@ + # device { + # vendor "IBM" + # product "2145" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -420,7 +420,7 @@ + # device { + # vendor "NETAPP" + # product "LUN.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -434,7 +434,7 @@ + # device { + # vendor "IBM" + # product "Nseries.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -448,7 +448,7 @@ + # device { + # vendor "Pillar" + # product "Axiom.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -461,7 +461,7 @@ + # device { + # vendor "SGI" + # product "TP9[13]00" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -474,7 +474,7 @@ + # device { + # vendor "SGI" + # product "TP9[45]00" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -489,7 +489,7 @@ + # device { + # vendor "SGI" + # product "IS.*" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -504,7 +504,7 @@ + # device { + # vendor "STK" + # product "OPENstorage D280" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -518,7 +518,7 @@ + # device { + # vendor "SUN" + # product "(StorEdge 3510|T4)" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -531,7 +531,7 @@ + # device { + # vendor "PIVOT3" + # product "RAIGE VOLUME" +-# getuid_callout "/sbin/scsi_id -p 0x80 -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --page=0x80 --whitelisted /dev/%n" + # features "1 queue_if_no_path" + # hardware_handler "0" + # path_selector "round-robin 0" +@@ -544,7 +544,7 @@ + # device { + # vendor "SUN" + # product "CSM200_R" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -559,7 +559,7 @@ + # device { + # vendor "SUN" + # product "LCSM100_F" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +@@ -574,7 +574,7 @@ + # device { + # vendor "DELL" + # product "MD3000" +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # features "0" + # hardware_handler "1 rdac" + # path_selector "round-robin 0" +Index: multipath-tools/multipath.conf.synthetic +=================================================================== +--- multipath-tools.orig/multipath.conf.synthetic ++++ multipath-tools/multipath.conf.synthetic +@@ -7,7 +7,7 @@ + # polling_interval 10 + # selector "round-robin 0" + # path_grouping_policy multibus +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /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 "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id -whitelisted /block/%n" + # path_checker directio + # path_selector "round-robin 0" + # hardware_handler "0" +Index: multipath-tools/multipath/multipath.conf.5 +=================================================================== +--- multipath-tools.orig/multipath/multipath.conf.5 ++++ multipath-tools/multipath/multipath.conf.5 +@@ -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 -s ++.I /lib/udev/scsi_id --whitelisted + .TP + .B prio_callout + The default program and args to callout to obtain a path priority +Index: multipath-tools/multipath/multipath.conf.redhat +=================================================================== +--- multipath-tools.orig/multipath/multipath.conf.redhat ++++ multipath-tools/multipath/multipath.conf.redhat +@@ -35,7 +35,7 @@ defaults { + # polling_interval 10 + # selector "round-robin 0" + # path_grouping_policy multibus +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # prio alua + # path_checker readsector0 + # rr_min_io 100 +@@ -81,7 +81,7 @@ defaults { + # vendor "COMPAQ " + # product "HSV110 (C)COMPAQ" + # path_grouping_policy multibus +-# getuid_callout "/sbin/scsi_id -g -u -s /block/%n" ++# getuid_callout "/sbin/scsi_id --whitelisted /dev/%n" + # path_checker readsector0 + # path_selector "round-robin 0" + # hardware_handler "0" diff --git a/sources b/sources index a9e1645..3ef0dff 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -30b9482582f73c7c8e1bf8d816d30bbf multipath-tools-080519.tgz +3ffa9a7f768fab9749689fe2624a8551 multipath-tools-080804.tgz diff --git a/static_libaio.patch b/static_libaio.patch new file mode 100644 index 0000000..43c80e3 --- /dev/null +++ b/static_libaio.patch @@ -0,0 +1,22 @@ +Index: multipath-tools/multipath/Makefile +=================================================================== +--- multipath-tools.orig/multipath/Makefile ++++ multipath-tools/multipath/Makefile +@@ -7,7 +7,7 @@ include ../Makefile.inc + OBJS = main.o + + CFLAGS += -I$(multipathdir) +-LDFLAGS += -lpthread -ldevmapper -laio -ldl \ ++LDFLAGS += -lpthread -ldevmapper -Wl,-Bstatic,-laio,-Bdynamic -ldl \ + -lmultipath -L$(multipathdir) + + EXEC = multipath +@@ -15,7 +15,7 @@ EXEC = multipath + all: $(EXEC) + + $(EXEC): $(OBJS) +- $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) ++ $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) -Wl,-undefined=io_submit,-undefined=io_getevents,-undefined=io_destroy,-undefined=io_setup $(LDFLAGS) -rdynamic + $(GZIP) $(EXEC).8 > $(EXEC).8.gz + $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz + diff --git a/uevent_debug.patch b/uevent_debug.patch deleted file mode 100644 index 39c424d..0000000 --- a/uevent_debug.patch +++ /dev/null @@ -1,28 +0,0 @@ -Index: multipath-tools-080515/multipathd/main.c -=================================================================== ---- multipath-tools-080515.orig/multipathd/main.c -+++ multipath-tools-080515/multipathd/main.c -@@ -619,14 +619,20 @@ uxsock_trigger (char * str, char ** repl - static int - uev_discard(char * devpath) - { -+ char *tmp; - char a[10], b[10]; - - /* - * keep only block devices, discard partitions - */ -- if (sscanf(devpath, "/block/%10s", a) != 1 || -- sscanf(devpath, "/block/%10[^/]/%10s", a, b) == 2) { -- condlog(4, "discard event on %s", devpath); -+ tmp = strstr(devpath, "/block/"); -+ if (tmp == NULL){ -+ condlog(0, "no /block/ in '%s'", devpath); -+ return 1; -+ } -+ if (sscanf(tmp, "/block/%10s", a) != 1 || -+ sscanf(tmp, "/block/%10[^/]/%10s", a, b) == 2) { -+ condlog(0, "discard event on %s", devpath); - return 1; - } - return 0; -- cgit