commit 9192a4abe39cafffc520f46813600d7371635af0 Author: CentOS Sources Date: Tue Apr 28 05:35:36 2020 -0400 import device-mapper-multipath-0.8.3-3.el8 diff --git a/.device-mapper-multipath.metadata b/.device-mapper-multipath.metadata new file mode 100644 index 0000000..1dca87b --- /dev/null +++ b/.device-mapper-multipath.metadata @@ -0,0 +1 @@ +f700dc1e4ce1d6952051467d4b245f9bd80286e3 SOURCES/multipath-tools-0.8.3.tgz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d47c38 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/multipath-tools-0.8.3.tgz diff --git a/SOURCES/0001-multipathd-warn-when-configuration-has-been-changed.patch b/SOURCES/0001-multipathd-warn-when-configuration-has-been-changed.patch new file mode 100644 index 0000000..207eac8 --- /dev/null +++ b/SOURCES/0001-multipathd-warn-when-configuration-has-been-changed.patch @@ -0,0 +1,277 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 19 Sep 2019 13:46:03 -0500 +Subject: [PATCH] multipathd: warn when configuration has been changed. + +It would be helpful if multipathd could log a message when +multipath.conf or files in the config_dir have been written to, both so +that it can be used to send a notification to users, and to help with +determining after the fact if multipathd was running with an older +config, when the logs of multipathd's behaviour don't match with the +current multipath.conf. + +To do this, the multipathd uxlsnr thread now sets up inotify watches on +both /etc/multipath.conf and the config_dir to watch if the files are +deleted or closed after being opened for writing. In order to keep +uxlsnr from polling repeatedly if the multipath.conf or the config_dir +aren't present, it will only set up the watches once per reconfigure. +However, since multipath.conf is far more likely to be replaced by a +text editor than modified in place, if it gets removed, multipathd will +immediately try to restart the watch on it (which will succeed if the +file was simply replaced by a new copy). This does mean that if +multipath.conf or the config_dir are actually removed and then later +re-added, multipathd won't log any more messages for changes until the +next reconfigure. But that seems like a fair trade-off to avoid +repeatedly polling for files that aren't likely to appear. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/config.h | 1 + + multipathd/main.c | 1 + + multipathd/uxlsnr.c | 134 ++++++++++++++++++++++++++++++++++++++++-- + 3 files changed, 130 insertions(+), 6 deletions(-) + +diff --git a/libmultipath/config.h b/libmultipath/config.h +index ffec3103..e69aa07c 100644 +--- a/libmultipath/config.h ++++ b/libmultipath/config.h +@@ -188,6 +188,7 @@ struct config { + int find_multipaths_timeout; + int marginal_pathgroups; + unsigned int version[3]; ++ unsigned int sequence_nr; + + char * multipath_dir; + char * selector; +diff --git a/multipathd/main.c b/multipathd/main.c +index 34a57689..7b364cfe 100644 +--- a/multipathd/main.c ++++ b/multipathd/main.c +@@ -2618,6 +2618,7 @@ reconfigure (struct vectors * vecs) + uxsock_timeout = conf->uxsock_timeout; + + old = rcu_dereference(multipath_conf); ++ conf->sequence_nr = old->sequence_nr + 1; + rcu_assign_pointer(multipath_conf, conf); + call_rcu(&old->rcu, rcu_free_config); + +diff --git a/multipathd/uxlsnr.c b/multipathd/uxlsnr.c +index bc71679e..92d9a79a 100644 +--- a/multipathd/uxlsnr.c ++++ b/multipathd/uxlsnr.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include "checkers.h" + #include "memory.h" + #include "debug.h" +@@ -51,6 +52,8 @@ struct client { + LIST_HEAD(clients); + pthread_mutex_t client_lock = PTHREAD_MUTEX_INITIALIZER; + struct pollfd *polls; ++int notify_fd = -1; ++char *config_dir; + + static bool _socket_client_is_root(int fd); + +@@ -151,6 +154,8 @@ void uxsock_cleanup(void *arg) + long ux_sock = (long)arg; + + close(ux_sock); ++ close(notify_fd); ++ free(config_dir); + + pthread_mutex_lock(&client_lock); + list_for_each_entry_safe(client_loop, client_tmp, &clients, node) { +@@ -162,6 +167,106 @@ void uxsock_cleanup(void *arg) + free_polls(); + } + ++/* failing to set the watch descriptor is o.k. we just miss a warning ++ * message */ ++void reset_watch(int notify_fd, int *wds, unsigned int *sequence_nr) ++{ ++ struct config *conf; ++ int dir_reset = 0; ++ int conf_reset = 0; ++ ++ if (notify_fd == -1) ++ return; ++ ++ conf = get_multipath_config(); ++ /* instead of repeatedly try to reset the inotify watch if ++ * the config directory or multipath.conf isn't there, just ++ * do it once per reconfigure */ ++ if (*sequence_nr != conf->sequence_nr) { ++ *sequence_nr = conf->sequence_nr; ++ if (wds[0] == -1) ++ conf_reset = 1; ++ if (!config_dir || !conf->config_dir || ++ strcmp(config_dir, conf->config_dir)) { ++ dir_reset = 1; ++ if (config_dir) ++ free(config_dir); ++ if (conf->config_dir) ++ config_dir = strdup(conf->config_dir); ++ else ++ config_dir = NULL; ++ } else if (wds[1] == -1) ++ dir_reset = 1; ++ } ++ put_multipath_config(conf); ++ ++ if (dir_reset) { ++ if (wds[1] != -1) { ++ inotify_rm_watch(notify_fd, wds[1]); ++ wds[1] = -1; ++ } ++ if (config_dir) { ++ wds[1] = inotify_add_watch(notify_fd, config_dir, ++ IN_CLOSE_WRITE | IN_DELETE | ++ IN_ONLYDIR); ++ if (wds[1] == -1) ++ condlog(3, "didn't set up notifications on %s: %s", config_dir, strerror(errno)); ++ } ++ } ++ if (conf_reset) { ++ wds[0] = inotify_add_watch(notify_fd, DEFAULT_CONFIGFILE, ++ IN_CLOSE_WRITE); ++ if (wds[0] == -1) ++ condlog(3, "didn't set up notifications on /etc/multipath.conf: %s", strerror(errno)); ++ } ++ return; ++} ++ ++void handle_inotify(int fd, int *wds) ++{ ++ char buff[1024] ++ __attribute__ ((aligned(__alignof__(struct inotify_event)))); ++ const struct inotify_event *event; ++ ssize_t len; ++ char *ptr; ++ int i, got_notify = 0; ++ ++ for (;;) { ++ len = read(fd, buff, sizeof(buff)); ++ if (len <= 0) { ++ if (len < 0 && errno != EAGAIN) { ++ condlog(3, "error reading from inotify_fd"); ++ for (i = 0; i < 2; i++) { ++ if (wds[i] != -1) { ++ inotify_rm_watch(fd, wds[i]); ++ wds[i] = -1; ++ } ++ } ++ } ++ break; ++ } ++ ++ got_notify = 1; ++ for (ptr = buff; ptr < buff + len; ++ ptr += sizeof(struct inotify_event) + event->len) { ++ event = (const struct inotify_event *) ptr; ++ ++ if (event->mask & IN_IGNORED) { ++ /* multipathd.conf may have been overwritten. ++ * Try once to reset the notification */ ++ if (wds[0] == event->wd) ++ wds[0] = inotify_add_watch(notify_fd, ++ DEFAULT_CONFIGFILE, ++ IN_CLOSE_WRITE); ++ else if (wds[1] == event->wd) ++ wds[1] = -1; ++ } ++ } ++ } ++ if (got_notify) ++ condlog(1, "Multipath configuration updated.\nReload multipathd for changes to take effect"); ++} ++ + /* + * entry point + */ +@@ -173,13 +278,19 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, + char *reply; + sigset_t mask; + int old_clients = MIN_POLLS; ++ /* conf->sequence_nr will be 1 when uxsock_listen is first called */ ++ unsigned int sequence_nr = 0; ++ int wds[2] = { -1, -1 }; + + condlog(3, "uxsock: startup listener"); +- polls = (struct pollfd *)MALLOC((MIN_POLLS + 1) * sizeof(struct pollfd)); ++ polls = (struct pollfd *)MALLOC((MIN_POLLS + 2) * sizeof(struct pollfd)); + if (!polls) { + condlog(0, "uxsock: failed to allocate poll fds"); + exit_daemon(); + } ++ notify_fd = inotify_init1(IN_NONBLOCK); ++ if (notify_fd == -1) /* it's fine if notifications fail */ ++ condlog(3, "failed to start up configuration notifications"); + sigfillset(&mask); + sigdelset(&mask, SIGINT); + sigdelset(&mask, SIGTERM); +@@ -198,18 +309,18 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, + if (num_clients != old_clients) { + struct pollfd *new; + if (num_clients <= MIN_POLLS && old_clients > MIN_POLLS) { +- new = REALLOC(polls, (1 + MIN_POLLS) * ++ new = REALLOC(polls, (2 + MIN_POLLS) * + sizeof(struct pollfd)); + } else if (num_clients <= MIN_POLLS && old_clients <= MIN_POLLS) { + new = polls; + } else { +- new = REALLOC(polls, (1+num_clients) * ++ new = REALLOC(polls, (2 + num_clients) * + sizeof(struct pollfd)); + } + if (!new) { + pthread_mutex_unlock(&client_lock); + condlog(0, "%s: failed to realloc %d poll fds", +- "uxsock", 1 + num_clients); ++ "uxsock", 2 + num_clients); + sched_yield(); + continue; + } +@@ -219,8 +330,15 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, + polls[0].fd = ux_sock; + polls[0].events = POLLIN; + ++ reset_watch(notify_fd, wds, &sequence_nr); ++ if (notify_fd == -1 || (wds[0] == -1 && wds[1] == -1)) ++ polls[1].fd = -1; ++ else ++ polls[1].fd = notify_fd; ++ polls[1].events = POLLIN; ++ + /* setup the clients */ +- i = 1; ++ i = 2; + list_for_each_entry(c, &clients, node) { + polls[i].fd = c->fd; + polls[i].events = POLLIN; +@@ -262,7 +380,7 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, + } + + /* see if a client wants to speak to us */ +- for (i = 1; i < num_clients + 1; i++) { ++ for (i = 2; i < num_clients + 2; i++) { + if (polls[i].revents & POLLIN) { + struct timespec start_time; + +@@ -321,6 +439,10 @@ void * uxsock_listen(uxsock_trigger_fn uxsock_trigger, long ux_sock, + if (polls[0].revents & POLLIN) { + new_client(ux_sock); + } ++ ++ /* handle inotify events on config files */ ++ if (polls[1].revents & POLLIN) ++ handle_inotify(notify_fd, wds); + } + + return NULL; +-- +2.17.2 + diff --git a/SOURCES/0002-libmultipath-fix-leak-in-foreign-code.patch b/SOURCES/0002-libmultipath-fix-leak-in-foreign-code.patch new file mode 100644 index 0000000..3ee5965 --- /dev/null +++ b/SOURCES/0002-libmultipath-fix-leak-in-foreign-code.patch @@ -0,0 +1,59 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Mon, 7 Oct 2019 17:17:13 -0500 +Subject: [PATCH] libmultipath: fix leak in foreign code + +If scandir fails or finds no foreign libraries, enable_re needs to be +freed before exitting. + +Fixes: 8d03eda4 'multipath.conf: add "enable_foreign" parameter' +Signed-off-by: Benjamin Marzinski +--- + libmultipath/foreign.c | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +diff --git a/libmultipath/foreign.c b/libmultipath/foreign.c +index 4b34e141..68e9a9b8 100644 +--- a/libmultipath/foreign.c ++++ b/libmultipath/foreign.c +@@ -129,7 +129,7 @@ static int _init_foreign(const char *multipath_dir, const char *enable) + char pathbuf[PATH_MAX]; + struct dirent **di; + struct scandir_result sr; +- int r, i; ++ int r, i, ret = 0; + regex_t *enable_re = NULL; + + foreigns = vector_alloc(); +@@ -157,13 +157,15 @@ static int _init_foreign(const char *multipath_dir, const char *enable) + if (r == 0) { + condlog(3, "%s: no foreign multipath libraries found", + __func__); +- return 0; ++ ret = 0; ++ goto out; + } else if (r < 0) { + r = errno; + condlog(1, "%s: error %d scanning foreign multipath libraries", + __func__, r); + _cleanup_foreign(); +- return -r; ++ ret = -r; ++ goto out; + } + + sr.di = di; +@@ -250,8 +252,9 @@ static int _init_foreign(const char *multipath_dir, const char *enable) + free_foreign(fgn); + } + pthread_cleanup_pop(1); /* free_scandir_result */ ++out: + pthread_cleanup_pop(1); /* free_pre */ +- return 0; ++ return ret; + } + + int init_foreign(const char *multipath_dir, const char *enable) +-- +2.17.2 + diff --git a/SOURCES/0003-Fix-leak-in-mpathpersist.patch b/SOURCES/0003-Fix-leak-in-mpathpersist.patch new file mode 100644 index 0000000..b9bc55e --- /dev/null +++ b/SOURCES/0003-Fix-leak-in-mpathpersist.patch @@ -0,0 +1,28 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 8 Oct 2019 10:17:11 -0500 +Subject: [PATCH] Fix leak in mpathpersist + +If the persistent in command fails, the response buffer must be freed. +Found by Coverity + +Signed-off-by: Benjamin Marzinski +--- + mpathpersist/main.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/mpathpersist/main.c b/mpathpersist/main.c +index 278b8d51..920e686c 100644 +--- a/mpathpersist/main.c ++++ b/mpathpersist/main.c +@@ -499,6 +499,7 @@ static int handle_args(int argc, char * argv[], int nline) + if (ret != MPATH_PR_SUCCESS ) + { + fprintf (stderr, "Persistent Reserve IN command failed\n"); ++ free(resp); + goto out_fd; + } + +-- +2.17.2 + diff --git a/SOURCES/0004-libmultipath-remove-unused-path-prio_args.patch b/SOURCES/0004-libmultipath-remove-unused-path-prio_args.patch new file mode 100644 index 0000000..0274032 --- /dev/null +++ b/SOURCES/0004-libmultipath-remove-unused-path-prio_args.patch @@ -0,0 +1,25 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 5 Nov 2019 13:53:29 -0600 +Subject: [PATCH] libmultipath: remove unused path->prio_args + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/structs.h | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/libmultipath/structs.h b/libmultipath/structs.h +index a3adf906..1c32a799 100644 +--- a/libmultipath/structs.h ++++ b/libmultipath/structs.h +@@ -272,7 +272,6 @@ struct path { + char * uid_attribute; + char * getuid; + struct prio prio; +- char * prio_args; + struct checker checker; + struct multipath * mpp; + int fd; +-- +2.17.2 + diff --git a/SOURCES/0005-libmultipath-constify-get_unaligned_be.patch b/SOURCES/0005-libmultipath-constify-get_unaligned_be.patch new file mode 100644 index 0000000..415e061 --- /dev/null +++ b/SOURCES/0005-libmultipath-constify-get_unaligned_be.patch @@ -0,0 +1,34 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Wed, 6 Nov 2019 16:49:40 -0600 +Subject: [PATCH] libmultipath: constify get_unaligned_be* + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/unaligned.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libmultipath/unaligned.h b/libmultipath/unaligned.h +index 68c07742..b9eaa7cb 100644 +--- a/libmultipath/unaligned.h ++++ b/libmultipath/unaligned.h +@@ -10,14 +10,14 @@ static inline uint16_t get_unaligned_be16(const void *ptr) + return p[0] << 8 | p[1]; + } + +-static inline uint32_t get_unaligned_be32(void *ptr) ++static inline uint32_t get_unaligned_be32(const void *ptr) + { + const uint8_t *p = ptr; + + return p[0] << 24 | p[1] << 16 | p[2] << 8 | p[3]; + } + +-static inline uint64_t get_unaligned_be64(void *ptr) ++static inline uint64_t get_unaligned_be64(const void *ptr) + { + uint32_t low = get_unaligned_be32(ptr + 4); + uint64_t high = get_unaligned_be32(ptr); +-- +2.17.2 + diff --git a/SOURCES/0006-libmultipath-add-missing-hwe-mpe-variable-merges.patch b/SOURCES/0006-libmultipath-add-missing-hwe-mpe-variable-merges.patch new file mode 100644 index 0000000..e3a3fbc --- /dev/null +++ b/SOURCES/0006-libmultipath-add-missing-hwe-mpe-variable-merges.patch @@ -0,0 +1,49 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Tue, 5 Nov 2019 12:37:58 -0600 +Subject: [PATCH] libmultipath: add missing hwe mpe variable merges + +There were some variables in the hwe and mpe structs that weren't being +merged by merge_hwe() and merge_mpe(). + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/config.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 20e3b8bf..85626e96 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -372,6 +372,10 @@ merge_hwe (struct hwentry * dst, struct hwentry * src) + merge_num(san_path_err_threshold); + merge_num(san_path_err_forget_rate); + merge_num(san_path_err_recovery_time); ++ merge_num(marginal_path_err_sample_time); ++ merge_num(marginal_path_err_rate_threshold); ++ merge_num(marginal_path_err_recheck_gap_time); ++ merge_num(marginal_path_double_failed_time); + + snprintf(id, sizeof(id), "%s/%s", dst->vendor, dst->product); + reconcile_features_with_options(id, &dst->features, +@@ -397,6 +401,7 @@ merge_mpe(struct mpentry *dst, struct mpentry *src) + if (dst->prkey_source == PRKEY_SOURCE_NONE && + src->prkey_source != PRKEY_SOURCE_NONE) { + dst->prkey_source = src->prkey_source; ++ dst->sa_flags = src->sa_flags; + memcpy(&dst->reservation_key, &src->reservation_key, + sizeof(dst->reservation_key)); + } +@@ -413,6 +418,9 @@ merge_mpe(struct mpentry *dst, struct mpentry *src) + merge_num(deferred_remove); + merge_num(delay_watch_checks); + merge_num(delay_wait_checks); ++ merge_num(san_path_err_threshold); ++ merge_num(san_path_err_forget_rate); ++ merge_num(san_path_err_recovery_time); + merge_num(marginal_path_err_sample_time); + merge_num(marginal_path_err_rate_threshold); + merge_num(marginal_path_err_recheck_gap_time); +-- +2.17.2 + diff --git a/SOURCES/0007-libmultipath-fix-sgio_get_vpd-looping.patch b/SOURCES/0007-libmultipath-fix-sgio_get_vpd-looping.patch new file mode 100644 index 0000000..a6fcc31 --- /dev/null +++ b/SOURCES/0007-libmultipath-fix-sgio_get_vpd-looping.patch @@ -0,0 +1,204 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Fri, 1 Nov 2019 10:33:04 -0500 +Subject: [PATCH] libmultipath: fix sgio_get_vpd looping + +If do_inq returns a page with a length that is less than maxlen, but +larger than DEFAULT_SGIO_LEN, this function will loop forever. Also +if do_inq returns with a length equal to or greater than maxlen, +sgio_get_vpd will exit immediately, even if it hasn't read the entire +page. Fix these issues, modify the tests to verify the new behavior. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/discovery.c | 12 +++--- + tests/vpd.c | 84 ++++++++++++++++++++++++---------------- + 2 files changed, 57 insertions(+), 39 deletions(-) + +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index 72f455e8..3c72a80a 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -870,6 +870,7 @@ static int + sgio_get_vpd (unsigned char * buff, int maxlen, int fd, int pg) + { + int len = DEFAULT_SGIO_LEN; ++ int rlen; + + if (fd < 0) { + errno = EBADF; +@@ -877,12 +878,11 @@ sgio_get_vpd (unsigned char * buff, int maxlen, int fd, int pg) + } + retry: + if (0 == do_inq(fd, 0, 1, pg, buff, len)) { +- len = get_unaligned_be16(&buff[2]) + 4; +- if (len >= maxlen) +- return len; +- if (len > DEFAULT_SGIO_LEN) +- goto retry; +- return len; ++ rlen = get_unaligned_be16(&buff[2]) + 4; ++ if (rlen <= len || len >= maxlen) ++ return rlen; ++ len = (rlen < maxlen)? rlen : maxlen; ++ goto retry; + } + return -1; + } +diff --git a/tests/vpd.c b/tests/vpd.c +index d9f80eaa..4dbce010 100644 +--- a/tests/vpd.c ++++ b/tests/vpd.c +@@ -306,7 +306,7 @@ static int create_vpd83(unsigned char *buf, size_t bufsiz, const char *id, + default: + break; + } +- put_unaligned_be16(n, buf + 2); ++ put_unaligned_be16(bufsiz, buf + 2); + return n + 4; + } + +@@ -429,6 +429,8 @@ static void test_vpd_vnd_ ## len ## _ ## wlen(void **state) \ + free(exp_wwid); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ ++ will_return(__wrap_ioctl, n); \ ++ will_return(__wrap_ioctl, vt->vpdbuf); \ + ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_vnd_" #len "_" #wlen, \ + exp_len, ret, '1', 0, false, \ +@@ -459,6 +461,8 @@ static void test_vpd_str_ ## typ ## _ ## len ## _ ## wlen(void **state) \ + exp_len = wlen - 1; \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ ++ will_return(__wrap_ioctl, n); \ ++ will_return(__wrap_ioctl, vt->vpdbuf); \ + ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_str_" #typ "_" #len "_" #wlen, \ + exp_len, ret, byte0[type], 0, \ +@@ -496,6 +500,8 @@ static void test_vpd_naa_ ## naa ## _ ## wlen(void **state) \ + 3, naa, 0); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ ++ will_return(__wrap_ioctl, n); \ ++ will_return(__wrap_ioctl, vt->vpdbuf); \ + ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_naa_" #naa "_" #wlen, \ + exp_len, ret, '3', '0' + naa, true, \ +@@ -506,22 +512,26 @@ static void test_vpd_naa_ ## naa ## _ ## wlen(void **state) \ + * test_vpd_eui_LEN_WLEN() - test code for VPD 83, EUI64 + * @LEN: EUI64 length (8, 12, or 16) + * @WLEN: WWID buffer size ++ * @SML: Use small VPD page size + */ +-#define make_test_vpd_eui(len, wlen) \ +-static void test_vpd_eui_ ## len ## _ ## wlen(void **state) \ ++#define make_test_vpd_eui(len, wlen, sml) \ ++static void test_vpd_eui_ ## len ## _ ## wlen ## _ ## sml(void **state) \ + { \ + struct vpdtest *vt = *state; \ + int n, ret; \ + /* returned size is always uneven */ \ + int exp_len = wlen > 2 * len + 1 ? 2 * len + 1 : \ + wlen % 2 == 0 ? wlen - 1 : wlen - 2; \ ++ int bufsize = sml ? 255 : sizeof(vt->vpdbuf); \ + \ +- n = create_vpd83(vt->vpdbuf, sizeof(vt->vpdbuf), test_id, \ ++ n = create_vpd83(vt->vpdbuf, bufsize, test_id, \ + 2, 0, len); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ ++ will_return(__wrap_ioctl, n); \ ++ will_return(__wrap_ioctl, vt->vpdbuf); \ + ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ +- assert_correct_wwid("test_vpd_eui_" #len "_" #wlen, \ ++ assert_correct_wwid("test_vpd_eui_" #len "_" #wlen "_" #sml, \ + exp_len, ret, '2', 0, true, \ + test_id, vt->wwid); \ + } +@@ -603,25 +613,30 @@ make_test_vpd_vnd(20, 10); + make_test_vpd_vnd(10, 10); + + /* EUI64 tests */ ++/* small vpd page test */ ++make_test_vpd_eui(8, 32, 1); ++make_test_vpd_eui(12, 32, 1); ++make_test_vpd_eui(16, 40, 1); ++ + /* 64bit, WWID size: 18 */ +-make_test_vpd_eui(8, 32); +-make_test_vpd_eui(8, 18); +-make_test_vpd_eui(8, 17); +-make_test_vpd_eui(8, 16); +-make_test_vpd_eui(8, 10); ++make_test_vpd_eui(8, 32, 0); ++make_test_vpd_eui(8, 18, 0); ++make_test_vpd_eui(8, 17, 0); ++make_test_vpd_eui(8, 16, 0); ++make_test_vpd_eui(8, 10, 0); + + /* 96 bit, WWID size: 26 */ +-make_test_vpd_eui(12, 32); +-make_test_vpd_eui(12, 26); +-make_test_vpd_eui(12, 25); +-make_test_vpd_eui(12, 20); +-make_test_vpd_eui(12, 10); ++make_test_vpd_eui(12, 32, 0); ++make_test_vpd_eui(12, 26, 0); ++make_test_vpd_eui(12, 25, 0); ++make_test_vpd_eui(12, 20, 0); ++make_test_vpd_eui(12, 10, 0); + + /* 128 bit, WWID size: 34 */ +-make_test_vpd_eui(16, 40); +-make_test_vpd_eui(16, 34); +-make_test_vpd_eui(16, 33); +-make_test_vpd_eui(16, 20); ++make_test_vpd_eui(16, 40, 0); ++make_test_vpd_eui(16, 34, 0); ++make_test_vpd_eui(16, 33, 0); ++make_test_vpd_eui(16, 20, 0); + + /* NAA IEEE registered extended (36), WWID size: 34 */ + make_test_vpd_naa(6, 40); +@@ -722,20 +737,23 @@ static int test_vpd(void) + cmocka_unit_test(test_vpd_vnd_19_20), + cmocka_unit_test(test_vpd_vnd_20_10), + cmocka_unit_test(test_vpd_vnd_10_10), +- cmocka_unit_test(test_vpd_eui_8_32), +- cmocka_unit_test(test_vpd_eui_8_18), +- cmocka_unit_test(test_vpd_eui_8_17), +- cmocka_unit_test(test_vpd_eui_8_16), +- cmocka_unit_test(test_vpd_eui_8_10), +- cmocka_unit_test(test_vpd_eui_12_32), +- cmocka_unit_test(test_vpd_eui_12_26), +- cmocka_unit_test(test_vpd_eui_12_25), +- cmocka_unit_test(test_vpd_eui_12_20), +- cmocka_unit_test(test_vpd_eui_12_10), +- cmocka_unit_test(test_vpd_eui_16_40), +- cmocka_unit_test(test_vpd_eui_16_34), +- cmocka_unit_test(test_vpd_eui_16_33), +- cmocka_unit_test(test_vpd_eui_16_20), ++ cmocka_unit_test(test_vpd_eui_8_32_1), ++ cmocka_unit_test(test_vpd_eui_12_32_1), ++ cmocka_unit_test(test_vpd_eui_16_40_1), ++ cmocka_unit_test(test_vpd_eui_8_32_0), ++ cmocka_unit_test(test_vpd_eui_8_18_0), ++ cmocka_unit_test(test_vpd_eui_8_17_0), ++ cmocka_unit_test(test_vpd_eui_8_16_0), ++ cmocka_unit_test(test_vpd_eui_8_10_0), ++ cmocka_unit_test(test_vpd_eui_12_32_0), ++ cmocka_unit_test(test_vpd_eui_12_26_0), ++ cmocka_unit_test(test_vpd_eui_12_25_0), ++ cmocka_unit_test(test_vpd_eui_12_20_0), ++ cmocka_unit_test(test_vpd_eui_12_10_0), ++ cmocka_unit_test(test_vpd_eui_16_40_0), ++ cmocka_unit_test(test_vpd_eui_16_34_0), ++ cmocka_unit_test(test_vpd_eui_16_33_0), ++ cmocka_unit_test(test_vpd_eui_16_20_0), + cmocka_unit_test(test_vpd_naa_6_40), + cmocka_unit_test(test_vpd_naa_6_34), + cmocka_unit_test(test_vpd_naa_6_33), +-- +2.17.2 + diff --git a/SOURCES/0008-libmultipath-add-vend_id-to-get_vpd_sgio.patch b/SOURCES/0008-libmultipath-add-vend_id-to-get_vpd_sgio.patch new file mode 100644 index 0000000..94620cd --- /dev/null +++ b/SOURCES/0008-libmultipath-add-vend_id-to-get_vpd_sgio.patch @@ -0,0 +1,116 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Fri, 1 Nov 2019 12:35:47 -0500 +Subject: [PATCH] libmultipath: add vend_id to get_vpd_sgio + +This tells multipath how it should decode vendor specific pages. It will +be used by a future patch. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/discovery.c | 4 ++-- + libmultipath/discovery.h | 2 +- + libmultipath/propsel.c | 2 +- + tests/vpd.c | 10 +++++----- + 4 files changed, 9 insertions(+), 9 deletions(-) + +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index 3c72a80a..1d79cbae 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -1135,7 +1135,7 @@ get_vpd_sysfs (struct udev_device *parent, int pg, char * str, int maxlen) + } + + int +-get_vpd_sgio (int fd, int pg, char * str, int maxlen) ++get_vpd_sgio (int fd, int pg, int vend_id, char * str, int maxlen) + { + int len, buff_len; + unsigned char buff[4096]; +@@ -1810,7 +1810,7 @@ static ssize_t uid_fallback(struct path *pp, int path_state, + if (len < 0 && path_state == PATH_UP) { + condlog(1, "%s: failed to get sysfs uid: %s", + pp->dev, strerror(-len)); +- len = get_vpd_sgio(pp->fd, 0x83, pp->wwid, ++ len = get_vpd_sgio(pp->fd, 0x83, 0, pp->wwid, + WWID_SIZE); + *origin = "sgio"; + } +diff --git a/libmultipath/discovery.h b/libmultipath/discovery.h +index 8d04c2af..2f2fd9eb 100644 +--- a/libmultipath/discovery.h ++++ b/libmultipath/discovery.h +@@ -35,7 +35,7 @@ int path_get_tpgs(struct path *pp); /* This function never returns TPGS_UNDEF */ + int do_tur (char *); + int path_offline (struct path *); + int get_state (struct path * pp, struct config * conf, int daemon, int state); +-int get_vpd_sgio (int fd, int pg, char * str, int maxlen); ++int get_vpd_sgio (int fd, int pg, int vend_id, char * str, int maxlen); + int pathinfo (struct path * pp, struct config * conf, int mask); + int alloc_path_with_pathinfo (struct config *conf, struct udev_device *udevice, + const char *wwid, int flag, struct path **pp_ptr); +diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c +index 27e8d68a..b5b5b89f 100644 +--- a/libmultipath/propsel.c ++++ b/libmultipath/propsel.c +@@ -490,7 +490,7 @@ check_rdac(struct path * pp) + if (__do_set_from_hwe(checker_name, pp, checker_name) && + strcmp(checker_name, RDAC)) + return 0; +- len = get_vpd_sgio(pp->fd, 0xC9, buff, 44); ++ len = get_vpd_sgio(pp->fd, 0xC9, 0, buff, 44); + if (len <= 0) + return 0; + return !(memcmp(buff + 4, "vac1", 4)); +diff --git a/tests/vpd.c b/tests/vpd.c +index 4dbce010..02d6e0bb 100644 +--- a/tests/vpd.c ++++ b/tests/vpd.c +@@ -431,7 +431,7 @@ static void test_vpd_vnd_ ## len ## _ ## wlen(void **state) \ + will_return(__wrap_ioctl, vt->vpdbuf); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ +- ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ ++ ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_vnd_" #len "_" #wlen, \ + exp_len, ret, '1', 0, false, \ + exp_subst, vt->wwid); \ +@@ -463,7 +463,7 @@ static void test_vpd_str_ ## typ ## _ ## len ## _ ## wlen(void **state) \ + will_return(__wrap_ioctl, vt->vpdbuf); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ +- ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ ++ ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_str_" #typ "_" #len "_" #wlen, \ + exp_len, ret, byte0[type], 0, \ + type != STR_IQN, \ +@@ -502,7 +502,7 @@ static void test_vpd_naa_ ## naa ## _ ## wlen(void **state) \ + will_return(__wrap_ioctl, vt->vpdbuf); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ +- ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ ++ ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_naa_" #naa "_" #wlen, \ + exp_len, ret, '3', '0' + naa, true, \ + test_id, vt->wwid); \ +@@ -530,7 +530,7 @@ static void test_vpd_eui_ ## len ## _ ## wlen ## _ ## sml(void **state) \ + will_return(__wrap_ioctl, vt->vpdbuf); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ +- ret = get_vpd_sgio(10, 0x83, vt->wwid, wlen); \ ++ ret = get_vpd_sgio(10, 0x83, 0, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd_eui_" #len "_" #wlen "_" #sml, \ + exp_len, ret, '2', 0, true, \ + test_id, vt->wwid); \ +@@ -557,7 +557,7 @@ static void test_vpd80_ ## size ## _ ## len ## _ ## wlen(void **state) \ + size, len); \ + will_return(__wrap_ioctl, n); \ + will_return(__wrap_ioctl, vt->vpdbuf); \ +- ret = get_vpd_sgio(10, 0x80, vt->wwid, wlen); \ ++ ret = get_vpd_sgio(10, 0x80, 0, vt->wwid, wlen); \ + assert_correct_wwid("test_vpd80_" #size "_" #len "_" #wlen, \ + exp_len, ret, 0, 0, false, \ + input, vt->wwid); \ +-- +2.17.2 + diff --git a/SOURCES/0009-libmultipath-add-code-to-get-vendor-specific-vpd-dat.patch b/SOURCES/0009-libmultipath-add-code-to-get-vendor-specific-vpd-dat.patch new file mode 100644 index 0000000..c94c00f --- /dev/null +++ b/SOURCES/0009-libmultipath-add-code-to-get-vendor-specific-vpd-dat.patch @@ -0,0 +1,350 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Mon, 4 Nov 2019 15:38:25 -0600 +Subject: [PATCH] libmultipath: add code to get vendor specific vpd data + +This adds the wildcard 'g' for multipath and path formatted printing, +which returns extra data from a device's vendor specific vpd page. The +specific vendor vpd page to use, and the vendor/product id to decode it +can be set in the hwentry with vpd_vendor_pg and vpd_vendor_id. It can +be configured in the devices section of multipath.conf with the +vpd_vendor parameter. Currently, the only devices that use this are HPE +3PAR arrays, to return the Volume Name. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/config.c | 4 ++++ + libmultipath/config.h | 2 ++ + libmultipath/dict.c | 34 ++++++++++++++++++++++++++++++++++ + libmultipath/discovery.c | 34 +++++++++++++++++++++++++++++++++- + libmultipath/hwtable.c | 2 ++ + libmultipath/print.c | 27 +++++++++++++++++++++++++++ + libmultipath/propsel.c | 24 ++++++++++++++++++++++++ + libmultipath/propsel.h | 2 ++ + libmultipath/structs.h | 9 +++++++++ + multipath/multipath.conf.5 | 8 ++++++++ + 10 files changed, 145 insertions(+), 1 deletion(-) + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 85626e96..72b8d37c 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -369,6 +369,8 @@ merge_hwe (struct hwentry * dst, struct hwentry * src) + merge_num(max_sectors_kb); + merge_num(ghost_delay); + merge_num(all_tg_pt); ++ merge_num(vpd_vendor_pg); ++ merge_num(vpd_vendor_id); + merge_num(san_path_err_threshold); + merge_num(san_path_err_forget_rate); + merge_num(san_path_err_recovery_time); +@@ -517,6 +519,8 @@ store_hwe (vector hwtable, struct hwentry * dhwe) + hwe->detect_prio = dhwe->detect_prio; + hwe->detect_checker = dhwe->detect_checker; + hwe->ghost_delay = dhwe->ghost_delay; ++ hwe->vpd_vendor_pg = dhwe->vpd_vendor_pg; ++ hwe->vpd_vendor_id = dhwe->vpd_vendor_id; + + if (dhwe->bl_product && !(hwe->bl_product = set_param_str(dhwe->bl_product))) + goto out; +diff --git a/libmultipath/config.h b/libmultipath/config.h +index e69aa07c..589146de 100644 +--- a/libmultipath/config.h ++++ b/libmultipath/config.h +@@ -87,6 +87,8 @@ struct hwentry { + int max_sectors_kb; + int ghost_delay; + int all_tg_pt; ++ int vpd_vendor_pg; ++ int vpd_vendor_id; + char * bl_product; + }; + +diff --git a/libmultipath/dict.c b/libmultipath/dict.c +index 2b046e1d..d6d8b79b 100644 +--- a/libmultipath/dict.c ++++ b/libmultipath/dict.c +@@ -1366,6 +1366,39 @@ def_uxsock_timeout_handler(struct config *conf, vector strvec) + return 0; + } + ++static int ++hw_vpd_vendor_handler(struct config *conf, vector strvec) ++{ ++ int rc = 0; ++ char *buff; ++ ++ struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable); ++ if (!hwe) ++ return 1; ++ ++ buff = set_value(strvec); ++ if (!buff) ++ return 1; ++ if (strcmp(buff, "hp3par") == 0) { ++ hwe->vpd_vendor_pg = 0xc0; ++ hwe->vpd_vendor_id = VPD_VP_HP3PAR; ++ } else ++ rc = 1; ++ FREE(buff); ++ return rc; ++} ++ ++static int ++snprint_hw_vpd_vendor(struct config *conf, char * buff, int len, ++ const void * data) ++{ ++ const struct hwentry * hwe = (const struct hwentry *)data; ++ ++ if (hwe->vpd_vendor_pg == 0xc0 && hwe->vpd_vendor_id == VPD_VP_HP3PAR) ++ return snprintf(buff, len, "hp3par"); ++ return 0; ++} ++ + /* + * blacklist block handlers + */ +@@ -1806,6 +1839,7 @@ init_keywords(vector keywords) + install_keyword("max_sectors_kb", &hw_max_sectors_kb_handler, &snprint_hw_max_sectors_kb); + install_keyword("ghost_delay", &hw_ghost_delay_handler, &snprint_hw_ghost_delay); + install_keyword("all_tg_pt", &hw_all_tg_pt_handler, &snprint_hw_all_tg_pt); ++ install_keyword("vpd_vendor", &hw_vpd_vendor_handler, &snprint_hw_vpd_vendor); + install_sublevel_end(); + + install_keyword_root("overrides", &overrides_handler); +diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c +index 1d79cbae..d2773c3a 100644 +--- a/libmultipath/discovery.c ++++ b/libmultipath/discovery.c +@@ -1103,6 +1103,30 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, + return len; + } + ++static int ++parse_vpd_c0_hp3par(const unsigned char *in, size_t in_len, ++ char *out, size_t out_len) ++{ ++ size_t len; ++ ++ memset(out, 0x0, out_len); ++ if (in_len <= 4 || (in[4] > 3 && in_len < 44)) { ++ condlog(3, "HP/3PAR vendor specific VPD page length too short: %lu", in_len); ++ return -EINVAL; ++ } ++ if (in[4] <= 3) /* revision must be > 3 to have Vomlume Name */ ++ return -ENODATA; ++ len = get_unaligned_be32(&in[40]); ++ if (len > out_len || len + 44 > in_len) { ++ condlog(3, "HP/3PAR vendor specific Volume name too long: %lu", ++ len); ++ return -EINVAL; ++ } ++ memcpy(out, &in[44], len); ++ out[out_len - 1] = '\0'; ++ return len; ++} ++ + static int + get_vpd_sysfs (struct udev_device *parent, int pg, char * str, int maxlen) + { +@@ -1170,7 +1194,9 @@ get_vpd_sgio (int fd, int pg, int vend_id, char * str, int maxlen) + len = (buff_len <= maxlen)? buff_len : maxlen; + memcpy (str, buff, len); + } +- } else ++ } else if (pg == 0xc0 && vend_id == VPD_VP_HP3PAR) ++ len = parse_vpd_c0_hp3par(buff, buff_len, str, maxlen); ++ else + len = -ENOSYS; + + return len; +@@ -1544,6 +1570,12 @@ scsi_ioctl_pathinfo (struct path * pp, struct config *conf, int mask) + if (!(mask & DI_SERIAL)) + return; + ++ select_vpd_vendor_pg(conf, pp); ++ select_vpd_vendor_id(conf, pp); ++ ++ if (pp->vpd_vendor_pg != 0 && get_vpd_sgio(pp->fd, pp->vpd_vendor_pg, pp->vpd_vendor_id, pp->vpd_data, sizeof(pp->vpd_data)) < 0) ++ condlog(3, "%s: failed to get extra vpd data", pp->dev); ++ + parent = pp->udev; + while (parent) { + const char *subsys = udev_device_get_subsystem(parent); +diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c +index 16627ec5..1f27450c 100644 +--- a/libmultipath/hwtable.c ++++ b/libmultipath/hwtable.c +@@ -117,6 +117,8 @@ static struct hwentry default_hw[] = { + .no_path_retry = 18, + .fast_io_fail = 10, + .dev_loss = MAX_DEV_LOSS_TMO, ++ .vpd_vendor_pg = 0xc0, ++ .vpd_vendor_id = VPD_VP_HP3PAR, + }, + { + /* RA8000 / ESA12000 */ +diff --git a/libmultipath/print.c b/libmultipath/print.c +index 907469ad..0aafe3cb 100644 +--- a/libmultipath/print.c ++++ b/libmultipath/print.c +@@ -358,6 +358,23 @@ snprint_action (char * buff, size_t len, const struct multipath * mpp) + } + } + ++static int ++snprint_multipath_vpd_data(char * buff, size_t len, ++ const struct multipath * mpp) ++{ ++ struct pathgroup * pgp; ++ struct path * pp; ++ int i, j; ++ ++ vector_foreach_slot(mpp->pg, pgp, i) { ++ vector_foreach_slot(pgp->paths, pp, j) { ++ if (strlen(pp->vpd_data)) ++ return snprintf(buff, len, "%s", pp->vpd_data); ++ } ++ } ++ return 0; ++} ++ + /* + * path info printing functions + */ +@@ -688,6 +705,14 @@ snprint_path_marginal(char * buff, size_t len, const struct path * pp) + return snprintf(buff, len, "normal"); + } + ++static int ++snprint_path_vpd_data(char * buff, size_t len, const struct path * pp) ++{ ++ if (strlen(pp->vpd_data) > 0) ++ return snprintf(buff, len, "%s", pp->vpd_data); ++ return 0; ++} ++ + struct multipath_data mpd[] = { + {'n', "name", 0, snprint_name}, + {'w', "uuid", 0, snprint_multipath_uuid}, +@@ -712,6 +737,7 @@ struct multipath_data mpd[] = { + {'p', "prod", 0, snprint_multipath_prod}, + {'e', "rev", 0, snprint_multipath_rev}, + {'G', "foreign", 0, snprint_multipath_foreign}, ++ {'g', "vpd page data", 0, snprint_multipath_vpd_data}, + {0, NULL, 0 , NULL} + }; + +@@ -737,6 +763,7 @@ struct path_data pd[] = { + {'r', "target WWPN", 0, snprint_tgt_wwpn}, + {'a', "host adapter", 0, snprint_host_adapter}, + {'G', "foreign", 0, snprint_path_foreign}, ++ {'g', "vpd page data", 0, snprint_path_vpd_data}, + {'0', "failures", 0, snprint_path_failures}, + {'P', "protocol", 0, snprint_path_protocol}, + {0, NULL, 0 , NULL} +diff --git a/libmultipath/propsel.c b/libmultipath/propsel.c +index b5b5b89f..3c99f2d4 100644 +--- a/libmultipath/propsel.c ++++ b/libmultipath/propsel.c +@@ -1203,3 +1203,27 @@ out: + origin); + return 0; + } ++ ++int select_vpd_vendor_pg (struct config *conf, struct path *pp) ++{ ++ const char *origin; ++ ++ pp_set_hwe(vpd_vendor_pg); ++ pp_set_default(vpd_vendor_pg, 0); ++out: ++ condlog(3, "%s: vpd_vendor_pg = 0x%x %s", pp->dev, pp->vpd_vendor_pg, ++ origin); ++ return 0; ++} ++ ++int select_vpd_vendor_id (struct config *conf, struct path *pp) ++{ ++ const char *origin; ++ ++ pp_set_hwe(vpd_vendor_id); ++ pp_set_default(vpd_vendor_id, 0); ++out: ++ condlog(3, "%s: vpd_vendor_id = 0x%x %s", pp->dev, pp->vpd_vendor_id, ++ origin); ++ return 0; ++} +diff --git a/libmultipath/propsel.h b/libmultipath/propsel.h +index ddfd6262..3f6d319a 100644 +--- a/libmultipath/propsel.h ++++ b/libmultipath/propsel.h +@@ -37,3 +37,5 @@ void reconcile_features_with_options(const char *id, char **features, + int* no_path_retry, + int *retain_hwhandler); + int select_all_tg_pt (struct config *conf, struct multipath * mp); ++int select_vpd_vendor_pg (struct config *conf, struct path *pp); ++int select_vpd_vendor_id (struct config *conf, struct path *pp); +diff --git a/libmultipath/structs.h b/libmultipath/structs.h +index 1c32a799..1ad5f64a 100644 +--- a/libmultipath/structs.h ++++ b/libmultipath/structs.h +@@ -21,6 +21,7 @@ + #define HOST_NAME_LEN 16 + #define SLOT_NAME_SIZE 40 + #define PRKEY_SIZE 19 ++#define VPD_DATA_SIZE 128 + + #define SCSI_VENDOR_SIZE 9 + #define SCSI_PRODUCT_SIZE 17 +@@ -243,6 +244,11 @@ struct hd_geometry { + }; + #endif + ++/* ++ * from sg_vpd_vendor.c ++ */ ++#define VPD_VP_HP3PAR 4 ++ + struct path { + char dev[FILE_NAME_SIZE]; + char dev_t[BLK_DEV_SIZE]; +@@ -255,6 +261,7 @@ struct path { + char rev[PATH_REV_SIZE]; + char serial[SERIAL_SIZE]; + char tgt_node_name[NODE_NAME_SIZE]; ++ char vpd_data[VPD_DATA_SIZE]; + unsigned long long size; + unsigned int checkint; + unsigned int tick; +@@ -287,6 +294,8 @@ struct path { + int io_err_pathfail_starttime; + int find_multipaths_timeout; + int marginal; ++ int vpd_vendor_pg; ++ int vpd_vendor_id; + /* configlet pointers */ + vector hwe; + struct gen_path generic_path; +diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 +index e866da23..dc103fd8 100644 +--- a/multipath/multipath.conf.5 ++++ b/multipath/multipath.conf.5 +@@ -1472,6 +1472,14 @@ the \fIproduct\fR attribute set to the value of \fIproduct_blacklist\fR. + The user_friendly_names prefix to use for this + device type, instead of the default "mpath". + .TP ++.B vpd_vendor ++The vendor specific vpd page information, using the vpd page abbreviation. ++The vpd page abbreviation can be found by running \fIsg_vpd -e\fR. multipathd ++will use this information to gather device specific information that can be ++displayed with the \fI%g\fR wilcard for the \fImultipathd show maps format\fR ++and \fImultipathd show paths format\fR commands. Currently only the ++\fBhp3par\fR vpd page is supported. ++.TP + .B hardware_handler + The hardware handler to use for this device type. + The following hardware handler are implemented: +-- +2.17.2 + diff --git a/SOURCES/0010-RH-fixup-udev-rules-for-redhat.patch b/SOURCES/0010-RH-fixup-udev-rules-for-redhat.patch new file mode 100644 index 0000000..d560bc4 --- /dev/null +++ b/SOURCES/0010-RH-fixup-udev-rules-for-redhat.patch @@ -0,0 +1,66 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 13 Apr 2017 07:22:23 -0500 +Subject: [PATCH] RH: fixup udev rules for redhat + +The multipath rules need to run after scsi_id is run. This means moving +them after 60-persistent-storage.rules for redhat. Redhat also uses a +different naming scheme for partitions than SuSE. + +Signed-off-by: Benjamin Marzinski +--- + Makefile.inc | 2 +- + kpartx/kpartx.rules | 2 +- + multipath/Makefile | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 56c3eda0..2e8946ca 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -53,7 +53,7 @@ endif + prefix = + exec_prefix = $(prefix) + usr_prefix = $(prefix) +-bindir = $(exec_prefix)/sbin ++bindir = $(exec_prefix)/usr/sbin + libudevdir = $(prefix)/$(SYSTEMDPATH)/udev + udevrulesdir = $(libudevdir)/rules.d + multipathdir = $(TOPDIR)/libmultipath +diff --git a/kpartx/kpartx.rules b/kpartx/kpartx.rules +index 8f990494..8a3a1718 100644 +--- a/kpartx/kpartx.rules ++++ b/kpartx/kpartx.rules +@@ -32,6 +32,6 @@ LABEL="mpath_kpartx_end" + GOTO="kpartx_end" + + LABEL="run_kpartx" +-RUN+="/sbin/kpartx -un -p -part /dev/$name" ++RUN+="/sbin/kpartx -un /dev/$name" + + LABEL="kpartx_end" +diff --git a/multipath/Makefile b/multipath/Makefile +index 0828a8f7..b9bbb3cf 100644 +--- a/multipath/Makefile ++++ b/multipath/Makefile +@@ -24,7 +24,7 @@ install: + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) + $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) +- $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules ++ $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man8dir) + $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) +@@ -33,7 +33,7 @@ install: + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) + $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules +- $(RM) $(DESTDIR)$(libudevdir)/rules.d/56-multipath.rules ++ $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules + $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz + $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz + +-- +2.17.2 + diff --git a/SOURCES/0011-RH-Remove-the-property-blacklist-exception-builtin.patch b/SOURCES/0011-RH-Remove-the-property-blacklist-exception-builtin.patch new file mode 100644 index 0000000..8aaabc7 --- /dev/null +++ b/SOURCES/0011-RH-Remove-the-property-blacklist-exception-builtin.patch @@ -0,0 +1,105 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Wed, 2 Jul 2014 12:49:53 -0500 +Subject: [PATCH] RH: Remove the property blacklist exception builtin + +Multipath set the default property blacklist exceptions to +(ID_SCSI_VPD|ID_WWN). This has the effect of blacklisting some internal +devices. These devices may never have multiple paths, but it is nice +to be able to set multipath up on them all the same. This patch simply +removes the default, and makes it so that if no property +blacklist_exception is given, then devices aren't failed for not matching +it. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/blacklist.c | 9 ++------- + multipath/multipath.conf.5 | 11 ++++++----- + tests/blacklist.c | 6 ++---- + 3 files changed, 10 insertions(+), 16 deletions(-) + +diff --git a/libmultipath/blacklist.c b/libmultipath/blacklist.c +index 00e8dbdb..d9691b17 100644 +--- a/libmultipath/blacklist.c ++++ b/libmultipath/blacklist.c +@@ -204,12 +204,6 @@ setup_default_blist (struct config * conf) + if (store_ble(conf->blist_devnode, str, ORIGIN_DEFAULT)) + return 1; + +- str = STRDUP("(SCSI_IDENT_|ID_WWN)"); +- if (!str) +- return 1; +- if (store_ble(conf->elist_property, str, ORIGIN_DEFAULT)) +- return 1; +- + vector_foreach_slot (conf->hwtable, hwe, i) { + if (hwe->bl_product) { + if (find_blacklist_device(conf->blist_device, +@@ -411,7 +405,8 @@ filter_property(struct config *conf, struct udev_device *udev, int lvl, + *uid_attribute != '\0'; + bool uid_attr_seen = false; + +- r = MATCH_PROPERTY_BLIST_MISSING; ++ if (VECTOR_SIZE(conf->elist_property)) ++ r = MATCH_PROPERTY_BLIST_MISSING; + udev_list_entry_foreach(list_entry, + udev_device_get_properties_list_entry(udev)) { + +diff --git a/multipath/multipath.conf.5 b/multipath/multipath.conf.5 +index dc103fd8..b8697d47 100644 +--- a/multipath/multipath.conf.5 ++++ b/multipath/multipath.conf.5 +@@ -1285,9 +1285,14 @@ keywords. Both are regular expressions. For a full description of these keywords + Regular expression for an udev property. All + devices that have matching udev properties will be excluded/included. + The handling of the \fIproperty\fR keyword is special, +-because devices \fBmust\fR have at least one whitelisted udev property; ++because if a property blacklist_exception is set, devices \fBmust\fR have at ++least one whitelisted udev property; + otherwise they're treated as blacklisted, and the message + "\fIblacklisted, udev property missing\fR" is displayed in the logs. ++For example, setting the property blacklist_exception to ++\fB(SCSI_IDENT_|ID_WWN)\fR, will cause well-behaved SCSI devices and devices ++that provide a WWN (World Wide Number) to be included, and all others to be ++excluded. This works to exclude most non-multipathable devices. + . + .RS + .PP +@@ -1298,10 +1303,6 @@ Blacklisting by missing properties is only applied to devices which do have the + property specified by \fIuid_attribute\fR (e.g. \fIID_SERIAL\fR) + set. Previously, it was applied to every device, possibly causing devices to be + blacklisted because of temporary I/O error conditions. +-.PP +-The default \fIblacklist exception\fR is: \fB(SCSI_IDENT_|ID_WWN)\fR, causing +-well-behaved SCSI devices and devices that provide a WWN (World Wide Number) +-to be included, and all others to be excluded. + .RE + .TP + .B protocol +diff --git a/tests/blacklist.c b/tests/blacklist.c +index 362c44d9..ea284939 100644 +--- a/tests/blacklist.c ++++ b/tests/blacklist.c +@@ -291,7 +291,7 @@ static void test_property_missing(void **state) + conf.blist_property = blist_property_wwn; + expect_condlog(3, "sdb: blacklisted, udev property missing\n"); + assert_int_equal(filter_property(&conf, &udev, 3, "ID_SERIAL"), +- MATCH_PROPERTY_BLIST_MISSING); ++ MATCH_NOTHING); + assert_int_equal(filter_property(&conf, &udev, 3, "ID_BLAH"), + MATCH_NOTHING); + assert_int_equal(filter_property(&conf, &udev, 3, ""), +@@ -383,9 +383,7 @@ static void test_filter_path_missing1(void **state) + conf.blist_device = blist_device_foo_bar; + conf.blist_protocol = blist_protocol_fcp; + conf.blist_wwid = blist_wwid_xyzzy; +- expect_condlog(3, "sdb: blacklisted, udev property missing\n"); +- assert_int_equal(filter_path(&conf, &miss1_pp), +- MATCH_PROPERTY_BLIST_MISSING); ++ assert_int_equal(filter_path(&conf, &miss1_pp), MATCH_NOTHING); + } + + /* This one matches the property whitelist, to test the other missing +-- +2.17.2 + diff --git a/SOURCES/0012-RH-don-t-start-without-a-config-file.patch b/SOURCES/0012-RH-don-t-start-without-a-config-file.patch new file mode 100644 index 0000000..e98296e --- /dev/null +++ b/SOURCES/0012-RH-don-t-start-without-a-config-file.patch @@ -0,0 +1,106 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Wed, 15 Oct 2014 10:39:30 -0500 +Subject: [PATCH] RH: don't start without a config file + +If /etc/multipath.conf doesn't exist, don't start multipathd and blacklist +all devices when running multipath. A completely blank configuration file +is almost never what users want. Also, people may have the multipath +packages installed but don't want to use them. This patch provides a +simple way to disable multipath. Simply removing or renaming +/etc/multipath.conf will keep multipath from doing anything. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/config.c | 15 +++++++++++++++ + libmultipath/config.h | 1 + + multipath/multipath.rules | 1 + + multipathd/multipathd.8 | 2 ++ + multipathd/multipathd.service | 1 + + 5 files changed, 20 insertions(+) + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 72b8d37c..4032c4c4 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -26,6 +26,7 @@ + #include "devmapper.h" + #include "mpath_cmd.h" + #include "propsel.h" ++#include "version.h" + + static int + hwe_strmatch (const struct hwentry *hwe1, const struct hwentry *hwe2) +@@ -755,6 +756,20 @@ load_config (char * file) + goto out; + } + factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); ++ } else { ++ condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); ++ if (conf->blist_devnode == NULL) { ++ 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; ++ } + } + + conf->processed_main_config = 1; +diff --git a/libmultipath/config.h b/libmultipath/config.h +index 589146de..2adbd077 100644 +--- a/libmultipath/config.h ++++ b/libmultipath/config.h +@@ -9,6 +9,7 @@ + + #define ORIGIN_DEFAULT 0 + #define ORIGIN_CONFIG 1 ++#define ORIGIN_NO_CONFIG 2 + + /* + * In kernel, fast_io_fail == 0 means immediate failure on rport delete. +diff --git a/multipath/multipath.rules b/multipath/multipath.rules +index 9df11a95..0486bf70 100644 +--- a/multipath/multipath.rules ++++ b/multipath/multipath.rules +@@ -9,6 +9,7 @@ IMPORT{cmdline}="nompath" + ENV{nompath}=="?*", GOTO="end_mpath" + IMPORT{cmdline}="multipath" + ENV{multipath}=="off", GOTO="end_mpath" ++TEST!="/etc/multipath.conf", GOTO="end_mpath" + + ENV{DEVTYPE}!="partition", GOTO="test_dev" + IMPORT{parent}="DM_MULTIPATH_DEVICE_PATH" +diff --git a/multipathd/multipathd.8 b/multipathd/multipathd.8 +index 048a838d..8bd47a80 100644 +--- a/multipathd/multipathd.8 ++++ b/multipathd/multipathd.8 +@@ -39,6 +39,8 @@ map regains its maximum performance and redundancy. + This daemon executes the external \fBmultipath\fR tool when events occur. + In turn, the multipath tool signals the multipathd daemon when it is done with + devmap reconfiguration, so that it can refresh its failed path list. ++ ++In this Linux distribution, multipathd does not run unless a /etc/multipath.conf file exists. + . + . + .\" ---------------------------------------------------------------------------- +diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service +index ba24983e..17434cef 100644 +--- a/multipathd/multipathd.service ++++ b/multipathd/multipathd.service +@@ -4,6 +4,7 @@ Wants=systemd-udev-trigger.service systemd-udev-settle.service + Before=iscsi.service iscsid.service lvm2-activation-early.service + Before=local-fs-pre.target blk-availability.service + After=multipathd.socket systemd-udev-trigger.service systemd-udev-settle.service ++ConditionPathExists=/etc/multipath.conf + DefaultDependencies=no + Conflicts=shutdown.target + ConditionKernelCommandLine=!nompath +-- +2.17.2 + diff --git a/SOURCES/0013-RH-use-rpm-optflags-if-present.patch b/SOURCES/0013-RH-use-rpm-optflags-if-present.patch new file mode 100644 index 0000000..2234168 --- /dev/null +++ b/SOURCES/0013-RH-use-rpm-optflags-if-present.patch @@ -0,0 +1,53 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Wed, 19 Apr 2017 06:10:01 -0500 +Subject: [PATCH] RH: use rpm optflags if present + +Use the passed in optflags when compiling as an RPM, and keep the +default flags as close as possible to the current fedora flags, while +still being generic. + +Signed-off-by: Benjamin Marzinski +--- + Makefile.inc | 24 ++++++++++++++++-------- + 1 file changed, 16 insertions(+), 8 deletions(-) + +diff --git a/Makefile.inc b/Makefile.inc +index 2e8946ca..1b2f47a8 100644 +--- a/Makefile.inc ++++ b/Makefile.inc +@@ -88,15 +88,23 @@ TEST_CC_OPTION = $(shell \ + echo "$(2)"; \ + fi) + +-STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) + ERROR_DISCARDED_QUALIFIERS := $(call TEST_CC_OPTION,-Werror=discarded-qualifiers,) +- +-OPTFLAGS = -O2 -g -pipe -Wall -Wextra -Wformat=2 -Werror=implicit-int \ +- -Werror=implicit-function-declaration -Werror=format-security \ +- -Wno-sign-compare -Wno-unused-parameter -Wno-clobbered \ +- -Werror=cast-qual $(ERROR_DISCARDED_QUALIFIERS) \ +- -Wp,-D_FORTIFY_SOURCE=2 $(STACKPROT) \ +- --param=ssp-buffer-size=4 ++ifndef RPM_OPT_FLAGS ++ STACKPROT := $(call TEST_CC_OPTION,-fstack-protector-strong,-fstack-protector) ++ OPTFLAGS = -O2 -g -pipe -Wall -Werror=format-security \ ++ -Wp,-D_FORTIFY_SOURCE=2 -fexceptions \ ++ $(STACKPROT) --param=ssp-buffer-size=4 \ ++ -grecord-gcc-switches ++ ifeq ($(shell test -f /usr/lib/rpm/redhat/redhat-hardened-cc1 && echo 1),1) ++ OPTFLAGS += -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 ++ endif ++else ++ OPTFLAGS = $(RPM_OPT_FLAGS) ++endif ++OPTFLAGS += -Wextra -Wstrict-prototypes -Wformat=2 -Werror=implicit-int \ ++ -Werror=implicit-function-declaration -Wno-sign-compare \ ++ -Wno-unused-parameter $(ERROR_DISCARDED_QUALIFIERS) \ ++ -Werror=cast-qual + + CFLAGS := $(OPTFLAGS) -DBIN_DIR=\"$(bindir)\" -DLIB_STRING=\"${LIB}\" -DRUN_DIR=\"${RUN}\" \ + -MMD -MP $(CFLAGS) +-- +2.17.2 + diff --git a/SOURCES/0014-RH-add-mpathconf.patch b/SOURCES/0014-RH-add-mpathconf.patch new file mode 100644 index 0000000..8917f33 --- /dev/null +++ b/SOURCES/0014-RH-add-mpathconf.patch @@ -0,0 +1,774 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 16 Oct 2014 15:49:01 -0500 +Subject: [PATCH] RH: add mpathconf + +mpathconf is a program (largely based on lvmcomf) to help users +configure /etc/multipath.conf and enable or disable multipathing. It +has a couple of built-in options that can be set directly from the +command line. But, mostly it is used to get a multipath.conf file +with the OS defaults, and to enable and disable multipathing via +a single command. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/config.c | 2 + + multipath/Makefile | 5 + + multipath/mpathconf | 555 ++++++++++++++++++++++++++++++++++++++++++ + multipath/mpathconf.8 | 135 ++++++++++ + 4 files changed, 697 insertions(+) + create mode 100644 multipath/mpathconf + create mode 100644 multipath/mpathconf.8 + +diff --git a/libmultipath/config.c b/libmultipath/config.c +index 4032c4c4..2c32acf7 100644 +--- a/libmultipath/config.c ++++ b/libmultipath/config.c +@@ -758,6 +758,8 @@ load_config (char * file) + factorize_hwtable(conf->hwtable, builtin_hwtable_size, file); + } else { + condlog(0, "/etc/multipath.conf does not exist, blacklisting all devices."); ++ condlog(0, "You can run \"/sbin/mpathconf --enable\" to create"); ++ condlog(0, "/etc/multipath.conf. See man mpathconf(8) for more details"); + if (conf->blist_devnode == NULL) { + conf->blist_devnode = vector_alloc(); + if (!conf->blist_devnode) { +diff --git a/multipath/Makefile b/multipath/Makefile +index b9bbb3cf..e720c7f6 100644 +--- a/multipath/Makefile ++++ b/multipath/Makefile +@@ -18,10 +18,12 @@ $(EXEC): $(OBJS) $(multipathdir)/libmultipath.so $(mpathcmddir)/libmpathcmd.so + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) + $(GZIP) $(EXEC).8 > $(EXEC).8.gz + $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz ++ $(GZIP) mpathconf.8 > mpathconf.8.gz + + install: + $(INSTALL_PROGRAM) -d $(DESTDIR)$(bindir) + $(INSTALL_PROGRAM) -m 755 $(EXEC) $(DESTDIR)$(bindir)/ ++ $(INSTALL_PROGRAM) -m 755 mpathconf $(DESTDIR)$(bindir)/ + $(INSTALL_PROGRAM) -d $(DESTDIR)$(udevrulesdir) + $(INSTALL_PROGRAM) -m 644 11-dm-mpath.rules $(DESTDIR)$(udevrulesdir) + $(INSTALL_PROGRAM) -m 644 $(EXEC).rules $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules +@@ -29,13 +31,16 @@ install: + $(INSTALL_PROGRAM) -m 644 $(EXEC).8.gz $(DESTDIR)$(man8dir) + $(INSTALL_PROGRAM) -d $(DESTDIR)$(man5dir) + $(INSTALL_PROGRAM) -m 644 $(EXEC).conf.5.gz $(DESTDIR)$(man5dir) ++ $(INSTALL_PROGRAM) -m 644 mpathconf.8.gz $(DESTDIR)$(man8dir) + + uninstall: + $(RM) $(DESTDIR)$(bindir)/$(EXEC) + $(RM) $(DESTDIR)$(udevrulesdir)/11-dm-mpath.rules + $(RM) $(DESTDIR)$(libudevdir)/rules.d/62-multipath.rules ++ $(RM) $(DESTDIR)$(bindir)/mpathconf + $(RM) $(DESTDIR)$(man8dir)/$(EXEC).8.gz + $(RM) $(DESTDIR)$(man5dir)/$(EXEC).conf.5.gz ++ $(RM) $(DESTDIR)$(man8dir)/mpathconf.8.gz + + clean: dep_clean + $(RM) core *.o $(EXEC) *.gz +diff --git a/multipath/mpathconf b/multipath/mpathconf +new file mode 100644 +index 00000000..f34003c9 +--- /dev/null ++++ b/multipath/mpathconf +@@ -0,0 +1,555 @@ ++#!/bin/bash ++# ++# Copyright (C) 2010 Red Hat, Inc. All rights reserved. ++# ++# This file is part of the device-mapper-multipath package. ++# ++# This copyrighted material is made available to anyone wishing to use, ++# modify, copy, or redistribute it subject to the terms and conditions ++# of the GNU General Public License v.2. ++# ++# 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ++ ++# ++# Simple editting of /etc/multipath.conf ++# This program was largely ripped off from lvmconf ++# ++ ++unset ENABLE FIND FRIENDLY PROPERTY FOREIGN MODULE MULTIPATHD HAVE_DISABLE HAVE_WWID_DISABLE HAVE_FIND HAVE_BLACKLIST HAVE_EXCEPTIONS HAVE_DEFAULTS HAVE_FRIENDLY HAVE_PROPERTY HAVE_FOREIGN HAVE_MULTIPATHD HAVE_MODULE HAVE_OUTFILE SHOW_STATUS CHANGED_CONFIG WWID_LIST ++ ++DEFAULT_CONFIG="# device-mapper-multipath configuration file ++ ++# For a complete list of the default configuration values, run either: ++# # multipath -t ++# or ++# # multipathd show config ++ ++# For a list of configuration options with descriptions, see the ++# multipath.conf man page. ++ ++defaults { ++ user_friendly_names yes ++ find_multipaths yes ++ enable_foreign \"^$\" ++} ++ ++blacklist_exceptions { ++ property \"(SCSI_IDENT_|ID_WWN)\" ++}" ++ ++CONFIGFILE="/etc/multipath.conf" ++OUTPUTFILE="/etc/multipath.conf" ++MULTIPATHDIR="/etc/multipath" ++TMPFILE="/etc/multipath/.multipath.conf.tmp" ++WWIDS=0 ++ ++function usage ++{ ++ echo "usage: $0 " ++ echo "" ++ echo "Commands:" ++ echo "Enable: --enable " ++ echo "Disable: --disable" ++ echo "Only allow certain wwids (instead of enable): --allow " ++ echo "Set user_friendly_names (Default y): --user_friendly_names " ++ echo "Set find_multipaths (Default y): --find_multipaths " ++ echo "Set default property blacklist (Default y): --property_blacklist " ++ echo "Set enable_foreign to show foreign devices (Default n): --enable_foreign " ++ echo "Load the dm-multipath modules on enable (Default y): --with_module " ++ echo "start/stop/reload multipathd (Default n): --with_multipathd " ++ echo "select output file (Default /etc/multipath.conf): --outfile " ++ echo "" ++} ++ ++function add_wwid ++{ ++ INDEX=0 ++ while [ "$INDEX" -lt "$WWIDS" ] ; do ++ if [ "$1" = "${WWID_LIST[$INDEX]}" ] ; then ++ return ++ fi ++ ((INDEX++)) ++ done ++ WWID_LIST[$WWIDS]="$1" ++ ((WWIDS++)) ++} ++ ++function get_dm_deps ++{ ++ shift 3 ++ while [ -n "$1" -a -n "$2" ]; do ++ MAJOR=$(echo $1 | tr -d '(,') ++ MINOR=$(echo $2 | tr -d ')') ++ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` ++ if [ -n "$UUID" ] ; then ++ set_dm_wwid $UUID ++ fi ++ shift 2 ++ done ++} ++ ++function set_dm_wwid ++{ ++ if [[ "$1" =~ ^part[[:digit:]]+-mpath- ]] ; then ++ add_wwid "${1##part*-mpath-}" ++ elif [[ "$1" =~ ^mpath- ]] ; then ++ add_wwid "${1##mpath-}" ++ else ++ get_dm_deps `dmsetup deps -u $1` ++ fi ++} ++ ++function set_wwid ++{ ++ UUID="" ++ if [[ "$1" =~ ^[[:digit:]]+:[[:digit:]]+$ ]] ; then ++ MAJOR=${1%%:*} ++ MINOR=${1##*:} ++ UUID=`dmsetup info -c --noheadings -o uuid -j $MAJOR -m $MINOR 2> /dev/null` ++ else ++ UUID=`dmsetup info -c --noheadings -o uuid $1 2> /dev/null` ++ fi ++ if [ -n "$UUID" ] ; then ++ set_dm_wwid $UUID ++ else ++ add_wwid "$1" ++ fi ++} ++ ++function parse_args ++{ ++ while [ -n "$1" ]; do ++ case $1 in ++ --enable) ++ ENABLE=1 ++ shift ++ ;; ++ --disable) ++ ENABLE=0 ++ shift ++ ;; ++ --allow) ++ ENABLE=2 ++ if [ -n "$2" ]; then ++ set_wwid $2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --user_friendly_names) ++ if [ -n "$2" ]; then ++ FRIENDLY=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --find_multipaths) ++ if [ -n "$2" ]; then ++ FIND=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --property_blacklist) ++ if [ -n "$2" ]; then ++ PROPERTY=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --enable_foreign) ++ if [ -n "$2" ]; then ++ FOREIGN=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --with_module) ++ if [ -n "$2" ]; then ++ MODULE=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --with_multipathd) ++ if [ -n "$2" ]; then ++ MULTIPATHD=$2 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ --outfile) ++ if [ -n "$2" ]; then ++ OUTPUTFILE=$2 ++ HAVE_OUTFILE=1 ++ shift 2 ++ else ++ usage ++ exit 1 ++ fi ++ ;; ++ *) ++ usage ++ exit ++ esac ++ done ++} ++ ++function validate_args ++{ ++ if [ "$ENABLE" = "0" ] && [ -n "$FRIENDLY" -o -n "$FIND" -o -n "$PROPERTY" -o -n "$MODULE" ]; then ++ echo "ignoring extra parameters on disable" ++ FRIENDLY="" ++ FIND="" ++ PROPERTY="" ++ MODULE="" ++ fi ++ if [ -n "$FRIENDLY" ] && [ "$FRIENDLY" != "y" -a "$FRIENDLY" != "n" ]; then ++ echo "--user_friendly_names must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$FIND" ] && [ "$FIND" != "y" -a "$FIND" != "n" ]; then ++ echo "--find_multipaths must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$PROPERTY" ] && [ "$PROPERTY" != "y" -a "$PROPERTY" != "n" ]; then ++ echo "--property_blacklist must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$FOREIGN" ] && [ "$FOREIGN" != "y" -a "$FOREIGN" != "n" ]; then ++ echo "--enable_foreign must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -z "$ENABLE" -a -z "$FIND" -a -z "$FRIENDLY" -a -z "$PROPERTY" ]; then ++ SHOW_STATUS=1 ++ fi ++ if [ -n "$MODULE" ] && [ "$MODULE" != "y" -a "$MODULE" != "n" ]; then ++ echo "--with_module must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ -n "$MULTIPATHD" ] && [ "$MULTIPATHD" != "y" -a "$MULTIPATHD" != "n" ]; then ++ echo "--with_multipathd must be either 'y' or 'n'" ++ exit 1 ++ fi ++ if [ "$ENABLE" = 2 -a -z "$HAVE_OUTFILE" ]; then ++ echo "Because --allow makes changes that cannot be automatically reversed," ++ echo "you must set --outfile when you set --allow" ++ exit 1 ++ fi ++} ++ ++function add_blacklist_exceptions ++{ ++ INDEX=0 ++ while [ "$INDEX" -lt "$WWIDS" ] ; do ++ sed -i '/^blacklist_exceptions[[:space:]]*{/ a\ ++ wwid '"\"${WWID_LIST[$INDEX]}\""' ++' $TMPFILE ++ ((INDEX++)) ++ done ++} ++ ++umask 0077 ++ ++parse_args "$@" ++ ++validate_args ++ ++if [ ! -d "$MULTIPATHDIR" ]; then ++ echo "/etc/multipath/ does not exist. failing" ++ exit 1 ++fi ++ ++rm $TMPFILE 2> /dev/null ++echo "$DEFAULT_CONFIG" > $TMPFILE ++if [ -f "$CONFIGFILE" ]; then ++ cp $CONFIGFILE $TMPFILE ++fi ++ ++if grep -q "^blacklist[[:space:]]*{" $TMPFILE ; then ++ HAVE_BLACKLIST=1 ++fi ++ ++if grep -q "^blacklist_exceptions[[:space:]]*{" $TMPFILE ; then ++ HAVE_EXCEPTIONS=1 ++fi ++ ++if grep -q "^defaults[[:space:]]*{" $TMPFILE ; then ++ HAVE_DEFAULTS=1 ++fi ++ ++if [ -z "$MODULE" -o "$MODULE" = "y" ]; then ++ if lsmod | grep -q "dm_multipath" ; then ++ HAVE_MODULE=1 ++ else ++ HAVE_MODULE=0 ++ fi ++fi ++ ++if [ "$MULTIPATHD" = "y" ]; then ++ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then ++ HAVE_MULTIPATHD=1 ++ else ++ HAVE_MULTIPATHD=0 ++ fi ++fi ++ ++if [ "$HAVE_BLACKLIST" = "1" ]; then ++ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*devnode \"\.\?\*\"" ; then ++ HAVE_DISABLE=1 ++ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"" ; then ++ HAVE_DISABLE=0 ++ fi ++fi ++ ++if [ "$HAVE_BLACKLIST" = "1" ]; then ++ if sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*wwid \"\.\?\*\"" ; then ++ HAVE_WWID_DISABLE=1 ++ elif sed -n '/^blacklist[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"" ; then ++ HAVE_WWID_DISABLE=0 ++ fi ++fi ++ ++if [ "$HAVE_DEFAULTS" = "1" ]; then ++ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)" ; then ++ HAVE_FIND=1 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)" ; then ++ HAVE_FIND=0 ++ fi ++ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)" ; then ++ HAVE_FRIENDLY=1 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)" ; then ++ HAVE_FRIENDLY=0 ++ fi ++ if sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*enable_foreign" ; then ++ HAVE_FOREIGN=0 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*enable_foreign[[:space:]]*\"\^\$\"" ; then ++ HAVE_FOREIGN=1 ++ elif sed -n '/^defaults[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*enable_foreign" ; then ++ HAVE_FOREIGN=2 ++ fi ++fi ++ ++if [ "$HAVE_EXCEPTIONS" = "1" ]; then ++ if sed -n '/^blacklist_exceptions[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*property[[:space:]]*\"(SCSI_IDENT_|ID_WWN)\"" ; then ++ HAVE_PROPERTY=1 ++ elif sed -n '/^blacklist_exceptions[[:space:]]*{/,/^}/ p' $TMPFILE | grep -q "^[[:space:]]*#[[:space:]]*property[[:space:]]*\"(SCSI_IDENT_|ID_WWN)\"" ; then ++ HAVE_PROPERTY=0 ++ fi ++fi ++ ++if [ -n "$SHOW_STATUS" ]; then ++ if [ -z "$HAVE_DISABLE" -o "$HAVE_DISABLE" = 0 ]; then ++ echo "multipath is enabled" ++ else ++ echo "multipath is disabled" ++ fi ++ if [ -z "$HAVE_FIND" -o "$HAVE_FIND" = 0 ]; then ++ echo "find_multipaths is disabled" ++ else ++ echo "find_multipaths is enabled" ++ fi ++ if [ -z "$HAVE_FRIENDLY" -o "$HAVE_FRIENDLY" = 0 ]; then ++ echo "user_friendly_names is disabled" ++ else ++ echo "user_friendly_names is enabled" ++ fi ++ if [ -z "$HAVE_PROPERTY" -o "$HAVE_PROPERTY" = 0 ]; then ++ echo "default property blacklist is disabled" ++ else ++ echo "default property blacklist is enabled" ++ fi ++ if [ -z "$HAVE_FOREIGN" -o "$HAVE_FOREIGN" = 0 ]; then ++ echo "enable_foreign is not set (all foreign multipath devices will be shown)" ++ elif [ "$HAVE_FOREIGN" = 1 ]; then ++ echo "enable_foreign is set (no foreign multipath devices will be shown)" ++ else ++ echo "enable_foreign is set (foreign multipath devices may not be shown)" ++ fi ++ if [ -n "$HAVE_MODULE" ]; then ++ if [ "$HAVE_MODULE" = 1 ]; then ++ echo "dm_multipath module is loaded" ++ else ++ echo "dm_multipath module is not loaded" ++ fi ++ fi ++ if [ -z "$HAVE_MULTIPATHD" ]; then ++ if /bin/systemctl status multipathd.service > /dev/null 2>&1 ; then ++ HAVE_MULTIPATHD=1 ++ else ++ HAVE_MULTIPATHD=0 ++ fi ++ fi ++ if [ "$HAVE_MULTIPATHD" = 1 ]; then ++ echo "multipathd is running" ++ else ++ echo "multipathd is not running" ++ fi ++ exit 0 ++fi ++ ++if [ -z "$HAVE_BLACKLIST" ]; then ++ cat >> $TMPFILE <<- _EOF_ ++ ++blacklist { ++} ++_EOF_ ++fi ++ ++if [ -z "$HAVE_DEFAULTS" ]; then ++ cat >> $TMPFILE <<- _EOF_ ++ ++defaults { ++} ++_EOF_ ++fi ++ ++if [ "$ENABLE" = 2 ]; then ++ if [ "$HAVE_DISABLE" = 1 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE ++ fi ++ if [ -z "$HAVE_WWID_DISABLE" ]; then ++ sed -i '/^blacklist[[:space:]]*{/ a\ ++ wwid ".*" ++' $TMPFILE ++ elif [ "$HAVE_WWID_DISABLE" = 0 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*wwid \"\.\?\*\"/ wwid ".*"/' $TMPFILE ++ fi ++ if [ "$HAVE_EXCEPTIONS" = 1 ]; then ++ sed -i '/^blacklist_exceptions[[:space:]]*{/,/^}/ {/^[[:space:]]*wwid/ d}' $TMPFILE ++ else ++ cat >> $TMPFILE <<- _EOF_ ++ ++blacklist_exceptions { ++} ++_EOF_ ++ fi ++ add_blacklist_exceptions ++elif [ "$ENABLE" = 1 ]; then ++ if [ "$HAVE_DISABLE" = 1 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*devnode \"\.\?\*\"/# devnode ".*"/' $TMPFILE ++ fi ++elif [ "$ENABLE" = 0 ]; then ++ if [ -z "$HAVE_DISABLE" ]; then ++ sed -i '/^blacklist[[:space:]]*{/ a\ ++ devnode ".*" ++' $TMPFILE ++ elif [ "$HAVE_DISABLE" = 0 ]; then ++ sed -i '/^blacklist[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*devnode \"\.\?\*\"/ devnode ".*"/' $TMPFILE ++ fi ++fi ++ ++if [ "$FIND" = "n" ]; then ++ if [ "$HAVE_FIND" = 1 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(yes\|1\)/ find_multipaths no/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$FIND" = "y" ]; then ++ if [ -z "$HAVE_FIND" ]; then ++ sed -i '/^defaults[[:space:]]*{/ a\ ++ find_multipaths yes ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_FIND" = 0 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*find_multipaths[[:space:]]*\(no\|0\)/ find_multipaths yes/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ "$FRIENDLY" = "n" ]; then ++ if [ "$HAVE_FRIENDLY" = 1 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(yes\|1\)/ user_friendly_names no/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$FRIENDLY" = "y" ]; then ++ if [ -z "$HAVE_FRIENDLY" ]; then ++ sed -i '/^defaults[[:space:]]*{/ a\ ++ user_friendly_names yes ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_FRIENDLY" = 0 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*user_friendly_names[[:space:]]*\(no\|0\)/ user_friendly_names yes/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ "$PROPERTY" = "n" ]; then ++ if [ "$HAVE_PROPERTY" = 1 ]; then ++ sed -i '/^blacklist_exceptions[[:space:]]*{/,/^}/ s/^[[:space:]]*property[[:space:]]*\"(SCSI_IDENT_|ID_WWN)\"/# property \"(SCSI_IDENT_|ID_WWN)\"/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$PROPERTY" = "y" ]; then ++ if [ -z "$HAVE_PROPERTY" ]; then ++ sed -i '/^blacklist_exceptions[[:space:]]*{/ a\ ++ property "(SCSI_IDENT_|ID_WWN)" ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_PROPERTY" = 0 ]; then ++ sed -i '/^blacklist_exceptions[[:space:]]*{/,/^}/ s/^[[:space:]]*#[[:space:]]*property[[:space:]]*\"(SCSI_IDENT_|ID_WWN)\"/ property \"(SCSI_IDENT_|ID_WWN)\"/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ "$FOREIGN" = "y" ]; then ++ if [ "$HAVE_FOREIGN" = 1 -o "$HAVE_FOREIGN" = 2 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*enable_foreign/# enable_foreign/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++elif [ "$FOREIGN" = "n" ]; then ++ if [ -z "$HAVE_FOREIGN" ]; then ++ sed -i '/^defaults[[:space:]]*{/ a\ ++ enable_foreign "^$" ++' $TMPFILE ++ CHANGED_CONFIG=1 ++ elif [ "$HAVE_FOREIGN" = 0 -o "$HAVE_FOREIGN" = 2 ]; then ++ sed -i '/^defaults[[:space:]]*{/,/^}/ s/^[[:space:]]*#\?[[:space:]]*enable_foreign.*$/ enable_foreign "^$"/' $TMPFILE ++ CHANGED_CONFIG=1 ++ fi ++fi ++ ++if [ -f "$OUTPUTFILE" ]; then ++ cp $OUTPUTFILE $OUTPUTFILE.old ++ if [ $? != 0 ]; then ++ echo "failed to backup old config file, $OUTPUTFILE not updated" ++ exit 1 ++ fi ++fi ++ ++cp $TMPFILE $OUTPUTFILE ++if [ $? != 0 ]; then ++ echo "failed to copy new config file into place, check $OUTPUTFILE is still OK" ++ exit 1 ++fi ++ ++rm -f $TMPFILE ++ ++if [ "$ENABLE" = 1 ]; then ++ if [ "$HAVE_MODULE" = 0 ]; then ++ modprobe dm_multipath ++ fi ++ if [ "$HAVE_MULTIPATHD" = 0 ]; then ++ systemctl start multipathd.service ++ fi ++elif [ "$ENABLE" = 0 ]; then ++ if [ "$HAVE_MULTIPATHD" = 1 ]; then ++ systemctl stop multipathd.service ++ fi ++elif [ -n "$CHANGED_CONFIG" -a "$HAVE_MULTIPATHD" = 1 ]; then ++ systemctl reload multipathd.service ++fi +diff --git a/multipath/mpathconf.8 b/multipath/mpathconf.8 +new file mode 100644 +index 00000000..7937ea05 +--- /dev/null ++++ b/multipath/mpathconf.8 +@@ -0,0 +1,135 @@ ++.TH MPATHCONF 8 "June 2010" "" "Linux Administrator's Manual" ++.SH NAME ++mpathconf - A tool for configuring device-mapper-multipath ++.SH SYNOPSIS ++.B mpathconf ++.RB [\| commands \|] ++.RB [\| options \|] ++.SH DESCRIPTION ++.B mpathconf ++is a utility that creates or modifies ++.B /etc/multipath.conf. ++It can enable or disable multipathing and configure some common options. ++.B mpathconf ++can also load the ++.B dm_multipath ++module, start and stop the ++.B multipathd ++daemon, and configure the ++.B multipathd ++service to start automatically or not. If ++.B mpathconf ++is called with no commands, it will display the current configuration, but ++will not create of modify ++.B /etc/multipath.conf ++ ++The default options for mpathconf are ++.B --with_module ++The ++.B --with_multipathd ++option is not set by default. Enabling multipathing will load the ++.B dm_multipath ++module but it will not immediately start it. This is so ++that users can manually edit their config file if necessary, before starting ++.B multipathd. ++ ++If ++.B /etc/multipath.conf ++already exists, mpathconf will edit it. If it does not exist, mpathconf will ++create a default file with ++.B user_friendly_names ++and ++.B find_multipaths ++set. To disable these, use the ++.B --user_friendly_names n ++and ++.B --find_multipaths n ++options ++.SH COMMANDS ++.TP ++.B --enable ++Removes any line that blacklists all device nodes from the ++.B /etc/multipath.conf ++blacklist section. Also, creates ++.B /etc/multipath.conf ++if it doesn't exist. ++.TP ++.B --disable ++Adds a line that blacklists all device nodes to the ++.B /etc/multipath.conf ++blacklist section. If no blacklist section exists, it will create one. ++.TP ++.B --allow \fB\fP ++Modifies the \fB/etc/multipath/conf\fP blacklist to blacklist all ++wwids and the blacklist_exceptions to whitelist \fB\fP. \fB\fP ++can be in the form of MAJOR:MINOR, a wwid, or the name of a device-mapper ++device, either a multipath device, or any device on stacked on top of one or ++more multipath devices. This command can be used multiple times to allow ++multiple devices. \fBNOTE:\fP This action will create a configuration file that ++mpathconf will not be able to revert back to its previous state. Because ++of this, \fB--outfile\fP is required when using \fB--allow\fP. ++.TP ++.B --user_friendly_name \fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this adds the line ++.B user_friendly_names yes ++to the ++.B /etc/multipath.conf ++defaults section. If set to \fBn\fP, this removes the line, if present. This ++command can be used along with any other command. ++.TP ++.B --find_multipaths\fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this adds the line ++.B find_multipaths yes ++to the ++.B /etc/multipath.conf ++defaults section. If set to \fBn\fP, this removes the line, if present. This ++command can be used along with any other command. ++.TP ++.B --property_blacklist \fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this adds the line ++.B property "(SCSI_IDENT_|ID_WWN)" ++to the ++.B /etc/multipath.conf ++blacklist_exceptions section. If set to \fBn\fP, this removes the line, if ++present. This command can be used along with any other command. ++.TP ++.B --enable_foreign\fP { \fBy\fP | \fBn\fP } ++If set to \fBn\fP, this adds the line ++.B enable_foreign "^$" ++to the ++.B /etc/multipath.conf ++defaults section. if set to \fBy\fP, this removes the line, if present. This ++command can be used along with any other command. ++.TP ++.B --outfile \fB\fP ++Write the resulting multipath configuration to \fB\fP instead of ++\fB/etc/multipath.conf\fP. ++.SH OPTIONS ++.TP ++.B --with_module\fP { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this runs ++.B modprobe dm_multipath ++to install the multipath modules. This option only works with the ++.B --enable ++command. This option is set to \fBy\fP by default. ++.TP ++.B --with_multipathd { \fBy\fP | \fBn\fP } ++If set to \fBy\fP, this runs ++.B service multipathd start ++to start the multipathd daemon on \fB--enable\fP, ++.B service multipathd stop ++to stop the multipathd daemon on \fB--disable\fP, and ++.B service multipathd reload ++to reconfigure multipathd on \fB--user_frindly_names\fP and ++\fB--find_multipaths\fP. ++This option is set to \fBn\fP by default. ++.SH FILES ++.BR /etc/multipath.conf ++.SH "SEE ALSO" ++.BR multipath.conf (5), ++.BR modprobe (8), ++.BR multipath (8), ++.BR multipathd (8), ++.BR service (8), ++.SH AUTHOR ++Benjamin Marzinski +-- +2.17.2 + diff --git a/SOURCES/0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch b/SOURCES/0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch new file mode 100644 index 0000000..51be806 --- /dev/null +++ b/SOURCES/0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch @@ -0,0 +1,169 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Fri, 17 Oct 2014 11:20:34 -0500 +Subject: [PATCH] RH: add wwids from kernel cmdline mpath.wwids with -A + +This patch adds another option to multipath, "-A", which reads +/proc/cmdline for mpath.wwid= options, and adds any wwids it finds +to /etc/multipath/wwids. While this isn't usually important during +normal operation, since these wwids should already be added, it can be +helpful during installation, to make sure that multipath can claim +devices as its own, before LVM or something else makes use of them. The +patch also execs "/sbin/multipath -A" before running multipathd in +multipathd.service + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/wwids.c | 44 +++++++++++++++++++++++++++++++++++ + libmultipath/wwids.h | 1 + + multipath/main.c | 10 ++++++-- + multipath/multipath.8 | 7 +++++- + multipathd/multipathd.service | 1 + + 5 files changed, 60 insertions(+), 3 deletions(-) + +diff --git a/libmultipath/wwids.c b/libmultipath/wwids.c +index ef748125..349da8b7 100644 +--- a/libmultipath/wwids.c ++++ b/libmultipath/wwids.c +@@ -444,3 +444,47 @@ int op ## _wwid(const char *wwid) \ + declare_failed_wwid_op(is_failed, false) + declare_failed_wwid_op(mark_failed, true) + declare_failed_wwid_op(unmark_failed, true) ++ ++int remember_cmdline_wwid(void) ++{ ++ FILE *f = NULL; ++ char buf[LINE_MAX], *next, *ptr; ++ int ret = 0; ++ ++ f = fopen("/proc/cmdline", "re"); ++ if (!f) { ++ condlog(0, "can't open /proc/cmdline : %s", strerror(errno)); ++ return -1; ++ } ++ ++ if (!fgets(buf, sizeof(buf), f)) { ++ if (ferror(f)) ++ condlog(0, "read of /proc/cmdline failed : %s", ++ strerror(errno)); ++ else ++ condlog(0, "couldn't read /proc/cmdline"); ++ fclose(f); ++ return -1; ++ } ++ fclose(f); ++ next = buf; ++ while((ptr = strstr(next, "mpath.wwid="))) { ++ ptr += 11; ++ next = strpbrk(ptr, " \t\n"); ++ if (next) { ++ *next = '\0'; ++ next++; ++ } ++ if (strlen(ptr)) { ++ if (remember_wwid(ptr) != 0) ++ ret = -1; ++ } ++ else { ++ condlog(0, "empty mpath.wwid kernel command line option"); ++ ret = -1; ++ } ++ if (!next) ++ break; ++ } ++ return ret; ++} +diff --git a/libmultipath/wwids.h b/libmultipath/wwids.h +index 0c6ee54d..e32a0b0e 100644 +--- a/libmultipath/wwids.h ++++ b/libmultipath/wwids.h +@@ -17,6 +17,7 @@ int remember_wwid(char *wwid); + int check_wwids_file(char *wwid, int write_wwid); + int remove_wwid(char *wwid); + int replace_wwids(vector mp); ++int remember_cmdline_wwid(void); + + enum { + WWID_IS_NOT_FAILED = 0, +diff --git a/multipath/main.c b/multipath/main.c +index 4f4d8e89..22aff7be 100644 +--- a/multipath/main.c ++++ b/multipath/main.c +@@ -138,7 +138,7 @@ usage (char * progname) + fprintf (stderr, " %s [-v level] [-R retries] -F\n", progname); + fprintf (stderr, " %s [-v level] [-l|-ll] [device]\n", progname); + fprintf (stderr, " %s [-v level] [-a|-w] device\n", progname); +- fprintf (stderr, " %s [-v level] -W\n", progname); ++ fprintf (stderr, " %s [-v level] [-A|-W]\n", progname); + fprintf (stderr, " %s [-v level] [-i] [-c|-C] device\n", progname); + fprintf (stderr, " %s [-v level] [-i] [-u|-U]\n", progname); + fprintf (stderr, " %s [-h|-t|-T]\n", progname); +@@ -151,6 +151,8 @@ usage (char * progname) + " -f flush a multipath device map\n" + " -F flush all multipath device maps\n" + " -a add a device wwid to the wwids file\n" ++ " -A add devices from kernel command line mpath.wwids\n" ++ " parameters to wwids file\n" + " -c check if a device should be a path in a multipath device\n" + " -C check if a multipath device has usable paths\n" + " -q allow queue_if_no_path when multipathd is not running\n" +@@ -905,7 +907,7 @@ main (int argc, char *argv[]) + exit(RTVL_FAIL); + multipath_conf = conf; + conf->retrigger_tries = 0; +- while ((arg = getopt(argc, argv, ":adcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) { ++ while ((arg = getopt(argc, argv, ":aAdcChl::FfM:v:p:b:BrR:itTquUwW")) != EOF ) { + switch(arg) { + case 1: printf("optarg : %s\n",optarg); + break; +@@ -975,6 +977,10 @@ main (int argc, char *argv[]) + case 'T': + cmd = CMD_DUMP_CONFIG; + break; ++ case 'A': ++ if (remember_cmdline_wwid() != 0) ++ exit(RTVL_FAIL); ++ exit(RTVL_OK); + case 'h': + usage(argv[0]); + exit(RTVL_OK); +diff --git a/multipath/multipath.8 b/multipath/multipath.8 +index 9cdd05a3..8befc45a 100644 +--- a/multipath/multipath.8 ++++ b/multipath/multipath.8 +@@ -63,7 +63,7 @@ multipath \- Device mapper target autoconfig. + .B multipath + .RB [\| \-v\ \c + .IR level \|] +-.B -W ++.RB [\| \-A | \-W \|] + . + .LP + .B multipath +@@ -145,6 +145,11 @@ device mapper, path checkers ...). + Add the WWID for the specified device to the WWIDs file. + . + .TP ++.B \-A ++Add the WWIDs from any kernel command line \fImpath.wwid\fR parameters to the ++WWIDs file. ++. ++.TP + .B \-w + Remove the WWID for the specified device from the WWIDs file. + . +diff --git a/multipathd/multipathd.service b/multipathd/multipathd.service +index 17434cef..0fbcc46b 100644 +--- a/multipathd/multipathd.service ++++ b/multipathd/multipathd.service +@@ -15,6 +15,7 @@ Type=notify + NotifyAccess=main + LimitCORE=infinity + ExecStartPre=-/sbin/modprobe -a scsi_dh_alua scsi_dh_emc scsi_dh_rdac dm-multipath ++ExecStartPre=-/sbin/multipath -A + ExecStart=/sbin/multipathd -d -s + ExecReload=/sbin/multipathd reconfigure + TasksMax=infinity +-- +2.17.2 + diff --git a/SOURCES/0016-RH-warn-on-invalid-regex-instead-of-failing.patch b/SOURCES/0016-RH-warn-on-invalid-regex-instead-of-failing.patch new file mode 100644 index 0000000..6835f65 --- /dev/null +++ b/SOURCES/0016-RH-warn-on-invalid-regex-instead-of-failing.patch @@ -0,0 +1,121 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Mon, 6 Nov 2017 21:39:28 -0600 +Subject: [PATCH] RH: warn on invalid regex instead of failing + +multipath.conf used to allow "*" as a match everything regular expression, +instead of requiring ".*". Instead of erroring when the old style +regular expressions are used, it should print a warning and convert +them. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/dict.c | 27 +++++++++++++++++++++------ + libmultipath/parser.c | 13 +++++++++++++ + libmultipath/parser.h | 1 + + 3 files changed, 35 insertions(+), 6 deletions(-) + +diff --git a/libmultipath/dict.c b/libmultipath/dict.c +index d6d8b79b..07d2ba8f 100644 +--- a/libmultipath/dict.c ++++ b/libmultipath/dict.c +@@ -58,6 +58,21 @@ set_str(vector strvec, void *ptr) + return 0; + } + ++static int ++set_regex(vector strvec, void *ptr) ++{ ++ char **str_ptr = (char **)ptr; ++ ++ if (*str_ptr) ++ FREE(*str_ptr); ++ *str_ptr = set_regex_value(strvec); ++ ++ if (!*str_ptr) ++ return 1; ++ ++ return 0; ++} ++ + static int + set_yes_no(vector strvec, void *ptr) + { +@@ -1455,7 +1470,7 @@ ble_ ## option ## _handler (struct config *conf, vector strvec) \ + if (!conf->option) \ + return 1; \ + \ +- buff = set_value(strvec); \ ++ buff = set_regex_value(strvec); \ + if (!buff) \ + return 1; \ + \ +@@ -1471,7 +1486,7 @@ ble_ ## option ## _ ## name ## _handler (struct config *conf, vector strvec) \ + if (!conf->option) \ + return 1; \ + \ +- buff = set_value(strvec); \ ++ buff = set_regex_value(strvec); \ + if (!buff) \ + return 1; \ + \ +@@ -1574,16 +1589,16 @@ device_handler(struct config *conf, vector strvec) + return 0; + } + +-declare_hw_handler(vendor, set_str) ++declare_hw_handler(vendor, set_regex) + declare_hw_snprint(vendor, print_str) + +-declare_hw_handler(product, set_str) ++declare_hw_handler(product, set_regex) + declare_hw_snprint(product, print_str) + +-declare_hw_handler(revision, set_str) ++declare_hw_handler(revision, set_regex) + declare_hw_snprint(revision, print_str) + +-declare_hw_handler(bl_product, set_str) ++declare_hw_handler(bl_product, set_regex) + declare_hw_snprint(bl_product, print_str) + + declare_hw_handler(hwhandler, set_str) +diff --git a/libmultipath/parser.c b/libmultipath/parser.c +index e00c5fff..15495d26 100644 +--- a/libmultipath/parser.c ++++ b/libmultipath/parser.c +@@ -382,6 +382,19 @@ oom: + return NULL; + } + ++void * ++set_regex_value(vector strvec) ++{ ++ char *buff = set_value(strvec); ++ ++ if (buff && strcmp("*", buff) == 0) { ++ condlog(0, "Invalid regular expression \"*\" in multipath.conf. Using \".*\""); ++ FREE(buff); ++ return strdup(".*"); ++ } ++ return buff; ++} ++ + /* non-recursive configuration stream handler */ + static int kw_level = 0; + +diff --git a/libmultipath/parser.h b/libmultipath/parser.h +index 62906e98..b7917052 100644 +--- a/libmultipath/parser.h ++++ b/libmultipath/parser.h +@@ -77,6 +77,7 @@ extern void dump_keywords(vector keydump, int level); + extern void free_keywords(vector keywords); + extern vector alloc_strvec(char *string); + extern void *set_value(vector strvec); ++extern void *set_regex_value(vector strvec); + extern int process_file(struct config *conf, char *conf_file); + extern struct keyword * find_keyword(vector keywords, vector v, char * name); + int snprint_keyword(char *buff, int len, char *fmt, struct keyword *kw, +-- +2.17.2 + diff --git a/SOURCES/0017-RH-reset-default-find_mutipaths-value-to-off.patch b/SOURCES/0017-RH-reset-default-find_mutipaths-value-to-off.patch new file mode 100644 index 0000000..e48fc59 --- /dev/null +++ b/SOURCES/0017-RH-reset-default-find_mutipaths-value-to-off.patch @@ -0,0 +1,29 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 7 Jun 2018 17:43:52 -0500 +Subject: [PATCH] RH: reset default find_mutipaths value to off + +Upstream has changed to default find_multipaths to "strict". For now +Redhat will retain the previous default of "off". + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/defaults.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/defaults.h b/libmultipath/defaults.h +index 4dfe007c..d910da51 100644 +--- a/libmultipath/defaults.h ++++ b/libmultipath/defaults.h +@@ -20,7 +20,7 @@ + #define DEFAULT_NO_PATH_RETRY NO_PATH_RETRY_UNDEF + #define DEFAULT_VERBOSITY 2 + #define DEFAULT_REASSIGN_MAPS 0 +-#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_STRICT ++#define DEFAULT_FIND_MULTIPATHS FIND_MULTIPATHS_OFF + #define DEFAULT_FAST_IO_FAIL 5 + #define DEFAULT_DEV_LOSS_TMO 600 + #define DEFAULT_RETAIN_HWHANDLER RETAIN_HWHANDLER_ON +-- +2.17.2 + diff --git a/SOURCES/0018-RH-Fix-nvme-compilation-warning.patch b/SOURCES/0018-RH-Fix-nvme-compilation-warning.patch new file mode 100644 index 0000000..fc6ccd7 --- /dev/null +++ b/SOURCES/0018-RH-Fix-nvme-compilation-warning.patch @@ -0,0 +1,26 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Fri, 25 Jan 2019 14:54:56 -0600 +Subject: [PATCH] RH: Fix nvme compilation warning + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/nvme/argconfig.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libmultipath/nvme/argconfig.h b/libmultipath/nvme/argconfig.h +index adb192b6..bfd10ef8 100644 +--- a/libmultipath/nvme/argconfig.h ++++ b/libmultipath/nvme/argconfig.h +@@ -76,7 +76,7 @@ struct argconfig_commandline_options { + extern "C" { + #endif + +-typedef void argconfig_help_func(); ++typedef void argconfig_help_func(void); + void argconfig_append_usage(const char *str); + void argconfig_print_help(const char *program_desc, + const struct argconfig_commandline_options *options); +-- +2.17.2 + diff --git a/SOURCES/0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch b/SOURCES/0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch new file mode 100644 index 0000000..24c3ebd --- /dev/null +++ b/SOURCES/0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch @@ -0,0 +1,87 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Benjamin Marzinski +Date: Thu, 11 Apr 2019 13:25:42 -0500 +Subject: [PATCH] RH: attempt to get ANA info via sysfs first + +When the ANA prioritizer is run, first see if the "ana_state" sysfs file +exists, and if it does, try to read the state from there. If that fails, +fallback to using an ioctl. + +Signed-off-by: Benjamin Marzinski +--- + libmultipath/prioritizers/ana.c | 31 +++++++++++++++++++++++++++++-- + 1 file changed, 29 insertions(+), 2 deletions(-) + +diff --git a/libmultipath/prioritizers/ana.c b/libmultipath/prioritizers/ana.c +index 2673d9d9..f34ade28 100644 +--- a/libmultipath/prioritizers/ana.c ++++ b/libmultipath/prioritizers/ana.c +@@ -24,6 +24,7 @@ + #include "prio.h" + #include "util.h" + #include "structs.h" ++#include "sysfs.h" + + enum { + ANA_ERR_GETCTRL_FAILED = 1, +@@ -36,6 +37,7 @@ enum { + ANA_ERR_GETNS_FAILED, + ANA_ERR_NO_MEMORY, + ANA_ERR_NO_INFORMATION, ++ ANA_ERR_INVALID_STATE, + }; + + static const char *ana_errmsg[] = { +@@ -49,6 +51,7 @@ static const char *ana_errmsg[] = { + [ANA_ERR_GETNS_FAILED] = "couldn't get namespace info", + [ANA_ERR_NO_MEMORY] = "out of memory", + [ANA_ERR_NO_INFORMATION] = "invalid fd", ++ [ANA_ERR_INVALID_STATE] = "invalid state", + }; + + static const char *anas_string[] = { +@@ -106,6 +109,27 @@ static int get_ana_state(__u32 nsid, __u32 anagrpid, void *ana_log, + return -ANA_ERR_GETANAS_NOTFOUND; + } + ++int get_ana_info_sysfs(struct path *pp) ++{ ++ char state[32]; ++ ++ if (!pp->udev || sysfs_attr_get_value(pp->udev, "ana_state", state, ++ sizeof(state)) <= 0) ++ return -ANA_ERR_NO_INFORMATION; ++ ++ if (strcmp(state, "optimized") == 0) ++ return NVME_ANA_OPTIMIZED; ++ if (strcmp(state, "non-optimized") == 0) ++ return NVME_ANA_NONOPTIMIZED; ++ if (strcmp(state, "inaccessible") == 0) ++ return NVME_ANA_INACCESSIBLE; ++ if (strcmp(state, "persistent-loss") == 0) ++ return NVME_ANA_PERSISTENT_LOSS; ++ if (strcmp(state, "change") == 0) ++ return NVME_ANA_CHANGE; ++ return -ANA_ERR_INVALID_STATE; ++} ++ + int get_ana_info(struct path * pp, unsigned int timeout) + { + int rc; +@@ -208,8 +232,11 @@ int getprio(struct path *pp, char *args, unsigned int timeout) + + if (pp->fd < 0) + rc = -ANA_ERR_NO_INFORMATION; +- else +- rc = get_ana_info(pp, timeout); ++ else { ++ rc = get_ana_info_sysfs(pp); ++ if (rc < 0) ++ rc = get_ana_info(pp, timeout); ++ } + + switch (rc) { + case NVME_ANA_OPTIMIZED: +-- +2.17.2 + diff --git a/SOURCES/multipath.conf b/SOURCES/multipath.conf new file mode 100644 index 0000000..c7684fe --- /dev/null +++ b/SOURCES/multipath.conf @@ -0,0 +1,93 @@ +# This is a basic configuration file with some examples, for device mapper +# multipath. +# +# For a complete list of the default configuration values, run either +# multipath -t +# or +# multipathd show config +# +# For a list of configuration options with descriptions, see the multipath.conf +# man page + +## By default, devices with vendor = "IBM" and product = "S/390.*" are +## 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 + find_multipaths 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 +# 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 +# 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 +# } +#} diff --git a/SPECS/device-mapper-multipath.spec b/SPECS/device-mapper-multipath.spec new file mode 100644 index 0000000..637e17a --- /dev/null +++ b/SPECS/device-mapper-multipath.spec @@ -0,0 +1,1706 @@ +Summary: Tools to manage multipath devices using device-mapper +Name: device-mapper-multipath +Version: 0.8.3 +Release: 3%{?dist} +License: GPLv2 +Group: System Environment/Base +URL: http://christophe.varoqui.free.fr/ + +# The source for this package was pulled from upstream's git repo. Use the +# following command to generate the tarball +#curl "https://git.opensvc.com/?p=multipath-tools/.git;a=snapshot;h=refs/tags/0.8.3;sf=tgz" -o multipath-tools-0.8.3.tgz +Source0: multipath-tools-0.8.3.tgz +Source1: multipath.conf +Patch00001: 0001-multipathd-warn-when-configuration-has-been-changed.patch +Patch00002: 0002-libmultipath-fix-leak-in-foreign-code.patch +Patch00003: 0003-Fix-leak-in-mpathpersist.patch +Patch00004: 0004-libmultipath-remove-unused-path-prio_args.patch +Patch00005: 0005-libmultipath-constify-get_unaligned_be.patch +Patch00006: 0006-libmultipath-add-missing-hwe-mpe-variable-merges.patch +Patch00007: 0007-libmultipath-fix-sgio_get_vpd-looping.patch +Patch00008: 0008-libmultipath-add-vend_id-to-get_vpd_sgio.patch +Patch00009: 0009-libmultipath-add-code-to-get-vendor-specific-vpd-dat.patch +Patch00010: 0010-RH-fixup-udev-rules-for-redhat.patch +Patch00011: 0011-RH-Remove-the-property-blacklist-exception-builtin.patch +Patch00012: 0012-RH-don-t-start-without-a-config-file.patch +Patch00013: 0013-RH-use-rpm-optflags-if-present.patch +Patch00014: 0014-RH-add-mpathconf.patch +Patch00015: 0015-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch +Patch00016: 0016-RH-warn-on-invalid-regex-instead-of-failing.patch +Patch00017: 0017-RH-reset-default-find_mutipaths-value-to-off.patch +Patch00018: 0018-RH-Fix-nvme-compilation-warning.patch +Patch00019: 0019-RH-attempt-to-get-ANA-info-via-sysfs-first.patch + +# runtime +Requires: %{name}-libs = %{version}-%{release} +Requires: kpartx = %{version}-%{release} +Requires: device-mapper >= 1.02.96 +Requires: userspace-rcu +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + +# build/setup +BuildRequires: libaio-devel, device-mapper-devel >= 1.02.89 +BuildRequires: libselinux-devel, libsepol-devel +BuildRequires: readline-devel, ncurses-devel +BuildRequires: systemd-units, systemd-devel +BuildRequires: json-c-devel, perl-interpreter, pkgconfig, gcc +BuildRequires: userspace-rcu-devel + +%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. + +%package libs +Summary: The %{name} modules and shared library +Group: System Environment/Libraries +# only libmpathcmd is LGPLv2+ +License: GPLv2 and LGPLv2+ + +%description libs +The %{name}-libs provides the path checker +and prioritizer modules. It also contains the libmpathpersist and +libmpathcmd shared libraries, as well as multipath's internal library, +libmultipath. + +%package devel +Summary: Development libraries and headers for %{name} +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} + +%description devel +This package contains the files need to develop applications that use +device-mapper-multipath's lbmpathpersist and libmpathcmd libraries. + +%package -n kpartx +Summary: Partition device manager for device-mapper devices +Group: System Environment/Base + +%description -n kpartx +kpartx manages partition creation and removal for device-mapper devices. + +%package -n libdmmp +Summary: device-mapper-multipath C API library +Group: System Environment/Libraries +License: GPLv3+ +Requires: json-c +Requires: %{name} = %{version}-%{release} +Requires: %{name}-libs = %{version}-%{release} + +%description -n libdmmp +This package contains the shared library for the device-mapper-multipath +C API library. + +%package -n libdmmp-devel +Summary: device-mapper-multipath C API library headers +Group: Development/Libraries +Requires: pkgconfig +Requires: libdmmp = %{version}-%{release} + +%description -n libdmmp-devel +This package contains the files needed to develop applications that use +device-mapper-multipath's libdmmp C API library + +%prep +%autosetup -n multipath-tools-0.8.3 -p1 +cp %{SOURCE1} . + +%build +%define _sbindir /usr/sbin +%define _libdir /usr/%{_lib} +%define _libmpathdir %{_libdir}/multipath +%define _pkgconfdir %{_libdir}/pkgconfig +make %{?_smp_mflags} LIB=%{_lib} + +%install +make install \ + DESTDIR=%{buildroot} \ + bindir=%{_sbindir} \ + syslibdir=%{_libdir} \ + usrlibdir=%{_libdir} \ + libdir=%{_libmpathdir} \ + rcdir=%{_initrddir} \ + unitdir=%{_unitdir} \ + includedir=%{_includedir} \ + pkgconfdir=%{_pkgconfdir} + +# tree fix up +install -d %{buildroot}/etc/multipath +rm -rf %{buildroot}/%{_initrddir} + + +%post +%systemd_post multipathd.service + +%preun +%systemd_preun multipathd.service + +%postun +if [ $1 -ge 1 ] ; then + /sbin/multipathd forcequeueing daemon > /dev/null 2>&1 || : +fi +%systemd_postun_with_restart multipathd.service + +%triggerun -- %{name} < 0.4.9-37 +# make sure old systemd symlinks are removed after changing the [Install] +# section in multipathd.service from multi-user.target to sysinit.target +/bin/systemctl --quiet is-enabled multipathd.service >/dev/null 2>&1 && /bin/systemctl reenable multipathd.service ||: + +%files +%defattr(-,root,root,-) +%{_sbindir}/multipath +%{_sbindir}/multipathd +%{_sbindir}/mpathconf +%{_sbindir}/mpathpersist +%{_unitdir}/multipathd.service +%{_unitdir}/multipathd.socket +%{_mandir}/man5/multipath.conf.5.gz +%{_mandir}/man8/multipath.8.gz +%{_mandir}/man8/multipathd.8.gz +%{_mandir}/man8/mpathconf.8.gz +%{_mandir}/man8/mpathpersist.8.gz +%config %{_udevrulesdir}/62-multipath.rules +%config %{_udevrulesdir}/11-dm-mpath.rules +%{!?_licensedir:%global license %%doc} +%license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 +%doc README +%doc README.alua +%doc multipath.conf +%dir /etc/multipath + +%files libs +%defattr(-,root,root,-) +%doc README +%{!?_licensedir:%global license %%doc} +%license LICENSES/GPL-2.0 LICENSES/LGPL-2.0 +%{_libdir}/libmultipath.so +%{_libdir}/libmultipath.so.* +%{_libdir}/libmpathpersist.so.* +%{_libdir}/libmpathcmd.so.* +%dir %{_libmpathdir} +%{_libmpathdir}/* + +%post libs -p /sbin/ldconfig + +%postun libs -p /sbin/ldconfig + +%files devel +%defattr(-,root,root,-) +%doc README LICENSES/GPL-2.0 LICENSES/LGPL-2.0 +%{_libdir}/libmpathpersist.so +%{_libdir}/libmpathcmd.so +%{_includedir}/mpath_cmd.h +%{_includedir}/mpath_persist.h +%{_mandir}/man3/mpath_persistent_reserve_in.3.gz +%{_mandir}/man3/mpath_persistent_reserve_out.3.gz + +%files -n kpartx +%defattr(-,root,root,-) +%doc README +%{!?_licensedir:%global license %%doc} +%license LICENSES/GPL-2.0 +%{_sbindir}/kpartx +/usr/lib/udev/kpartx_id +%{_mandir}/man8/kpartx.8.gz +%config %{_udevrulesdir}/11-dm-parts.rules +%config %{_udevrulesdir}/66-kpartx.rules +%config %{_udevrulesdir}/68-del-part-nodes.rules + +%files -n libdmmp +%defattr(-,root,root,-) +%doc README LICENSES/GPL-3.0 +%{_libdir}/libdmmp.so.* + +%post -n libdmmp -p /sbin/ldconfig + +%postun -n libdmmp -p /sbin/ldconfig + +%files -n libdmmp-devel +%defattr(-,root,root,-) +%doc README LICENSES/GPL-3.0 +%{_libdir}/libdmmp.so +%dir %{_includedir}/libdmmp +%{_includedir}/libdmmp/* +%{_mandir}/man3/dmmp_* +%{_mandir}/man3/libdmmp.h.3.gz +%{_pkgconfdir}/libdmmp.pc + +%changelog +* Fri Nov 8 2019 Benjamin Marzinski 0.8.3-3 +- Rename files + * Previous patches 0004-0013 are now 0010-0019 + * 0014-RH-add-mpathconf.patch now makes mpathconf default to not + printing foreign devices (bz #1760709) +- Add 0004-libmultipath-remove-unused-path-prio_args.patch +- Add 0005-libmultipath-constify-get_unaligned_be.patch +- Add 0006-libmultipath-add-missing-hwe-mpe-variable-merges.patch +- Add 0007-libmultipath-fix-sgio_get_vpd-looping.patch +- Add 0008-libmultipath-add-vend_id-to-get_vpd_sgio.patch +- Add 0009-libmultipath-add-code-to-get-vendor-specific-vpd-dat.patch + * Add the '%g' maps and paths format wildcard, and the vpd_vendor + multipath.conf devices section parameter. (bz #1527212) +- Resolves: bz #1527212, #1760709 + +* Mon Oct 14 2019 Benjamin Marzinski 0.8.3-2 +- Update CI tests +- Related: bz #1690515 + +* Tue Oct 8 2019 Benjamin Marzinski 0.8.3-1 +- Update Source to upstream version 0.8.3 + * This version includes the fixes for bz #1690515, #1703439, + #1719562 & #1747534 + * Previous patches 0001-0017 & 0031-0036 are included in this version +- Rename files + * Previous patches 0018-0026 & 0028 are now 0004-0013 + * 0008-RH-add-mpathconf.patch has been modified to add a + --property_blacklist option to fix bz #1753729 +- Add 0001-multipathd-warn-when-configuration-has-been-changed.patch + * Multipath now logs a warning message when the configuration file + has been changed to fix bz #1750594 +- Add 0002-libmultipath-fix-leak-in-foreign-code.patch +- Add 0003-Fix-leak-in-mpathpersist.patch + * The above 3 patches have been submitted upstream +- Resolves: bz #1690515, #1703439, #1719562, #1747534, #1750594, #1753729 + +* Mon Jun 3 2019 Benjamin Marzinski 0.8.0-5 +- Bump release number for test fix commit 0b68e623 +- Related: bz #1666322 + +* Tue May 28 2019 Benjamin Marzinski 0.8.0-4 +- Add 0035-BZ-1700911-hwtable-add-Lenovo-DE-series.patch +- Add 0036-libmultipath-make-vector_foreach_slot_backwards-work.patch + * Fix for bz #1713459 +- Fixes for bz #1666322 and #1669097 were included in 0.8.0 upstream + code +- Resolves: bz #1666322, #1669097, #1700911, #1713459 + +* Thu May 16 2019 Benjamin Marzinski 0.8.0-3 +- Add 0031-libmultipath-handle-clock_gettime-failures-in-tur-ch.patch +- Add 0032-kpartx-fail-if-dup-of-dasd-file-descriptor-fails.patch +- Add 0033-multipathd-fix-REALLOC_REPLY-with-max-length-reply.patch +- Add 0034-multipathd-handle-NULL-return-from-genhelp_handler.patch + * The above 4 patches have been submitted upstream +- Related: bz #1498546 + +* Tue Apr 30 2019 Benjamin Marzinski 0.8.0-2 +- Add 0029-BZ-1700451-check-on-multipathd-without-starting-it.patch +- Add 0030-BZ-1700451-test-socket-connection-in-non-blocking-mo.patch + * the "multipath -u" call in 62-multipath.rules should no longer hang + on multipathd startup. +- Resolves: bz #1700451 + +* Mon Apr 8 2019 Benjamin Marzinski 0.8.0-1 +- Update Source to upstream version 0.8.0 + * Previous patches 0001-0006 & 0015-0019 are included in this commit +- Rename files + * Previous patches 0007-0014 are now 0018-0025 + * Previous patches 0020-0023 are now 0001, 0006 & 0007 +- Add 0002-libmultipath-handle-existing-paths-in-marginal_path-.patch +- Add 0003-multipathd-cleanup-marginal-paths-checking-timers.patch +- Add 0004-libmultipath-fix-marginal-paths-queueing-errors.patch +- Add 0005-libmultipath-fix-marginal_paths-nr_active-check.patch +- Add 0008-libmutipath-continue-to-use-old-state-on-PATH_PENDIN.patch +- Add 0009-multipathd-use-update_path_groups-instead-of-reload_.patch +- Add 0010-multipath.conf-add-missing-options-to-man-page.patch +- Add 0011-libmultipath-add-get_uid-fallback-code-for-NVMe-devi.patch +- Add 0012-libmulitpath-cleanup-uid_fallback-code.patch +- Add 0013-multipathd-handle-changed-wwids-by-removal-and-addit.patch + * Multipath will now automatically remove and re-add paths if + their wwid changes +- Add 0014-multipathd-remove-wwid_changed-path-attribute.patch +- Add 0015-multipathd-ignore-disable_changed_wwids.patch + * Since paths are now getting removed and re-added there is + no need to disable them. +- Add 0016-multipathd-Don-t-use-fallback-code-after-getting-wwi.patch +- Add 0017-libmultipath-silence-dm_is_mpath-error-messages.patch +- Add 0026-RH-Fix-nvme-compilation-warning.patch +- Add 0027-Fix-systemd-version-detection.patch + * The above 16 patches have been submitted upstream +- Add 0028-RH-attempt-to-get-ANA-info-via-sysfs-first.patch + * Red Hat has a sysfs method to access the ANA state, which isn't + upstream, and will not be. This will probably go away in the + future. +- Resolves: bz #1498546 + +* Mon Feb 25 2019 Benjamin Marzinski 0.7.8-7 +- Add 0023-BZ-1673167-fixup-wwid-recheck.patch +- Resolves: bz #1673167 + +* Sun Feb 24 2019 Benjamin Marzinski 0.7.8-6 +- Fix multipath_conf_syntax CI test + * need to wait for udev to settle before removing multipath device +- Resolves: bz #1673167 + +* Mon Feb 18 2019 Benjamin Marzinski 0.7.8-5 +- Add 0021-BZ-1673167-Fix-miscounting-active-paths.patch +- Add 0022-BZ-1673167-ignore-failed-wwid-recheck.patch +- Resolves: bz #1673167 + +* Thu Jan 24 2019 Benjamin Marzinski 0.7.8-4 +- Add 0020-BZ-1668693-disable-user_friendly_names-for-NetApp.patch +- Resolves: bz #1668693 + +* Tue Dec 11 2018 Benjamin Marzinski 0.7.8-3 +- Add 0017-BZ-1648397-fix-mpp-hwe-handling-when-paths-are-freed.patch + * Fix crash by deleting in use hardware entry list pointer +- Add 0018-libmultipath-cleanup-pthread_cleanup_pop-call.patch + * Fix compiler warning +- Add 0019-libmultipath-fix-false-removes-in-dmevents-polling-c.patch + * The above 3 patches have been accepted upstream +- Resolves: bz #1648397 + +* Wed Oct 10 2018 Benjamin Marzinski 0.7.8-2 +- Add 0015-libmultipath-free-allocated-value-in-set_int.patch +- Add 0016-kpartx-fix-new-memory-leak-in-dm_find_part.patch +- change hardcoded /usr/lib/udev/rules.d to _udevrulesdir +- Resolves: bz #1606947 + +* Wed Oct 10 2018 Benjamin Marzinski 0.7.8-1 +- Update Source to upstream version 0.7.8 + * Previous patches 0001-0011 are included in this version +- Rename files + * Previous patches 0012-0019 are now patches 0007-0014 +- Add 0001-multipath-tweak-logging-style.patch +- Add 0002-multipathd-check-for-NULL-udevice-in-cli_add_path.patch +- Add 0003-libmultipath-remove-max_fds-code-duplication.patch +- Add 0004-multipathd-set-return-code-for-multipathd-commands.patch +- Add 0005-mpathpersist-fix-registration-rollback-issue.patch +- Add 0006-libmultipath-timeout-on-unresponsive-tur-thread.patch + * The above 6 patches have been submitted upstream +- Resolves: bz #1606947, #1631883 + +* Tue Jul 17 2018 Benjamin Marzinski 0.7.7-2.gitef6d98b +- Update Source to latest upstream commit + * Previous patches 0001-0018 are included in this commit +- Rename files + * Previous patches 0019-0028 are now patches 0002-0003 & 0012-0019 +- Add 0001-libmultipath-remove-last-of-rbd-code.patch +- Add 0004-mpathpersist-add-param-alltgpt-option.patch + * mpathpersist now accepts --param-alltgpt +- Add 0005-libmutipath-remove-unused-IDE-bus-type.patch +- Add 0006-multipathd-add-new-protocol-path-wildcard.patch + * multipathd show paths format now accepts %P for the path protocol/transport +- Add 0007-libmultipath-add-protocol-blacklist-option.patch + * You can now use the "protocol" blacklist section parameter to blacklist + by protocol/transport +- Add 0008-libmultipath-remove-_filter_-blacklist-functions.patch +- Add 0009-multipath-tests-change-to-work-with-old-make-version.patch +- Add 0010-multipath-tests-add-blacklist-tests.patch +- Add 0011-mpathpersist-add-missing-param-rk-usage-info.patch +- Refresh 0013-RH-Remove-the-property-blacklist-exception-builtin.patch +- Modify 0016-RH-add-mpathconf.patch + * improve usage message and man page +- Modify device-mapper-multipath.spec + * updated dependencies + +* Tue Jun 12 2018 Benjamin Marzinski 0.7.7-1 +- Update Source to 0.7.7 + * Previous patches 0001-0009 & 0016 are included in this commit +- Add upstream patches since 0.7.7 + * patches 0001-0012 are from upstream commits since 0.7.7 +- Add 0013-libmultipath-print-correct-default-for-delay_-_check.patch + * fix minor configuration printing issue. posted upstream +- Add 0014-multipath.conf.5-clarify-property-whitelist-handling.patch + * clarify property blacklist_excecptions handling in man page + posted upstream +- Add 0015-mpathpersist-add-all_tg_pt-option.patch + * add new all_tg_pt multpiath.conf option. posted upstream +- Add 0016-libmultipath-remove-rbd-code.patch + * remove unused rbd code. posted upstream +- Add 0017-mpathpersist-fix-aptpl-support.patch + * add ":aptpl" suffix for reservation_key to fix aptpl support. + posted upstream +- Add 0018-multipath-don-t-check-timestamps-without-a-path.patch + * fix multipath null dereference crash. posted upstream +- Add 0019-libmultipath-fix-detect-alua-corner-case.patch + * fix alua detection with retain_hardware_handler set to off. posted + upstream +- Add 0020-multipath-fix-setting-conf-version.patch + * multipath wasn't setting the kernel version correctly. posted + upstream +- Add 0028-RH-reset-default-find_mutipaths-value-to-off.patch + * default to RHEL7 and older device detection style. Redhat specific, + to keep customer experience the same. +- Rename files + * Previous patches 0010-0015 & 0017 are now patches 0021-0027 +- Modify 0021-RH-fixup-udev-rules-for-redhat.patch + * Fix spurious compile warning with redhat compile options +- Modify 0022-RH-Remove-the-property-blacklist-exception-builtin.patch + * clarify changes in man page + +* Tue May 15 2018 Benjamin Marzinski 0.7.6-4.git1cb704b +- Rename files + * Previous patches 0010-0017 are now patches 0012-0019 + +* Tue Apr 24 2018 Benjamin Marzinski 0.7.6-3.git1cb704b +- Add 0008-multipathd-add-failures-path-format-wildcard.patch +- Add 0009-multipathd-fix-reservation_key-check.patch +- Rename files + * Previous patches 0008-0015 are now patches 0010-0017 + +* Fri Apr 13 2018 Benjamin Marzinski 0.7.6-2.git1cb704b +- Add 0007-libmultipath-Fix-logic-in-should_multipath.patch + * fix bug in identifying multipathable devices. posted upstream +- Rename files + * Previous patches 0007-0014 are now patches 0008-0015 + +* Tue Apr 02 2018 Björn Esser - 0.7.6-1.git1cb704b +- Update Source to the latest upstream commit + * Previous patches 0001-0014 are included in this commit + * Previous patches 0015-0022 are now patches 0007-0014 +- 0001-multipathd-remove-incorrect-pthread_testcancel.patch + * Fixed pthread cancellation issue. posted upstream +- 0002-multipath-add-comments.patch + * Posted upstream +- 0003-multipathd-minor-dmevents-polling-code-cleanups.patch + * Fixed minor polling issues. posted upstream +- 0004-multipathd-remove-unneeded-function-parameter.patch + * Posted upstream +- 0005-mpathcmd-fix-libmpathcmd-license.patch + * License clarification. posted upstream +- 0006-libmultipath-don-t-print-undefined-values.patch + * Fixed bug in 'multipath show config'. posted upstream + +* Tue Mar 06 2018 Björn Esser - 0.7.4-2.git07e7bd5 +- Rebuilt for libjson-c.so.4 (json-c v0.13.1) + +* Thu Feb 15 2018 Benjamin Marzinski 0.7.4-1.git07e7bd5 +- Update Source to the latest upstream commit + * Previous patches 0001-0006 are included in this commit + * Previous patches 0007-0014 are now patches 0015-0022 +- Add 0001-libmultipath-fix-tur-checker-locking.patch + * Fixed spinlock bug. posted upstream +- Add 0002-multipath-fix-DEF_TIMEOUT-use.patch + * Add missing sec to ms conversion. posted upstream +- Add 0003-multipathd-remove-coalesce_paths-from-ev_add_map.patch + * Remove unused code. posted upstream +- Add 0004-multipathd-remove-unused-configure-parameter.patch + * Remove unused code. posted upstream +- Add 0005-Fix-set_no_path_retry-regression.patch + * Fix issue with queueing and path addition. posted upstream +- Add 0006-multipathd-change-spurious-uevent-msg-priority.patch + * Change message priority to Notice. posted upstream +- Add 0007-multipath-print-sysfs-state-in-fast-list-mode.patch + * Show sysfs state correctly in fast list mode (-l). posted upstream +- Add 0008-libmultipath-move-remove_map-waiter-code-to-multipat.patch + * Move code around. posted upstream +- Add 0009-move-waiter-code-from-libmultipath-to-multipathd.patch + * Move code around. posted upstream +- Add 0010-call-start_waiter_thread-before-setup_multipath.patch + * Fix race on multipath device creations. posted upstream +- Add 0011-libmultipath-add-helper-functions.patch + * posted upstream +- Add 0012-multipathd-RFC-add-new-polling-dmevents-waiter-threa.patch + * Add alternate method of getting dmevents, that doesn't + require a thread per device. posted upstream +- Add 0013-libmultipath-condlog-log-to-stderr.patch + * change condlog to log to stderr instead of stdout. posted upstream +- Add 0014-multipathd-fix-compiler-warning-for-uev_pathfail_che.patch + * fix indentation issue. posted upstream + +* Wed Feb 07 2018 Fedora Release Engineering - 0.7.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Dec 10 2017 Björn Esser - 0.7.3-2 +- Rebuilt for libjson-c.so.3 + +* Tue Nov 7 2017 Benjamin Marzinski 0.7.3-1 +- Update Source to upstream 0.7.3 release + * Previous patch 0001 is included in this commit, and 0002 was solved in a + different manner causing some change to previous patch 0003 + * Previous patches 0003-0010 are now patches 0007-0014 +- Add 0001-mpathpersist-Fix-invalid-condition-check.patch + * Fix incorrect check. posted upstream +- Add 0002-multipath-add-man-page-info-for-my-prkey-changes.patch + * Add missing man page info. posted upstream +- Add 0003-multipath-there-is-no-none-path-state.patch + * remove incorrect path state. posted upstream +- Add 0004-mutipath-updated-Huawei-storage-config.patch + * update builtin device configuration. posted upstream +- Add 0005-multipath-fix-doc-typo.patch + * fix man page typo. posted upstream +- Add 0006-multipath-add-ghost_delay-parameter.patch + * add new multipath.conf parameter "ghost_delay". posted upstream + + +* Tue Nov 7 2017 Benjamin Marzinski 0.7.1-8.git847cc43 +- Refresh 0001-libmultipath-update-3PARdata-builtin-config.patch +- Add 0010-RH-warn-on-invalid-regex-instead-of-failing.patch + * Change old-style multipath.conf regex "*" to a proper ".*" instead of + failing + +* Wed Aug 2 2017 Benjamin Marzinski 0.7.1-7.git847cc43 +- Modify 0005-RH-don-t-start-without-a-config-file.patch + * Fix man page typos + +* Mon Jul 31 2017 Troy Dawson - 0.7.1-6.git847cc43 +- Clean spec file - remove pre-fedora 23 cruft + +* Wed Jul 26 2017 Fedora Release Engineering - 0.7.1-5.git847cc43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Jul 21 2017 Benjamin Marzinski 0.7.1-4.git847cc43 +- Update Source to the latest upstream commit + * Previous patches 0001 and 0010-0013 are included in this commit. +- Add 0001-libmultipath-update-3PARdata-builtin-config.patch + * Change for building configuration. Posted upstream +- Modify 0006-RH-use-rpm-optflags-if-present.patch + * Add missing lines to actually use RPM_OPT_FLAGS. + +* Fri Jun 23 2017 Tom Callaway - 0.7.1-3.gitf21166a +- rebuild to resolve broken deps + +* Fri Jun 2 2017 Benjamin Marzinski 0.7.1-2.gitf21166a +- Modify 0004-RH-Remove-the-property-blacklist-exception-builtin.patch + * update multipath.conf.5 man page to remove builtin listing +- Modify 0005-RH-don-t-start-without-a-config-file.patch + * update multipathd.8 man page to note that a config file is necessary +- Modify 0007-RH-add-mpathconf.patch + * add property blacklist-exception to default config file +- Add 0010-libmultipath-change-how-RADOS-checker-is-enabled.patch + * Makefile now autodetects librados. Posted upstream +- Remove related RADOS option from spec file +- Add 0011-multipath-set-verbosity-to-default-during-config.patch + * Allow multipath to print warning messages during configuration. + Posted upstream +- Add 0012-mpath-skip-device-configs-without-vendor-product.patch + * device entries without vendor/product were breaking configurations. + Posted upsteam +- Add 0013-multipathd-fix-show-maps-json-crash.patch + * multipathd crashed showing json output with no devices. Posted + upstream + +* Tue May 23 2017 Benjamin Marzinski 0.7.1-1.gitf21166a +- Update Source to the latest upstream commit +- Add 0001-libmultipath-add-comment-about-resuming.patch + * posted upstream +- Add 0002-multipath-attempt-at-common-multipath.rules.patch + * under discussion upstream +- Add 0003-RH-fixup-udev-rules-for-redhat.patch + * Redhat uses different udev rules that some other distros, so multipath + has run at a different time. Not all upstream distros link /sbin and + /usr/sbin either. +- Add 0004-RH-Remove-the-property-blacklist-exception-builtin.patch + * Allow multipath to be used on devices without multiple paths. NAK'ed + upstream, but requested by Red Hat +- Add 0005-RH-don-t-start-without-a-config-file.patch + * Don't start multipath unless a config file exists. NAK'ed upstream, + but requested by Red Hat +- Add 0006-RH-use-rpm-optflags-if-present.patch + * Make the build system fedora friendly +- Add 0007-RH-add-mpathconf.patch + * Add tool to help configure multipath with Red Hat defaults. +- Add 0008-RH-add-wwids-from-kernel-cmdline-mpath.wwids-with-A.patch + * Make multipath able to claim devices based on the kernel command line + NAK'ed upstream but requested by Red Hat +- Add 0009-RH-trigger-change-uevent-on-new-device-creation.patch + * under discussion upstream + +* Wed Apr 12 2017 Benjamin Marzinski 0.4.9-87 +- Remove Epoch from device-mapper requires + * The RHEL releases of device-mapper set the Epoch, and this was + accidentally retained in the fedora spec file. + +* Fri Apr 7 2017 Benjamin Marzinski 0.4.9-86 +- Modify 0136-RHBZ-1304687-wait-for-map-add.patch + * switch to missing_uev_wait_timeout to stop waiting for uev +- Refresh 0137-RHBZ-1280524-clear-chkr-msg.patch +- Refresh 0150-RHBZ-1253913-fix-startup-msg.patch +- Refresh 0154-UPBZ-1291406-disable-reinstate.patch +- Refresh 0156-UPBZ-1313324-dont-fail-discovery.patch +- Refresh 0161-RHBZ-1311659-no-kpartx.patch +- Refresh 0167-RHBZ-1335176-fix-show-cmds.patch +- Add 0173-RH-update-man-page.patch +- Add 0174-RHBZ-1362396-modprobe.patch + * make starting the multipathd service modprobe dm-multipath in the + sysvinit scripts +- Add 0175-RHBZ-1357382-ordering.patch + * force multipathd.service to start after systemd-udev-trigger.service +- Add 0176-RHBZ-1363830-fix-rename.patch + * initialized a variable to make dm_rename not fail randomly +- Add 0177-libmultipath-correctly-initialize-pp-sg_id.patch + * This and all the following patches add the rbd patch checker +- Add 0178-libmultipath-add-rbd-discovery.patch +- Add 0179-multipath-tools-add-checker-callout-to-repair-path.patch +- Add 0180-multipath-tools-Add-rbd-checker.patch +- Add 0181-multipath-tools-Add-rbd-to-the-hwtable.patch +- Add 0182-multipath-tools-check-for-initialized-checker-before.patch +- Add 0183-multipathd-Don-t-call-repair-on-blacklisted-path.patch +- Add 0184-rbd-fix-sync-repair-support.patch +- Add 0185-rbd-check-for-nonshared-clients.patch +- Add 0186-rbd-check-for-exclusive-lock-enabled.patch +- Add 0187-rbd-fixup-log-messages.patch +- Add 0188-RHBZ-1368501-dont-exit.patch + * make multipathd not exit if it encounters recoverable errors on startup +- Add 0189-RHBZ-1368211-remove-retries.patch + * add "remove_retries" multipath.conf parameter to make multiple attempts + to remove a multipath device if it is busy. +- Add 0190-RHBZ-1380602-rbd-lock-on-read.patch + * pass lock_on_read when remapping image +- Add 0191-RHBZ-1169168-disable-changed-paths.patch + * add "disabled_changed_wwids" multipath.conf parameter to disable + paths whose wwid changes +- Add 0192-RHBZ-1362409-infinibox-config.patch +- Add 0194-RHBZ-1351964-kpartx-recurse.patch + * fix recursion on corrupt dos partitions +- Add 0195-RHBZ-1359510-no-daemon-msg.patch + * print a messages when multipathd isn't running +- Add 0196-RHBZ-1239173-dont-set-flag.patch + * don't set reload flag on reloads when you gain your first + valid path +- Add 0197-RHBZ-1394059-max-sectors-kb.patch + * add "max_sectors_kb" multipath.conf parameter to set max_sectors_kb + on a multipath device and all its path devices +- Add 0198-RHBZ-1372032-detect-path-checker.patch + * add "detect_checker" multipath.conf parameter to detect ALUA arrays + and set the path checker to TUR +- Add 0199-RHBZ-1279355-3pardata-config.patch +- Add 0200-RHBZ-1402092-orphan-status.patch + * clear status on orphan paths +- Add 0201-RHBZ-1403552-silence-warning.patch +- Add 0202-RHBZ-1362120-skip-prio.patch + * don't run prio on failed paths +- Add 0203-RHBZ-1363718-add-msgs.patch +- Add 0204-RHBZ-1406226-nimble-config.patch +- Add 0205-RHBZ-1416569-reset-stats.patch + * add "reset maps stats" and "reset map stats" multipathd + interactive commands to reset the stats tracked by multipathd +- Add 0206-RHBZ-1239173-pt2-no-paths.patch + * make multipath correctly disable scanning and rules running when + it gets a uevent and there are not valid paths. +- Add 0207-UP-add-libmpathcmd.patch + * New shared library, libmpathcmd, that sends and receives messages from + multipathd. device-mapper-multipath now uses this library internally. +- Add 0208-UPBZ-1430097-multipathd-IPC-changes.patch + * validation that modifying commands are coming from root. +- Add 0209-UPBZ-1430097-multipath-C-API.patch + * New shared library. libdmmp, that presents the information from multipathd + in a structured manner to make it easier for callers to use +- Add 0210-RH-fix-uninstall.patch + * Minor compilation fixes +- Add 0211-RH-strlen-fix.patch + * checks that variables are not NULL before passing them to strlen +- Add 0212-RHBZ-1431562-for-read-only.patch +- Make 3 new subpackages + * device-mapper-multipath-devel, libdmmp, and libdmmp-devel. libmpathcmd + and libmpathprio are in device-mapper-multipath-libs and + device-mapper-multipath-devel. libdmmp is in its own subpackages +- Move libmpathprio devel files to device-mapper-multipath-devel +- Added BuildRequires on librados2-devel + + +* Fri Feb 10 2017 Fedora Release Engineering - 0.4.9-85 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Jan 12 2017 Igor Gnatenko - 0.4.9-84 +- Rebuild for readline 7.x + +* Fri Jul 22 2016 Benjamin Marzinski 0.4.9-83 +- Modify 0135-RHBZ-1299600-path-dev-uevents.patch + * trigger uevents when adding wwids for existing devices during startup +- Refresh 0136-RHBZ-1304687-wait-for-map-add.patch +- Refresh 0150-RHBZ-1253913-fix-startup-msg.patch +- Modify 0159-UPBZ-1255885-udev-waits.patch + * fix bug in failure path +- Add 0160-RH-udev-flags.patch +- Add 0161-RHBZ-1311659-no-kpartx.patch + * skip_kpartx option disables kpartx running on multipath devices +- Add 0162-RHBZ-1333331-huawei-config.patch + * Add default config for Huawei XSG1 array +- Add 0163-UPBZ-1333492-resize-map.patch + * restore old size if resize fails +- Add 0164-RHBZ-1311463-dos-part-rollover.patch + * fix incorrect partition size due to 4k device size rollover +- Add 0165-UPBZ-1341748-MSA-2040-conf.patch + * Add default config for MSA 2040 array +- Add 0166-RHBZ-1323429-dont-allow-new-wwid.patch + * don't allow path wwid to change while it is in use +- Add 0167-RHBZ-1335176-fix-show-cmds.patch + * and new show multipath format wildcard, 'f' to sho number of failures. + This will hopefully be useful for tracking what happens to multipath + devices for bz #1335176 +- Add 0168-RHBZ-1347769-shared-lock.patch + * make multipath lock the path devices with a shared lock +- Add 0169-UPBZ-1353357-json-output.patch + * add mulitpathd json output command +- Add 0170-UPBZ-1352925-fix-typo.patch +- Add 0171-UPBZ-1356651-allow-zero-size.patch + * Allow zero-sized paths to be added to a multipath device +- Add 0172-RHBZ-1350931-no-active-add.patch + * Allow paths to be added to a new map if no active paths exist. Also + fixes 1351430 + + +* Thu Apr 21 2016 Benjamin Marzinski 0.4.9-82 +- Modify 0005-RH-add-mpathconf.patch + * changed warning message +- Modify 0102-RHBZ-1160478-mpathconf-template.patch + * updated man page +- Modify 0104-RHBZ-631009-deferred-remove.patch + * refactor code and minor fix +- Refresh 0107-RHBZ-1169935-no-new-devs.patch +- Refresh 0112-RHBZ-1194917-add-config_dir-option.patch +- Refresh 0126-RHBZ-1211383-alias-collision.patch +- Add 0133-RHBZ-1296979-fix-define.patch + * look for the correct libudev function to set define +- Add 0134-RHBZ-1241528-check-mpath-prefix.patch + * only touch devices with a "mpath-" dm uuid prefix +- Add 0135-RHBZ-1299600-path-dev-uevents.patch + * trigger path uevent the first time a path is claimed by multipath +- Add 0136-RHBZ-1304687-wait-for-map-add.patch + * wait for the device to finish being added before reloading it. +- Add 0137-RHBZ-1280524-clear-chkr-msg.patch +- Add 0138-RHBZ-1288660-fix-mpathconf-allow.patch + * don't remove existing lines from blacklist_exceptions section +- Add 0139-RHBZ-1273173-queue-no-daemon-doc.patch +- Add 0140-RHBZ-1299647-fix-help.patch +- Add 0141-RHBZ-1303953-mpathpersist-typo.patch +- Add 0142-RHBZ-1283750-kpartx-fix.patch + * only remove devices if their uuid says that they are the correct + partition device +- Add 0143-RHBZ-1299648-kpartx-sync.patch + * default to using udev sync mode +- Add 0144-RHBZ-1299652-alua-pref-arg.patch + * allow "exclusive_pref_bit" argument to alua prioritizer +- Add 0145-UP-resize-help-msg.patch +- Add 0146-UPBZ-1299651-raw-output.patch + * allow raw format mutipathd show commands, that remove headers and padding +- Add 0147-RHBZ-1272620-fail-rm-msg.patch +- Add 0148-RHBZ-1292599-verify-before-remove.patch + * verify that all partitions are unused before attempting to remove a device +- Add 0149-RHBZ-1292599-restore-removed-parts.patch + * don't disable kpartx when restoring the first path of a device. +- Add 0150-RHBZ-1253913-fix-startup-msg.patch + * wait for multipathd daemon to write pidfile before returning +- Add 0151-RHBZ-1297456-weighted-fix.patch + * add wwn keyword to weighted prioritizer for persistent naming +- Add 0152-RHBZ-1269293-fix-blk-unit-file.patch + * use "Wants" instead of "Requires" +- Add 0153-RH-fix-i686-size-bug.patch + * use 64-bit keycodes for multipathd client commands +- Add 0154-UPBZ-1291406-disable-reinstate.patch + * don't automatically reinstate ghost paths for implicit alua devices +- Add 0155-UPBZ-1300415-PURE-config.patch + * Add default config for PURE FlashArray +- Add 0156-UPBZ-1313324-dont-fail-discovery.patch + * don't fail discovery because individual paths failed. +- Add 0157-RHBZ-1319853-multipath-c-error-msg.patch + * better error reporting for multipath -c +- Add 0158-RHBZ-1318581-timestamp-doc-fix.patch + * add documentation for -T +- Add 0159-UPBZ-1255885-udev-waits.patch + * make multipath and kpartx wait after for udev after each command + +* Wed Feb 03 2016 Fedora Release Engineering - 0.4.9-81 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Sep 25 2015 Benjamin Marzinski 0.4.9-80 +- Add 0131-RHBZ-1259523-host_name_len.patch + * increase size of host string +- Add 0132-UPBZ-1259831-lock-retry.patch + * retry locking when creating multipath devices + +* Mon Aug 17 2015 Benjamin Marzinski 0.4.9-79 +- Add 0130-UPBZ-1254292-iscsi-targetname.patch + * check for targetname iscsi sysfs value + +* Thu Aug 13 2015 Benjamin Marzinski 0.4.9-78 +- fix triggerun issue and updated requires in spec file. + +* Fri Aug 7 2015 Benjamin Marzinski 0.4.9-77 +- Modify 0104-RHBZ-631009-deferred-remove.patch + * add man page info +- Refresh 0112-RHBZ-1194917-add-config_dir-option.patch +- Refresh 0114-RHBZ-1196394-delayed-reintegration.patch +- Add 0118-UPBZ-1200738-update-eternus-config.patch + * update default config +- Add 0119-RHBZ-1081397-save-alua-info.patch + * make prioritizers save information between calls to speed them up. +- Add 0120-RHBZ-1043093-realloc-fix.patch + * free old memory if realloc fails. +- Add 0121-RHBZ-1197234-rules-fix.patch + * make sure kpartx runs after an DM_ACTIVATION event occurs. +- Add 0122-RHBZ-1212590-dont-use-var.patch + * use /run instead of /var/run +- Add 0123-UPBZ-1166072-fix-path-offline.patch + * Don't mark quiesce and transport-offline paths as offline +- Add 0124-RHBZ-1209275-retrigger-uevents.patch + * Make multipathd retrigger uevents when paths haven't successfully had + their udev_attribute environment variable set by udev and add + "retrigger_ties" and "retrigger_delay" to control this +- Add 0125-RHBZ-1153832-kpartx-delete.patch + * Delete all partition devices with -d (not just the ones in the partition + table) +- Add 0126-RHBZ-1211383-alias-collision.patch + * make multipathd use the old alias, if rename failed and add + "new_bindings_in_boot" to determine if new bindings can be added to + the bindings file in the initramfs +- Add 0127-RHBZ-1201030-use-blk-availability.patch + * Make multipath use blk-availability.service +- Add 0128-RHBZ-1222123-mpathconf-allow.patch + * Add mpathconf --allow for creating specialized config files. +- Add 0129-RHBZ-1241774-sun-partition-numbering.patch + * Make kpartx correctly number sun partitions. + + +* Wed Jun 17 2015 Fedora Release Engineering - 0.4.9-76 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Wed Mar 11 2015 Benjamin Marzinski 0.4.9-75 +- Add 0111-RH-dont-show-pg-timeout.patch + * The kernel doesn't support pg_timeout, so multipath shouldn't + bother to display it +- Add 0112-RHBZ-1194917-add-config_dir-option.patch + * multipath will now also read its configuration from files with + the .conf suffix in the directory specified by config_dir + which defaults to /etc/multipath/conf.d +- Add 0113-RHBZ-1194917-cleanup.patch + * cleanup some unnecessary code +- Add 0114-RHBZ-1196394-delayed-reintegration.patch + * Add "delay_watch_checks" and "delay_wait_checks" options to delay + reintegration of flakey paths. +- Add 0115-RHBZ-1198418-fix-double-free.patch + * multipath was freeing the multipath alias twice if it failed to create the + multipath device. +- Add 0116-UPBZ-1188179-dell-36xxi.patch + * new builtin configurations. +- Add 0117-RHBZ-1198424-autodetect-clariion-alua.patch + * configure multipath to automatically detect alua settings on clariion + devices. + +* Thu Mar 05 2015 Adam Jackson 0.4.9-74 +- Drop sysvinit subpackage from F23+ + +* Wed Feb 18 2015 Benjamin Marzinski 0.4.9-73 +- Add 0110-RHBZ-blacklist-vd-devs.patch + * blacklist vd[a-z] devices, since they don't have a WWID for + multipath to use. + +* Thu Dec 18 2014 Benjamin Marzinski 0.4.9-72 +- Modify 0107-RHBZ-1169935-no-new-devs.patch + * instead of using "-n" there is now a new configuration option, + 'ignore_new_boot_devs'. If set to 'yes', multipath will ignore + devices that aren't in /etc/multipath/wwids when running in the + initramfs. This option does nothing while multipathd is running + in the real root filesystem. +- Update 0109-RH-read-only-bindings.patch + +* Mon Dec 15 2014 Benjamin Marzinski 0.4.9-71 +- Add 0103-RH-cleanup-partmaps-code.patch + * code refactoring to prepare for next patch +- Add 0104-RHBZ-631009-deferred-remove.patch + * add deferred_remove option to /etc/multipath.conf +- Add 0105-RHBZ-1148979-fix-partition-mapping-creation-race-with-kpartx.patch + * Only run kpartx on device activation +- Add 0106-RHBZ-1159337-fix-double-free.patch + * made ev_remove_path exit immediately after failing setup_multipath, since + it handles cleaning up the device +- Add 0107-RHBZ-1169935-no-new-devs.patch + * Add new multipathd option '-n' which keeps multipathd from creating any + multipath devices that aren't in the /etc/multipath/wwids file. +- Add 0108-RHBZ-1153832-kpartx-remove-devs.patch + * switch from 'kpartx -a' to 'kpartx -u' to remove missing devices as well. +- Add 0109-RH-read-only-bindings.patch + * re-enabled -B option for multipathd + +* Tue Dec 9 2014 Benjamin Marzinski 0.4.9-70 +- Add 0102-RHBZ-1160478-mpathconf-template.patch + * mpathconf no longer copies the default config template for the + docs directory. It simply writes the template itself. +- Resolves: bz# 1160478 + +* Thu Nov 13 2014 Benjmain Marzinski 0.4.9-69 +- Rebuild + +* Tue Sep 16 2014 Benjamin Marzinski 0.4.9-68 +- Modify multipath.conf + * remove getuid_callout example +- Re-add 0050-RH-listing-speedup.patch +- Add 0081-RHBZ-1066264-check-prefix-on-rename.patch + * make multipath check the prefix on kpartx partitions during rename, and + copy the existing behaviour +- Add 0082-UPBZ-1109995-no-sync-turs-on-pthread_cancel.patch + * If async tur checker fails on threads, don't retry with the sync version +- Add 0083-RHBZ-1080055-orphan-paths-on-reload.patch + * Fix case where pathlist wasn't getting updated properly +- Add 0084-RHBZ-1110000-multipath-man.patch + * fix errors in multipath man page +- Add 0085-UPBZ-1110006-datacore-config.patch + * Add support for DataCore Virtual Disk +- Add 0086-RHBZ-1110007-orphan-path-on-failed-add.patch + * If multipathd fails to add path correctly, it now fully orphans the path +- Add 0087-RHBZ-1110013-config-error-checking.patch + * Improve multipath.conf error checking. +- Add 0088-RHBZ-1069811-configurable-prio-timeout.patch + * checker_timeout now adjusts the timeouts of the prioritizers as well. +- Add 0089-RHBZ-1110016-add-noasync-option.patch + * Add a new defaults option, "force_sync", that disables the async mode + of the path checkers. This is for cases where to many parallel checkers + hog the cpu +- Add 0090-UPBZ-1080038-reorder-paths-for-round-robin.patch + * make multipathd order paths for better throughput in round-robin mode +- Add 0091-RHBZ-1069584-fix-empty-values-fast-io-fail-and-dev-loss.patch + * check for null pointers in configuration reading code. +- Add 0092-UPBZ-1104605-reload-on-rename.patch + * Reload table on rename if necessary +- Add 0093-UPBZ-1086825-user-friendly-name-remap.patch + * Keep existing user_friend_name if possible +- Add 0094-RHBZ-1086825-cleanup-remap.patch + * Cleanup issues with upstream patch +- Add 0095-RHBZ-1127944-xtremIO-config.patch + * Add support for EMC ExtremIO devices +- Add 0096-RHBZ-979474-new-wildcards.patch + * Add N, n, R, and r path wildcards to print World Wide ids +- Add 0097-RH-fix-coverity-errors.patch + * Fix a number of unterminated strings and memory leaks on failure + paths. +- Add 0098-UPBZ-1067171-mutipath-i.patch + * Add -i option to ignore wwids file when checking for valid paths +- Add 0099-RH-add-all-devs.patch + * Add new devices config option all_devs. This makes the configuration + overwrite the specified values in all builtin configs +- Add 0100-RHBZ-1067171-multipath-i-update.patch + * make -i work correctly with find_multipaths +- Add 0101-RH-adapter-name-wildcard.patch + * Add 'a' path wildcard to print adapter name + +* Sat Aug 16 2014 Fedora Release Engineering - 0.4.9-67 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Fri Jul 11 2014 Tom Callaway - 0.4.9-66 +- fix license handling + +* Sat Jun 07 2014 Fedora Release Engineering - 0.4.9-65 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Mon Mar 31 2014 Benjamin Marzinski 0.4.9-64 +- Modify 0076-RHBZ-1056686-add-hw_str_match.patch + * free temporary memory used during configuration +- Add 0078-RHBZ-1054044-fix-mpathconf-manpage.patch + * fix typo +- Add 0079-RHBZ-1070581-add-wwid-option.patch + * add multipath option "-a". To add a device's wwid to the wwids file +- Add 0080-RHBZ-1075796-cmdline-wwid.patch + * add multipath option "-A" to add wwids specified by the kernel + command line mapth.wwid options. + +* Fri Jan 24 2014 Benjamin Marzinski 0.4.9-63 +- Add 0074-RHBZ-1056976-dm-mpath-rules.patch + * Add rules to keep from doing work in udev if there are no + active paths, or if the event was for a multipath device + reloading its table due to a path change. +- Add 0075-RHBZ-1056976-reload-flag.patch + * multipath code to identify reloads that the new rules can + ignore +- Add 0076-RHBZ-1056686-add-hw_str_match.patch + * add a new default config paramter, "hw_str_match", to make user + device configs only overwrite builtin device configs if the + identifier strings match exactly, like the default in RHEL6. + +* Fri Jan 10 2014 Benjamin Marzinski 0.4.9-62 +- Modify 0072-RHBZ-1039199-check-loop-control.patch + * only call close on the /dev/loop-control fd the open succeeds +- Add 0073-RH-update-build-flags.patch + * fix print call to work with -Werror=format-security compile flag + +* Tue Dec 10 2013 Benjamin Marzinski 0.4.9-61 +- Add 0072-RHBZ-1039199-check-loop-control.patch + * Make kpartx use LOOP_CTL_GET_FREE and loop-control to find a free + loop device. This will autoload the loop module. + +* Mon Dec 9 2013 Benjamin Marzinski 0.4.9-60 +- Add 0067-RHBZ-1022899-fix-udev-partition-handling.patch + * Make sure to wipe partition devices on change event if they weren't + wiped on the device add event +- Add 0068-RHBZ-1034578-label-partition-devices.patch + * Make sure that partition devices are labeled like the whole device +- Add 0069-UPBZ-1033791-improve-rdac-checker.patch + * Use RTPG data in RDAC checker +- Add 0070-RHBZ-1036503-blacklist-td-devs.patch +- Add 0071-RHBZ-1031546-strip-dev.patch + * make multipathd interactive commands able to handle /dev/ + instead of just + +* Sat Oct 12 2013 Benjamin Marzinski 0.4.9-59 +- Add 0066-UP-dos-4k-partition-fix.patch + * Make kpartx correctly handle 4K sector size devices with dos partitions. + +* Fri Sep 27 2013 Benjamin Marzinski 0.4.9-58 +- Add 0065-UPBZ-995538-fail-rdac-on-unavailable.patch + * make rdac checker always mark paths with asymmetric access state of + unavailable as down + +* Fri Sep 20 2013 Benjamin Marzinski 0.4.9-57 +- Add 0063-RH-fix-warning.patch + * Fix complier warning +- 0064-fix-ID_FS-attrs.patch + * make multipath create a timestamp file /run/multipathd/timestamp, and + add -T: option to shortcut processing if the + timestamp hasn't changed + +* Thu Sep 5 2013 Benjamin Marzinski 0.4.9-56 +- Add 0061-RH-display-find-mpaths.patch + * display the find_multipaths value in show config +- Add 0062-RH-dont-free-vecs.patch + * don't free the vecs structure on shutdown. It's more pain than + it's worth. + +* Thu Jul 25 2013 Benjamin Marzinski 0.4.9-55 +- Modify 0015-RH-fix-output-buffer.patch + * Fix memory leak +- Add 0047-RHBZ-kpartx-read-only-loop-devs.patch + * Fix read only loop device handling +- Add 0048-RH-print-defaults.patch +- Add 0049-RH-remove-ID_FS_TYPE.patch + * remove ID_FS_TYPE udev enviroment variable for multipath devices +- Add 0051-UP-fix-cli-resize.patch + * check before dereferencing variables +- Add 0052-RH-fix-bad-derefs.patch + * setup multipath free the multipath device when it fails, so don't keep + using it. +- Add 0053-UP-fix-failback.patch + * setting failback in the devices section was broken +- Add 0054-UP-keep-udev-ref.patch + * multipathd needs to keep the same udev object across reconfigures +- Add 0055-UP-handle-quiesced-paths.patch + * quiesced paths should be treated as down +- Add 0056-UP-alua-prio-fix.patch + * Don't count the preferred bit for paths that are active/optimized +- Add 0057-UP-fix-tmo.patch + * Cleanup how multipath sets dev_loss_tmo and fast_io_fail_tmo. Also + make multipath get changing values directly from sysfs, instead of + from udev, which caches them. +- Add 0058-UP-fix-failback.patch + * make failback print the default value when you show configs. +- Add 0059-UP-flush-failure-queueing.patch + * If you can't flush a multipath device, restore the queue_if_no_paths + value +- Add 0060-UP-uevent-loop-udev.patch + * make ueventloop grab it's own udev reference, since it is cancelled + asychnrously. + +* Fri Jul 5 2013 Benjamin Marzinski 0.4.9-54 +- Add 0047-RHBZ-980777-kpartx-read-only-loop-devs.patch + * make kpartx support read-only files better +- Resolves: bz #980777 + +* Wed Jul 3 2013 Benjamin Marzinski 0.4.9-53 +- Add 0044-RHBZ-976688-fix-wipe-wwids.patch + * Seek back to the start of the file after truncating it +- Add 0045-RHBZ-977297-man-page-fix.patch + * update man page to match actual defaults +- Add 0046-RHBZ-883981-move-udev-rules.patch + * move udev rules file from /lib to /usr/lib +- Resolves: bz #883981, #976688, #977297 + +* Fri Jun 21 2013 Benjamin Marzinski 0.4.9-52 +- Add 0038-RHBZ-799860-netapp-config.patch +- Add 0039-RH-detect-prio-fix.patch + * Don't autodetect ALUA prioritizer unless it actually can get a priority +- Add 0040-RH-bindings-fix.patch + * Do a better job of trying to get the first free user_friendly_name +- Add 0041-RH-check-for-erofs.patch + * Don't create/reload a device read-only unless doing it read/write fails + with EROFS +- Remove 0017-RH-fix-sigusr1.patch + * fix signal handling upstream way instead +- Add 0042-UP-fix-signal-handling.patch + * uxlsnr now handles all the signals sent to multipathd. This makes its + signal handling posix compliant, and harder to mess up. +- Add 0043-RH-signal-waiter.patch + * ioctl isn't a pthread cancellation point. Send a signal to the waiter + thread to break out of waiting in ioctl for a dm event. + +* Fri May 17 2013 Benjamin Marzinski 0.4.9-51 +- Add 0032-RHBZ-956464-mpathconf-defaults.patch + * fix defaults listed in usage +- Add 0033-RHBZ-829963-e-series-conf.patch +- Add 0034-RHBZ-851416-mpathconf-display.patch + * display whether or not multipathd is running in the status +- Add 0035-RHBZ-891921-list-mpp.patch + * add a new path format wilcard to list the multipath device associated + with a path +- Add 0036-RHBZ-949239-load-multipath-module.patch + * load the dm-multipath kernel module when multipathd starts +- Add 0037-RHBZ-768873-fix-rename.patch + * When deciding on a multipth devices name on reload, don't default to + the existing name if there is no config file alias and user_friendly_names + isn't set. Use the wwid. +- Modify multipath.conf +- Resolves: bz #768873, #950252 + +* Tue Apr 30 2013 Benjamin Marzinski 0.4.9-50 +- Add 0031-RHBZ-957188-kpartx-use-dm-name.patch + * use the basename of the devices that will be created to choose the + delimiter instead of using the device name from the command line +- Resolves: bz #957188 + +* Fri Apr 26 2013 Benjamin Marzinski 0.4.9-49 +- Modify 0020-RHBZ-907360-static-pthread-init.patch + * Don't initialize uevent list twice +- Add 0029-RH-no-prio-put-msg.patch +- Add 0030-RHBZ-916528-override-queue-no-daemon.patch + * Default to "queue_without_daemon no" + * Add "forcequeueing daemon" and "restorequeueing daemon" cli commands +- Modify spec file to force queue_without_daemon when restarting + multipathd on upgrades. + +* Thu Apr 4 2013 Benjamin Marzinski 0.4.9-48 +- Add 0026-fix-checker-time.patch + * Once multipathd hit it max checker interval, it was reverting to + to shortest checker interval +- Add 0027-RH-get-wwid.patch + * Multipath wasn't correctly setting the multipath wwid when it read devices + in from the kernel +- Add 0028-RHBZ-929078-refresh-udev-dev.patch + * Make multipath try to get the UID of down devices. Also, on ev_add_path, + make multipathd reinitialize existing devices that weren't fully + initialized before. + +* Mon Apr 1 2013 Benjamin Marzinski 0.4.9-47 +- Add 0021-RHBZ-919119-respect-kernel-cmdline.patch + * keep the multipath.rules udev file from running and multipathd from + starting if nompath is on the kernel command line +- Add 0022-RH-multipathd-check-wwids.patch + * Whenever multipath runs configure, it will check the wwids, and + add any missing ones to the wwids file +- Add 0023-RH-multipath-wipe-wwid.patch + * multipath's -w command will remove a wwid from the wwids file +- Add 0024-RH-multipath-wipe-wwids.patch + * multipath's -W command will set reset the wwids file to just the current + devices +- Add 0025-UPBZ-916668_add_maj_min.patch +- Resolves: bz #919119 + +* Thu Mar 28 2013 Benjamin Marzinski 0.4.9-46 +- Add 0020-RHBZ-907360-static-pthread-init.patch + * statically initialize the uevent pthread structures + +* Sat Mar 2 2013 Benjamin Marzinski 0.4.9-45 +- Updated to latest upstrem 0.4.9 code: multipath-tools-130222 + (git commit id: 67b82ad6fe280caa1770025a6bb8110b633fa136) +- Refresh 0001-RH-dont_start_with_no_config.patch +- Modify 0002-RH-multipath.rules.patch +- Modify 0003-RH-Make-build-system-RH-Fedora-friendly.patch +- Refresh 0004-RH-multipathd-blacklist-all-by-default.patch +- Refresh 0005-RH-add-mpathconf.patch +- Refresh 0006-RH-add-find-multipaths.patch +- Add 0008-RH-revert-partition-changes.patch +- Rename 0008-RH-RHEL5-style-partitions.patch to + 0009-RH-RHEL5-style-partitions.patch +- Rename 0009-RH-dont-remove-map-on-enomem.patch to + 0010-RH-dont-remove-map-on-enomem.patch +- Rename 0010-RH-deprecate-uid-gid-mode.patch to + 0011-RH-deprecate-uid-gid-mode.patch +- Rename 0013-RH-kpartx-msg.patch to 0012-RH-kpartx-msg.patch +- Rename 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch to + 0013-RHBZ-883981-cleanup-rpmdiff-issues.patch +- Rename 0039-RH-handle-other-sector-sizes.patch to + 0014-RH-handle-other-sector-sizes.patch +- Rename 0040-RH-fix-output-buffer.patch to 0015-RH-fix-output-buffer.patch +- Add 0016-RH-dont-print-ghost-messages.patch +- Add 0017-RH-fix-sigusr1.patch + * Actually this fixes a number of issues related to signals +- Rename 0018-RH-remove-config-dups.patch to 0018-RH-fix-factorize.patch + * just the part that isn't upstream +- Add 0019-RH-fix-sockets.patch + * makes abstract multipathd a cli sockets use the correct name. +- Set find_multipaths in the default config + +* Wed Feb 20 2013 Benjamin Marzinski 0.4.9-44 +- Add 0036-UP-fix-state-handling.patch + * handle transport-offline and quiesce sysfs state +- Add 0037-UP-fix-params-size.patch +- Add 0038-RH-fix-multipath.rules.patch + * make sure multipath's link priority gets increased +- Add 0039-RH-handle-other-sector-sizes.patch + * allow gpt partitions on 4k sector size block devices. +- Add 0040-RH-fix-output-buffer.patch + * fix multipath -ll for large configuration. + +* Wed Feb 13 2013 Fedora Release Engineering - 0.4.9-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Dec 21 2012 Benjamin Marzinski 0.4.9-42 +- Add 0034-RHBZ-887737-check-for-null-key.patch +- Add 0035-RHBZ-883981-cleanup-rpmdiff-issues.patch + * Compile multipathd with full RELRO and PIE and install to /usr + +* Mon Dec 17 2012 Benjamin Marzinski 0.4.9-41 +- Add 0033-RH-dont-disable-libdm-failback-for-sync-case.patch + * make kpartx -s and multipath use libdm failback device creation, so + that they work in environments without udev + +* Fri Nov 30 2012 Benjamin Marzinski 0.4.9-40 +- Add 0032-RH-make-path-fd-readonly.patch + * revert change made when adding persistent reservations, so that path fds + are again opened O_RDONLY + +* Fri Nov 30 2012 Benjamin Marzinski 0.4.9-39 +- Add 0031-RHBZ-882060-fix-null-strncmp.patch + +* Fri Nov 30 2012 Benjamin Marzinski 0.4.9-38 +- Add 0026-RH-fix-mpathpersist-fns.patch +- Add 0027-RH-default-partition-delimiters.patch + * Only use the -p delimiter when the device name ends in a number +- Add 0028-RH-storagetek-config.patch +- Add 0029-RH-kpartx-retry.patch + * retry delete on busy loop devices +- Add 0030-RH-early-blacklist.patch + * multipath will now blacklist devices by device type and wwid in + store_pathinfo, so that it doesn't do a bunch of unnecessary work + on paths that it would only be removing later on. + +* Sat Nov 03 2012 Peter Rajnoha 0.4.9-37 +- Install multipathd.service for sysinit.target instead of multi-user.target. + +* Thu Nov 01 2012 Peter Rajnoha 0.4.9-36 +- Start multipathd.service systemd unit before LVM units. + +* Wed Oct 24 2012 Benjamin Marzinski 0.4.9-35 +- Add 0022-RHBZ-864368-disable-libdm-failback.patch + * make kpartx and multiapthd disable libdm failback device creation +- Add 0023-RHBZ-866291-update-documentation.patch +- Resolves: bz #864368, #866291 + +* Tue Oct 23 2012 Benjamin Marzinski 0.4.9-34 +- Add 0021-RH-fix-oom-adj.patch + * don't use OOM_ADJUST_MIN unless you're sure it's defined + +* Tue Oct 23 2012 Benjamin Marzinski 0.4.9-33 +- Modify 0016-RH-retain_hwhandler.patch + * Check the dm-multipath module version, and don't enable + retain_attached_hw_handler if the kernel doesn't support it +- Add 0019-RH-detect-prio.patch + * add detect_prio option, to make multipath check if the device + supports the ALUA prio, before defaulting to the configured prio +- Remove 0017-RH-netapp_config.patch +- Add 0020-RH-netapp-config.patch + * new netapp config that uses retain_attached_hw_handler and + detect_prio to autoconfigure ALUA and non-ALUA devices. + +* Tue Oct 2 2012 Benjamin Marzinski 0.4.9-32 +- Modified 0018-RH-remove-config-dups.patch + * Made modified config remove original only if the vendor/product + exactly match + +* Thu Sep 27 2012 Benjamin Marzinski 0.4.9-31 +- Add 0014-RH-dm_reassign.patch + * Fix reassign_maps option +- Add 0015-RH-selector_change.patch + * devices default to using service-time selector +- Add 0016-RH-retain_hwhandler.patch + * add retain_attached_hw_handler option, to let multipath keep an + already attached scsi device handler +- Add 0017-RH-netapp_config.patch +- Add 0018-RH-remove-config-dups.patch + * Clean up duplicates in the devices and blacklist sections + +* Wed Sep 05 2012 Václav Pavlín - 0.4.9-30 +- Scriptlets replaced with new systemd macros (#850088) + +* Tue Aug 21 2012 Benjamin Marzinski 0.4.9-29 +- Updated to latest upstrem 0.4.9 code: multipath-tools-120821.tgz + (git commit id: 050b24b33d3c60e29f7820d2fb75e84a9edde528) + * includes 0001-RH-remove_callout.patch, 0002-RH-add-wwids-file.patch, + 0003-RH-add-followover.patch, 0004-RH-fix-cciss-names.patch +- Add 0013-RH-kpartx-msg.patch +- Modify 0002-RH-multipath.rules.patch + * removed socket call from rules file + +* Wed Jul 18 2012 Fedora Release Engineering - 0.4.9-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Thu Jun 28 2012 Benjamin Marzinski 0.4.9-27 +- Updated to latest upstream 0.4.9 code : multipath-tools-120613.tgz + (git commit id: cb0f7127ba90ab5e8e71fc534a0a16cdbe96a88f) +- Add 0001-RH-remove_callout.patch + * multipath no longer uses the getuid callout. It now gets the + wwid from the udev database or the environment variables +- Add 0004-RH-fix-cciss-names.patch + * convert cciss device names from cciss/cXdY to sysfs style cciss!cXdY +- Split 0009-RH-add-find-multipaths.patch into 0002-RH-add-wwids-file.patch + and 0010-RH-add-find-multipaths.patch +- Add 0016-RH-change-configs.patch + * default fast_io_fail to 5 and don't set the path selector in the + builtin configs. +Resolves: bz #831978 + + +* Thu May 17 2012 Benjamin Marzinski 0.4.9-26 +- Add 0025-RHBZ-822714-update-nodes.patch +- Resolves: bz #822714 + +* Mon Apr 30 2012 Benjamin Marzinski 0.4.9-25 +- Modify 0024-RH-libudev-monitor.patch +- Resolves: bz #805493 + +* Mon Apr 30 2012 Benjamin Marzinski 0.4.9-24 +- Add requirements on libudev to spec file +- Resolves: bz #805493 + +* Mon Apr 30 2012 Benjamin Marzinski 0.4.9-23 +- Add 0024-RH-libudev-monitor.patch + +* Fri Feb 10 2012 Benjamin Marzinski 0.4.9-22 +- Add 0012-RH-update-on-show-topology.patch +- Add 0013-RH-manpage-update.patch +- Add 0014-RH-RHEL5-style-partitions.patch +- Add 0015-RH-add-followover.patch +- Add 0016-RH-dont-remove-map-on-enomem.patch +- Add 0017-RH-fix-shutdown-crash.patch +- Add 0018-RH-warn-on-bad-dev-loss-tmo.patch +- Add 0019-RH-deprecate-uid-gid-mode.patch +- Add 0020-RH-dont-remove-map-twice.patch +- Add 0021-RH-validate-guid-partitions.patch +- Add 0022-RH-adjust-messages.patch +- Add 0023-RH-manpage-update.patch + +* Tue Jan 24 2012 Benjamin Marzinski 0.4.9-21 +- Updated to latest upstream 0.4.9 code : multipath-tools-120123.tgz + (git commit id: 63704387009443bdb37d9deaaafa9ab121d45bfb) +- Add 0001-RH-fix-async-tur.patch +- Add 0002-RH-dont_start_with_no_config.patch +- Add 0003-RH-multipath.rules.patch +- Add 0004-RH-update-init-script.patch +- Add 0005-RH-cciss_id.patch +- Add 0006-RH-Make-build-system-RH-Fedora-friendly.patch +- Add 0007-RH-multipathd-blacklist-all-by-default.patch +- Add 0008-RH-add-mpathconf.patch +- Add 0009-RH-add-find-multipaths.patch +- Add 0010-RH-check-if-multipath-owns-path.patch +- Add 0011-RH-add-hp_tur-checker.patch + +* Fri Jan 13 2012 Fedora Release Engineering - 0.4.9-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Sep 20 2011 Benjamin Marzinski -0.4.9-19 +- Modify 0103-add-disable-sync-option.patch +- Add 0104-RHBZ-737989-systemd-unit-fix.patch + * systemd will only start multipathd if /etc/multipath.conf exists +- Add 0105-fix-oom-adj.patch + * first try setting oom_score_adj + +* Mon Aug 15 2011 Kalev Lember - 0.4.9-18 +- Rebuilt for rpm bug #728707 + +* Tue Jul 19 2011 Benjamin Marzinski -0.4.9-17 +- Add 0103-add-disable-sync-option.patch + * add a -n (nosync) option to multipath. This disables synchronous + file creation with udev. + +* Fri Jul 15 2011 Benjamin Marzinski -0.4.9-16 +- Modify 0012-RH-udev-sync-support.patch +- Modify 0021-RHBZ-548874-add-find-multipaths.patch +- Modify 0022-RHBZ-557845-RHEL5-style-partitions.patch +- Add 0025-RHBZ-508827-update-multipathd-manpage.patch through + 0101-RHBZ-631009-disable-udev-disk-rules-on-reload.patch + * sync with current state of RHEL6. Next release should include a updated + source tarball with most of these fixes rolled in. +- Add 0102-RHBZ-690828-systemd-unit-file.patch + * Add Jóhann B. Guðmundsson's unit file for systemd. + * Add sub-package sysvinit for SysV init script. +- Resolves: bz #690828 + +* Tue Feb 08 2011 Fedora Release Engineering - 0.4.9-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Feb 16 2010 Benjamin Marzinski -0.4.9-14 +- Modify 0021-RHBZ-548874-add-find-multipaths.patch + * fix bug where mpathconf wouldn't create a multpath.conf file unless one + already existed. + +* Tue Feb 16 2010 Benjamin Marzinski -0.4.9-13 +- Replace 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch + with 0012-RH-udev-sync-support.patch + * Add udev sync support to kpartx and multipath. In kpartx it is disabled + unless you use the -s option. +- Refresh 0013-RH-add-weighted_prio-prioritizer.patch +- Refresh 0021-RHBZ-548874-add-find-multipaths.patch +- Modify 0022-RHBZ-557845-RHEL5-style-partitions.patch + * kpartx now creates a 2 sector large device for dos extended + partitions, just like the kernel does on the regular block devices. +- Add 0023-RHBZ-557810-emc-invista-config.patch +- Add 0024-RHBZ-565933-checker-timeout.patch + * Multipath has a new option checker_timeout. If this is not set, + all path checker functions with explicit timeouts use + /sys/block/sd/device/timeout. If this is set, they use it instead. + +* Fri Jan 22 2010 Benjamin Marzinski -0.4.9-12 +- Refresh 0001-RH-queue-without-daemon.patch +- Refresh 0002-RH-path-checker.patch +- Modify 0010-RH-multipath-rules-udev-changes.patch + * Fix udev rules to use DM_SBIN_PATH when calling kpartx + * install udev rules to /lib/udev/rules.d instead of /etc/udev/rules.d +- Modify 0014-RH-add-hp_tur-checker.patch +- Add 0003-for-upstream-default-configs.patch +- Add 0016-RHBZ-554561-fix-init-error-msg.patch +- Add 0017-RHBZ-554592-man-page-note.patch +- Add 0018-RHBZ-554596-SUN-6540-config.patch +- Add 0019-RHBZ-554598-fix-multipath-locking.patch +- Add 0020-RHBZ-554605-fix-manual-failover.patch +- Add 0021-RHBZ-548874-add-find-multipaths.patch + * Added find_multipaths multipath.conf option + * Added /sbin/mpathconf for simple editting of multipath.conf +- Add 0022-RHBZ-557845-RHEL5-style-partitions.patch + * Make kpartx deal with logical partitions like it did in RHEL5. + Don't create a dm-device for the extended partition itself. + Create the logical partitions on top of the dm-device for the whole disk. + +* Mon Nov 16 2009 Benjamin Marzinski -0.4.9-11 +- Add 0002-for-upstream-add-tmo-config-options.patch + * Add fail_io_fail_tmo and dev_loss_tmo multipath.conf options +- Add 0013-RH-add-weighted_prio-prioritizer.patch +- Add 0014-RH-add-hp_tur-checker.patch +- Add 0015-RH-add-multipathd-count-paths-cmd.patch +- rename multipath.conf.redhat to multipath.conf, and remove the default + blacklist. + +* Tue Oct 27 2009 Fabio M. Di Nitto - 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 - 0.4.9-9 +- 0012-RH-explicitly-disable-dm-udev-sync-support-in-kpartx.patch + +* Mon Oct 19 2009 Fabio M. Di Nitto - 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 - 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 - 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 - 0.4.9-5 +- Fixed problem where maps were being added and then removed. +- Changed the udev rules to fix some issues. + +* Thu Jul 30 2009 Benjamin Marzinski - 0.4.9-4 +- Fixed build issue on i686 machines. + +* Wed Jul 29 2009 Benjamin Marzinski - 0.4.9-3 +- Updated to latest upstream 0.4.9 code : multipath-tools-090729.tgz + (git commit id: d678c139719d5631194b50e49f16ca97162ecd0f) +- moved multipath bindings file from /var/lib/multipath to /etc/multipath +- Fixed 354961, 432520 + +* Fri Jul 24 2009 Fedora Release Engineering - 0.4.9-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed May 6 2009 Mike Snitzer - 0.4.9-1 +- Updated to latest upstream 0.4.9 code: multipath-tools-090429.tgz + (git commit id: 7395bcda3a218df2eab1617df54628af0dc3456e) +- split the multipath libs out to a device-mapper-multipath-libs package +- if appropriate, install multipath libs in /lib64 and /lib64/multipath + +* Tue Apr 7 2009 Milan Broz - 0.4.8-10 +- Fix insecure permissions on multipathd.sock (CVE-2009-0115) + +* Fri Mar 6 2009 Milan Broz - 0.4.8-9 +- Fix kpartx extended partition handling (475283) + +* Tue Feb 24 2009 Fedora Release Engineering - 0.4.8-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Fri Sep 26 2008 Benjamin Marzinski 0.4.8-7 +- Since libaio is now in /lib, not /usr/lib, multipath no longer needs to + statically link against it. Fixed an error with binding file and WWIDs + that include spaces. Cleaned up the messages from the directio checker + function. Fixed the udev rules. Fixed a regression in multipath.conf + parsing +- Fixed 457530, 457589 + +* 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) + +* Mon May 19 2008 Benjamin Marzinksi 0.4.8-4 +- Fixed Makefile issues. + +* Mon May 19 2008 Benjamin Marzinksi 0.4.8-3 +- Fixed ownership build error. + +* Mon May 19 2008 Benjamin Marzinksi 0.4.8-2 +- Forgot to commit some patches. + +* Mon May 19 2008 Benjamin Marzinski 0.4.8-1 +- Updated to latest Upstream 0.4.8 code: multipath-tools-080519.tgz + (git commit id: 42704728855376d2f7da2de1967d7bc71bc54a2f) + +* Tue May 06 2008 Alasdair Kergon - 0.4.7-15 +- Remove unnecessary multipath & kpartx static binaries. (bz 234928) + +* Fri Feb 29 2008 Tom "spot" Callaway - 0.4.7-14 +- fix sparc64 +- fix license tag + +* Tue Feb 19 2008 Fedora Release Engineering - 0.4.7-13 +- Autorebuild for GCC 4.3 + +* Wed Nov 14 2007 Benjamin Marzinski - 0.4.7-12 +- Fixed the dist tag so building will work properly. + +* Mon Feb 05 2007 Alasdair Kergon - 0.4.7-11.fc7 +- Add build dependency on new device-mapper-devel package. +- Add dependency on device-mapper. + +* Wed Jan 31 2007 Benjamin Marzinksi - 0.4.7-10.fc7 +- Update BuildRoot and PreReq lines. + +* Mon Jan 15 2007 Benjamin Marzinksi - 0.4.7-9.fc7 +- Fixed spec file. + +* Mon Jan 15 2007 Benjamin Marzinski - 0.4.7-8.fc7 +- Update to latest code (t0_4_7_head2) + +* Wed Dec 13 2006 Benjamin Marzinski - 0.4.7-7.fc7 +- Update to latest code (t0_4_7_head1) + +* Thu Sep 7 2006 Peter Jones - 0.4.7-5 +- Fix kpartx to handle with drives >2TB correctly. + +* Thu Aug 31 2006 Peter Jones - 0.4.7-4.1 +- Split kpartx out into its own package so dmraid can use it without + installing multipathd +- Fix a segfault in kpartx + +* Mon Jul 17 2006 Benjamin Marzinski 0.4.7-4.0 +- Updated to latest source. Fixes bug in default multipath.conf + +* Wed Jul 12 2006 Benjamin Marzinski 0.4.7-3.1 +- Added ncurses-devel to BuildRequires + +* Wed Jul 12 2006 Benjamin Marzinski 0.4.7-3.0 +- Updated to latest source. deals with change in libsysfs API + +* Wed Jul 12 2006 Jesse Keating - 0.4.7-2.2.1 +- rebuild + +* Mon Jul 10 2006 Benjamin Marzinski 0.4.7-2.2 +- fix tagging issue. + +* Mon Jul 10 2006 Benjamin Marzinski 0.4.7-2.1 +- changed BuildRequires from sysfsutils-devel to libsysfs-devel + +* Wed Jun 28 2006 Benjamin Marzinski 0.4.7-2.0 +- Updated to latest upstream source, fixes kpartx udev rule issue + +* Tue Jun 06 2006 Benjamin Marzinski 0.4.7-1.0 +- Updated to Christophe's latest source + +* Mon May 22 2006 Alasdair Kergon - 0.4.5-16.0 +- Newer upstream source (t0_4_5_post59). + +* Mon May 22 2006 Alasdair Kergon - 0.4.5-12.3 +- BuildRequires: libsepol-devel, readline-devel + +* Mon Feb 27 2006 Benjamin Marzinski 0.4.5-12.2 +- Prereq: chkconfig + +* Mon Feb 20 2006 Karsten Hopp 0.4.5-12.1 +- BuildRequires: libselinux-devel + +* Fri Feb 10 2006 Jesse Keating - 0.4.5-12.0.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Benjamin Marzinski -0.4.5-12.0 +- Updated to latest upstream source (t0_4_5_post56) + +* Tue Feb 07 2006 Jesse Keating - 0.4.5-9.1.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Mon Dec 19 2005 Benjamin Marzinski - 0.4.5-9.1 +- added patch for fedora changes + +* Fri Dec 16 2005 Benjamin Marzinski - 0.4.5-9.0 +- Updated to latest upstream source (t)_4_5_post52) + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Sun Dec 4 2005 Peter Jones - 0.4.4-2.6 +- rebuild for newer libs + +* Tue Nov 15 2005 Peter Jones - 0.4.4-2.5 +- unsplit kpartx. parted knows how to do this now, so we don't + need this in a separate package. + +* Tue Nov 15 2005 Peter Jones - 0.4.4-2.4 +- split kpartx out into its own package + +* Fri May 06 2005 Bill Nottingham - 0.4.4-2.3 +- Fix last fix. + +* Thu May 05 2005 Alasdair Kergon - 0.4.4-2.2 +- Fix last fix. + +* Wed May 04 2005 Alasdair Kergon - 0.4.4-2.1 +- By default, disable the multipathd service. + +* Tue Apr 19 2005 Alasdair Kergon - 0.4.4-2.0 +- Fix core dump from last build. + +* Tue Apr 19 2005 Alasdair Kergon - 0.4.4-1.0 +- Move cache file into /var/cache/multipath. + +* Fri Apr 08 2005 Alasdair Kergon - 0.4.4-0.pre8.1 +- Remove pp_balance_units. + +* Mon Apr 04 2005 Alasdair Kergon - 0.4.4-0.pre8.0 +- Incorporate numerous upstream fixes. +- Update init script to distribution standards. + +* Tue Mar 01 2005 Alasdair Kergon - 0.4.2-1.0 +- Initial import based on Christophe Varoqui's spec file.