multipath-tools: document how to add devices that need special flags in the SCSI subsystem
Subsystems (2)
PATCH 1/5 multipath-tools: document how to add devices that need special flags in the SCSI subsystem
Full flags list at include/scsi/scsi_devinfo.h
Arrays controllers included currently:
{"3PARdata", "VV", NULL, BLIST_REPORTLUN2},
{"DEC", "HSG80", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"HP", "A6189A", NULL, BLIST_SPARSELUN | BLIST_LARGELUN}, {"COMPAQ", "MSA1000", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD}, {"COMPAQ", "MSA1000 VOLUME", NULL, BLIST_SPARSELUN | BLIST_NOSTARTONADD}, {"COMPAQ", "HSV110", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"HP", "HSV100", NULL, BLIST_REPORTLUN2 | BLIST_NOSTARTONADD}, {"COMPAQ", "LOGICAL VOLUME", NULL, BLIST_FORCELUN | BLIST_MAX_512},
{"DDN", "SAN DataDirector", "*", BLIST_SPARSELUN},
{"DGC", "RAID", NULL, BLIST_SPARSELUN},
{"DGC", "DISK", NULL, BLIST_SPARSELUN}, <-- mising VDISK ??
{"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN}, {"EMC", "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"HITACHI", "OPEN-", "*", BLIST_REPORTLUN2}, {"HP", "OPEN-", "*", BLIST_REPORTLUN2},
{"HITACHI", "DF400", "*", BLIST_REPORTLUN2}, {"HITACHI", "DF500", "*", BLIST_REPORTLUN2},
{"HP", "DF400", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"HP", "DF500", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"HP", "DF600", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, <-- bug, also apply: 627511e3e {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
{"NETAPP", "LUN C-Mode", NULL, BLIST_SYNC_ALUA}, <-- ontap
{"NETAPP", "INF-01-00", NULL, BLIST_SYNC_ALUA}, <-- rdac!!
{"SGI", "TP9100", "*", BLIST_REPORTLUN2},
{"Intel", "Multi-Flex", NULL, BLIST_NO_RSOC},
{"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"IBM", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"SUN", "Universal Xport", "*", BLIST_NO_ULD_ATTACH}, {"DELL", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
--- libmultipath/hwtable.c | 3 +++ 1 file changed, 3 insertions(+)
libmultipath/hwtable.c +3 -0
@@ -22,6 +22,9 @@* * Devices with a proprietary handler must also be included in * the kernel side. Currently at drivers/scsi/scsi_dh.c +* +* Moreover, if a device needs a special treatment by the SCSI +* subsystem it should be included in drivers/scsi/scsi_devinfo.c */ static struct hwentry default_hw[] = {/*
Signature · 1 line
2.7.4
PATCH 2/5 multipath-tools: replace LDFLAGS with LIBDEPS for groups of libraries in Makefiles
--- kpartx/Makefile | 4 ++-- mpathpersist/Makefile | 4 ++-- multipath/Makefile | 4 ++-- multipathd/Makefile | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-)
kpartx/Makefile +2 -2
@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -LDFLAGS += -ldevmapper +LIBDEPS += -ldevmapper LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h)
@@ -21,7 +21,7 @@ EXEC = kpartx all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install: $(EXEC) $(EXEC).8
mpathpersist/Makefile +2 -2
@@ -2,7 +2,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ +LIBDEPS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev EXEC = mpathpersist
@@ -12,7 +12,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) + $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install:
multipath/Makefile +2 -2
@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathcmddir) -LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ +LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ -L$(mpathcmddir) -lmpathcmd EXEC = multipath
@@ -15,7 +15,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gz
multipathd/Makefile +4 -4
@@ -8,16 +8,16 @@ include ../Makefile.inc #CFLAGS += -DLOGDBG CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) -LDFLAGS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ +LIBDEPS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ -lmpathpersist -L$(mpathcmddir) -lmpathcmd -lurcu -lpthread \ -ldevmapper -lreadline ifdef SYSTEMD CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) - LDFLAGS += -lsystemd + LIBDEPS += -lsystemd else - LDFLAGS += -lsystemd-daemon + LIBDEPS += -lsystemd-daemon endif endif
@@ -28,7 +28,7 @@ EXEC = multipathd all : $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install:
Signature · 1 line
2.7.4
Re: [PATCH 2/5] multipath-tools: replace LDFLAGS with LIBDEPS for groups of libraries in Makefiles
This one was not forgotten.
I was waiting for follow-ons on the discussion with Bart.
Do you have a position on the opportunity to align on the variable name used by autoconf ?
The other patches of the set are now merged.
Thanks.
Quoted 118 lines · Xose Vazquez Perez
Cc Christophe Varoqui <[email protected]>Cc device-mapper development <[email protected]>Signed-off-by Xose Vazquez Perez <[email protected]>--- kpartx/Makefile | 4 ++-- mpathpersist/Makefile | 4 ++-- multipath/Makefile | 4 ++-- multipathd/Makefile | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-)kpartx/Makefile +2
-2@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -LDFLAGS += -ldevmapper +LIBDEPS += -ldevmapper LIBDM_API_COOKIE = $(shell grep -Ecs '^[a-z]*[[:space:]]+dm_task_set_cookie' /usr/include/libdevmapper.h)@@ -21,7 +21,7 @@ EXEC = kpartx all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install: $(EXEC) $(EXEC).8mpathpersist/Makefile +2
-2@@ -2,7 +2,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -LDFLAGS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ +LIBDEPS += -lpthread -ldevmapper -L$(mpathpersistdir) -lmpathpersist \ -L$(multipathdir) -L$(mpathcmddir) -lmpathcmd -lmultipath -ludev EXEC = mpathpersist@@ -12,7 +12,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) + $(CC) $(OBJS) -o $(EXEC) $(LDFLAGS) $(CFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install:multipath/Makefile +2
-4@@ -5,7 +5,7 @@ include ../Makefile.inc CFLAGS += -I$(multipathdir) -I$(mpathcmddir) -LDFLAGS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ +LIBDEPS += -lpthread -ldevmapper -ldl -L$(multipathdir) -lmultipath -ludev \ -L$(mpathcmddir) -lmpathcmd EXEC = multipath@@ -15,7 +15,7 @@ OBJS = main.o all: $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) + $(CC) $(CFLAGS) $(OBJS) -o $(EXEC) $(LDFLAGS) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz $(GZIP) $(EXEC).conf.5 > $(EXEC).conf.5.gzmultipathd/Makefile +3
-3@@ -8,16 +8,16 @@ include ../Makefile.inc #CFLAGS += -DLOGDBG CFLAGS += -I$(multipathdir) -I$(mpathpersistdir) -I$(mpathcmddir) -LDFLAGS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ +LIBDEPS += -ludev -ldl -L$(multipathdir) -lmultipath -L$(mpathpersistdir) \ -lmpathpersist -L$(mpathcmddir) -lmpathcmd -lurcu -lpthread \ -ldevmapper -lreadline ifdef SYSTEMD CFLAGS += -DUSE_SYSTEMD=$(SYSTEMD) ifeq ($(shell test $(SYSTEMD) -gt 209 && echo 1), 1) - LDFLAGS += -lsystemd + LIBDEPS += -lsystemd else - LDFLAGS += -lsystemd-daemon + LIBDEPS += -lsystemd-daemon endifendif
multipathd/Makefile +1
-2@@ -28,7 +28,7 @@ EXEC = multipathd all : $(EXEC) $(EXEC): $(OBJS) - $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) + $(CC) $(CFLAGS) $(OBJS) $(LDFLAGS) -o $(EXEC) $(LIBDEPS) $(GZIP) $(EXEC).8 > $(EXEC).8.gz install: --2.7.4
PATCH 3/5 multipath-tools: replace queue-length by default selector
In reply to Xose Vazquez Perezservice-time is more advanced, and it works better in asymmetric and asymmetric environments.
--- libmultipath/hwtable.c | 2 -- 1 file changed, 2 deletions(-)
libmultipath/hwtable.c +0 -2
@@ -206,7 +206,6 @@ static struct hwentry default_hw[] = { { .vendor = "XtremIO", .product = "XtremApp", - .selector = "queue-length 0", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, },
@@ -829,7 +828,6 @@ static struct hwentry default_hw[] = { { .vendor = "PURE", .product = "FlashArray", - .selector = "queue-length 0", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, .fast_io_fail = 10,
Signature · 1 line
2.7.4
PATCH 4/5 multipath-tools: delete .minio from hwtable
In reply to Xose Vazquez PerezIt's useless, default path_selector is service-time. And document some aspects of round-robin.
--- libmultipath/hwtable.c | 14 -------------- multipath/multipath.conf.5 | 20 ++++++++++++-------- 2 files changed, 12 insertions(+), 22 deletions(-)
libmultipath/hwtable.c +0 -14
@@ -79,7 +79,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = FAILBACK_UNDEF, .no_path_retry = 12, - .minio = 100, .checker_name = HP_SW, .prio_name = PRIO_HP_SW, },
@@ -90,7 +89,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 12, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -100,7 +98,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 12, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -110,7 +107,6 @@ static struct hwentry default_hw[] = { .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, .no_path_retry = 18, - .minio = 100, }, {/* MSA2000 family with new firmware */
@@ -119,7 +115,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 18, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -129,7 +124,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 18, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -140,7 +134,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 12, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -158,7 +151,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 18, - .minio = 100, .prio_name = PRIO_ALUA, },/*
@@ -520,7 +512,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = NO_PATH_RETRY_QUEUE, - .minio = 100, .prio_name = PRIO_ALUA, }, {
@@ -530,7 +521,6 @@ static struct hwentry default_hw[] = { .features = "1 queue_if_no_path", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, - .minio = 15, },/* * IBM Power Virtual SCSI Devices
@@ -577,7 +567,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .flush_on_last_del = FLUSH_ENABLED, - .minio = 128, .dev_loss = MAX_DEV_LOSS_TMO, .prio_name = PRIO_ONTAP, },
@@ -612,7 +601,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_SERIAL, .pgfailback = FAILBACK_UNDEF, .no_path_retry = 30, - .minio = 128, },/* * SGI
@@ -776,7 +764,6 @@ static struct hwentry default_hw[] = { .features = "1 queue_if_no_path", .pgpolicy = MULTIBUS, .pgfailback = FAILBACK_UNDEF, - .minio = 100, },/* * Intel
@@ -800,7 +787,6 @@ static struct hwentry default_hw[] = { .pgpolicy = GROUP_BY_PRIO, .pgfailback = -FAILBACK_IMMEDIATE, .no_path_retry = 12, - .minio = 100, .prio_name = PRIO_ALUA, },/*
multipath/multipath.conf.5 +12 -8
@@ -7,7 +7,7 @@ .\" .\" ---------------------------------------------------------------------------- . -.TH MULTIPATH.CONF 5 2016-08-07 "Linux" +.TH MULTIPATH.CONF 5 2016-08-09 "Linux" . . .\" ----------------------------------------------------------------------------
@@ -163,7 +163,8 @@ kernel multipath target. There are three selector algorithms: .TP 12 .I "round-robin 0" Loop through every path in the path group, sending the same amount of IO to -each. +each. Some aspects of behavior can be controlled with the attributes: +\fIrr_min_io\fR, \fIrr_min_io_rq\fR and \fIrr_weight\fR. .TP .I "queue-length 0" Send the next bunch of IO down the path with the least amount of outstanding IO.
@@ -433,8 +434,9 @@ Default value is: \fBmanual\fR . .TP .B rr_min_io -The number of IO to route to a path before switching to the next in -the same path group. This is only for BIO based multipath. +Number of IO requests to route to a path before switching to the next in the +same path group. This is only for \fIBlock I/O\fR(BIO) based multipath and +only apply to \fIround-robin\fR path_selector. .RS .TP Default value is: \fB1000\fR
@@ -443,8 +445,9 @@ Default value is: \fB1000\fR . .TP .B rr_min_io_rq -The number of IO requests to route to a path before switching to the -next in the same path group. This is only for request based multipath. +Number of IO requests to route to a path before switching to the next in the +same path group. This is only for \fIRequest\fR based multipath and +only apply to \fIround-robin\fR path_selector. .RS .TP Default value is: \fB1\fR
@@ -467,11 +470,12 @@ Default value is: \fBmax\fR . .TP .B rr_weight -If set to \fIpriorities\fR the multipath configurator will assign -path weights as "path prio * rr_min_io". Possible values are +If set to \fIpriorities\fR the multipath configurator will assign path weights +as "path prio * rr_min_io". Possible values are .I priorities or .I uniform . +Only apply to \fIround-robin\fR path_selector. .RS .TP Default value is: \fBuniform\fR
Signature · 6 lines
2.7.4 -- dm-devel mailing list [email protected] https://www.redhat.com/mailman/listinfo/dm-devel
PATCH 5/5 multipath-tools: add queue_mode to the features list in multipath/multipath.conf.5
In reply to Xose Vazquez PerezNew undocumented feature, added in e83068a5f:
dm mpath: add optional "queue_mode" feature
Allow a user to specify an optional feature 'queue_mode <mode>' where <mode> may be "bio", "rq" or "mq" -- which corresponds to bio-based, request_fn rq-based, and blk-mq rq-based respectively.
If the queue_mode feature isn't specified the default for the "multipath" target is still "rq" but if dm_mod.use_blk_mq is set to Y it'll default to mode "mq".
This new queue_mode feature introduces the ability for each multipath device to have its own queue_mode (whereas before this feature all multipath devices effectively had to have the same queue_mode).
Also add more info to other features.
--- multipath/multipath.conf.5 | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-)
multipath/multipath.conf.5 +24 -12
@@ -3,11 +3,11 @@ .\" Make sure there are no errors with: .\" groff -z -wall -b -e -t multipath/multipath.conf.5 .\" -.\" TODO: Look for XXX +.\" TODO: Look for XXX and ??? .\" .\" ---------------------------------------------------------------------------- . -.TH MULTIPATH.CONF 5 2016-08-09 "Linux" +.TH MULTIPATH.CONF 5 2016-08-12 "Linux" . . .\" ----------------------------------------------------------------------------
@@ -166,12 +166,15 @@ Loop through every path in the path group, sending the same amount of IO to each. Some aspects of behavior can be controlled with the attributes: \fIrr_min_io\fR, \fIrr_min_io_rq\fR and \fIrr_weight\fR. .TP +.\" XXX .I "queue-length 0" -Send the next bunch of IO down the path with the least amount of outstanding IO. +(Since ??? kernel) Choose the path for the next bunch of IO based on the amount +of outstanding IO to the path. .TP +.\" XXX .I "service-time 0" -Choose the path for the next bunch of IO based on the amount of outstanding IO -to the path and its relative throughput. +(Since ??? kernel) Choose the path for the next bunch of IO based on the amount +of outstanding IO to the path and its relative throughput. .TP Default value is: \fBservice-time 0\fR .RE
@@ -333,22 +336,31 @@ Default value is: \fB<unset>\fR .TP .B features Specify any device-mapper features to be used. Syntax is \fInum list\fR -where \fInum\fR is the number, between 0 and 6, of features in \fIlist\fR. +where \fInum\fR is the number, between 0 and 8, of features in \fIlist\fR. Possible values for the feature list are: .RS .TP 12 +.\" XXX .I queue_if_no_path -(Superseded by \fIno_path_retry\fR) Queue IO if no path is active. Identical to -the \fIno_path_retry\fR with \fIqueue\fR value. See KNOWN ISSUES. +(Superseded by \fIno_path_retry\fR) (Since ??? kernel) Queue IO if no path is active. +Identical to the \fIno_path_retry\fR with \fIqueue\fR value. See KNOWN ISSUES. .TP .I no_partitions Disable automatic partitions generation via kpartx. .TP -.I pg_init_retries -Number of times to retry pg_init, it must be between 1 and 50. +.\" XXX +.I pg_init_retries <times> +(Since ??? kernel) Number of times to retry pg_init, it must be between 1 and 50. .TP -.I pg_init_delay_msecs -Number of msecs before pg_init retry, it must be between 0 and 60000. +.\" XXX +.I pg_init_delay_msecs <msecs> +(Since ??? kernel) Number of msecs before pg_init retry, it must be between 0 and 60000. +.TP +.\" XXX +.I queue_mode <mode> +(Since ??? kernel) Select the the queue_mode per multipath device. +Where <mode> can be \fIbio\fR, \fIrq\fR or \fImq\fR. Which corresponds to +bio-based, request_fn rq-based, and blk-mq rq-based respectively. .TP Default value is: \fB0\fR .RE
Signature · 1 line
2.7.4