Skip to contentSkip to conversation

StorageWorks multipath support

DISCUSSION Christophe Varoqui 3 participants 11 messages Jun 15, 2005 – Jun 20, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hello,

here is a note describing the lego blocks needed to have a fully operational multipath stack with StorageWorks and Qlogic hardware.

Kernel :
========

2.6.12-rc6

Additional patches :
====================

Qlogic : LU scaning fix
http://marc.theaimsgroup.com/?l=linux-scsi&m=111836291000433&w=2

Qlogic : Postpone fc_rport block/unblock to scheduled work
http://marc.theaimsgroup.com/?l=linux-scsi&m=111868700022257&w=2

Mike Christie : export block layer function
https://www.redhat.com/archives/dm-devel/2005-June/msg00084.html

Hardware Handler module :
=========================

Mike Christie, Christophe Varoqui :
http://christophe.varoqui.free.fr/multipath-tools/dm-hp-sw.tar.bz2

Multipath Tools :
=================

git HEAD up to commit fd9857d2eb9796d0a205887bdff879d56355eda2 at minimum :
http://kernel.org/pub/scm/linux/storage/multipath-tools/.git

Configlet :
===========

device {

        vendor                  "COMPAQ"
        product                 "HSV110 (C)COMPAQ"
        path_grouping_policy    group_by_serial
        path_checker            hp_sw
        features                "1 queue_if_no_path"
        hardware_handler        "1 hp_sw"

}

It would be good to have the kernel patches pushed to 2.6.12 before it comes out.

Happy testing,
cvaroqui

#1 lore raw
Quoted 4 lines · Christophe Varoqui

Hello,

here is a note describing the lego blocks needed to have a fully operational multipath stack with StorageWorks and Qlogic hardware.

Christophe, is the "ghost" denomination there to stay?

If so, the passive paths (ie, to the non-active Service Processor) of the EMC CLARiiON also might wish to use this...

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#2 lore raw
Quoted 4 lines · Lars Marowsky-Bree
Quoted 2 lines · Christophe Varoqui

Hello,

Quoted 8 lines
Quoted 2 lines

here is a note describing the lego blocks needed to have a fully operational multipath stack with StorageWorks and Qlogic hardware.

Christophe, is the "ghost" denomination there to stay?

If so, the passive paths (ie, to the non-active Service Processor) of the EMC CLARiiON also might wish to use this...

I'm not attached to the ghost term, but what it describes is here to stay.

This state has a special treatment in the daemon : paths in this state are kept in active state in the DM, instead of proactively being failed. This is for the hwhandler to be given a chance to activate a PG with only ghost paths in it.

If you come with a better term, I'll sure consider it. Maybe "spare" ?

Regards,
cvaroqui

#3 lore raw
Quoted 2 lines · Christophe Varoqui

I'm not attached to the ghost term, but what it describes is here to stay.

OK.

Quoted 4 lines

This state has a special treatment in the daemon : paths in this state are kept in active state in the DM, instead of proactively being failed. This is for the hwhandler to be given a chance to activate a PG with only ghost paths in it.

Well, before, those paths were simply kept as "active" / "healthy" (and from the point of view of the kernel code they are, just that the PG they are in might not be enabled).

But it makes the status output look nicer of course if those paths are listed as "ghost" in the user-space.

Quoted 1 line

If you come with a better term, I'll sure consider it. Maybe "spare" ?

Well, "ghost" or "passive" or "spare", I don't care ;-) I was just asking.

BTW, backporting uevent is a bit more annoying then I thought. How about a way to manually prod the daemon? That might be useful in general, for example if a hotplug event was lost due to whatever reason...

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#4 lore raw
Quoted 5 lines · Lars Marowsky-Bree

Well, before, those paths were simply kept as "active" / "healthy" (and from the point of view of the kernel code they are, just that the PG they are in might not be enabled).

Mmm, not anymore.

It was true till 0.4.4, but in HEAD there are patches to implement to proactive DM-failing of checker-failed paths. This was a request from Tran if I remember.

Quoted 3 lines

But it makes the status output look nicer of course if those paths are listed as "ghost" in the user-space.

Agreed

Quoted 5 lines

BTW, backporting uevent is a bit more annoying then I thought. How about a way to manually prod the daemon? That might be useful in general, for example if a hotplug event was lost due to whatever reason...

Too bad.

Can you elaborate on what you have in mind ?

Regards,
cvaroqui

#5 lore raw
Quoted 7 lines · Christophe Varoqui
Quoted 4 lines

Well, before, those paths were simply kept as "active" / "healthy" (and from the point of view of the kernel code they are, just that the PG they are in might not be enabled).

Mmm, not anymore.

It was true till 0.4.4, but in HEAD there are patches to implement to proactive DM-failing of checker-failed paths. This was a request from Tran if I remember.

The emc_clariion checker considers the "ghost" paths to be healthy because of that. (Which is true: they haven't failed, they are just passive.)

That failed paths are not proactively failed is an orthogonal issue, and a change I like ;-)

Quoted 7 lines
Quoted 4 lines

BTW, backporting uevent is a bit more annoying then I thought. How about a way to manually prod the daemon? That might be useful in general, for example if a hotplug event was lost due to whatever reason...

Too bad.

Can you elaborate on what you have in mind ?

Well, basically I'd like it if a SIGHUP would still cause the daemon to reload the configuration and rescan the mappings. (Which is a common use of SIGHUP.) Then we'd get the best of both worlds, we could re-trigger it on the old dists and use the more efficient uevent on newer kernels.

Sincerely,
Lars Marowsky-Brée <[email protected]>

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#6 lore raw
Quoted 5 lines · Lars Marowsky-Bree

The emc_clariion checker considers the "ghost" paths to be healthy because of that. (Which is true: they haven't failed, they are just passive.)

ah ok, I missed that refinement in the emc checker.
Do you want to send the patch to move this checker to a tri-state like hp_sw ?

Quoted 8 lines
Quoted 2 lines

Can you elaborate on what you have in mind ?

Well, basically I'd like it if a SIGHUP would still cause the daemon to reload the configuration and rescan the mappings. (Which is a common use of SIGHUP.) Then we'd get the best of both worlds, we could re-trigger it on the old dists and use the more efficient uevent on newer kernels.

Well, seems a reasonable feature indeed. I defered implementing this because you are almost equally served with a daemon restart.

Do you consider Alasdair's proposition (fs-socket) complementary, best, ... ?

Regards,
cvaroqui

#7 lore raw
In reply to Christophe Varoqui
Quoted 1 line · christophe varoqui

Can you elaborate on what you have in mind ?

Listen on a socket in the filesystem? [cf. what screen does] And have a separate helper program that sends messages down it similar to the uevent messages.

Alasdair

Signature · 1 line
[email protected]
#8 lore raw
Quoted 4 lines · Alasdair G Kergon
Quoted 1 line

Can you elaborate on what you have in mind ?

Listen on a socket in the filesystem? [cf. what screen does] And have a separate helper program that sends messages down it similar to the uevent messages.

That would of course also work...

Signature · 4 lines
High Availability & Clustering
SUSE Labs, Research and Development
SUSE LINUX Products GmbH - A Novell Business	 -- Charles Darwin
"Ignorance more frequently begets confidence than does knowledge"
#9 lore raw
In reply to Alasdair G Kergon
Quoted 7 lines · Alasdair G Kergon
Quoted 1 line · christophe varoqui

Can you elaborate on what you have in mind ?

Listen on a socket in the filesystem? [cf. what screen does] And have a separate helper program that sends messages down it similar to the uevent messages.

Would the following do what you want ?

The client is wrapped in the daemon.
You can call it through :
- multipathd -k"$cmd" : one shot
- multipathd -k : interactive

The synthax is somewhat rude :/

- lp : list paths
- lm : list maps
- ap $path : add path checker, $path is in the "sdb" form
- rp $path : remove path checker
- am $map : add map event thread, $map is in the "dm-0" form
- rm $map : remove map event thread

For your pleasure, here is a sample session ...

xa-s05:~/scm/test/multipathd# ./multipathd -k
lp
       sdc: state 2,   2/ 28 XX..........................
       sde: state 2,   2/ 28 XX..........................
       sdb: state 2,   9/ 28 XXXXXXXXX...................

sdd: state 2, 27/ 28 XXXXXXXXXXXXXXXXXXXXXXXXXXX.

rp sdd
ok

lp

       sdc: state 2,  18/ 28 XXXXXXXXXXXXXXXXXX..........
       sde: state 2,  18/ 28 XXXXXXXXXXXXXXXXXX..........
       sdb: state 2,  25/ 28 XXXXXXXXXXXXXXXXXXXXXXXXX...

ap sdd
ok

lp

       sdc: state 2,  12/ 28 XXXXXXXXXXXX................
       sde: state 2,  12/ 28 XXXXXXXXXXXX................
       sdb: state 2,  19/ 28 XXXXXXXXXXXXXXXXXXX.........

sdd: state 2, 7/ 7 XXXXXXX

Let me know if I should commit this as a foundation.

Regards,

Signature · 1 line
christophe varoqui <[email protected]>

libmultipath/Makefile: needs update
libmultipath/dmparser.c: needs update
libmultipath/util.c: needs update
libmultipath/util.h: needs update
multipathd/Makefile: needs update
multipathd/main.c: needs update
Index: libmultipath/Makefile
===================================================================

libmultipath/Makefile (mode:100644) +1 -1
@@ -10,7 +10,7 @@
        hwtable.o blacklist.o util.o dmparser.o config.o \
        structs.o cache.o discovery.o propsel.o dict.o \
        pgpolicies.o debug.o regex.o defaults.o uevent.o \
-       switchgroup.o
+       switchgroup.o uxsock.o
 
 CFLAGS = -pipe -g -Wall -Wunused -Wstrict-prototypes
 
libmultipath/dmparser.c (mode:100644) +0 -39
Index: libmultipath/dmparser.c
===================================================================
@@ -16,45 +16,6 @@
 #define WORD_SIZE 64
 
 static int
-get_word (char * sentence, char ** word)
-{
-	char * p;
-	int len;
-	int skip = 0;
-	
-	while (*sentence ==  ' ') {
-		sentence++;
-		skip++;
-	}
-	if (*sentence == '\0')
-		return 0;
-
-	p = sentence;
-
-	while (*p !=  ' ' && *p != '\0')
-		p++;
-
-	len = (int) (p - sentence);
-
-	if (!word)
-		return skip + len;
-
-	*word = MALLOC(len + 1);
-
-	if (!*word) {
-		condlog(0, "get_word : oom\n");
-		return 0;
-	}
-	strncpy(*word, sentence, len);
-	condlog(4, "*word = %s, len = %i", *word, len);
-
-	if (*p == '\0')
-		return 0;
-
-	return skip + len;
-}
-
-static int
 merge_words (char ** dst, char * word, int space)
 {
 	char * p;
libmultipath/util.c (mode:100644) +42 -0

51 lines not on this page · raw message

libmultipath/util.h (mode:100644) +2 -0
Index: libmultipath/util.h
===================================================================
@@ -4,6 +4,8 @@
 int strcmp_chomp(char *, char *);
 void basename (char * src, char * dst);
 int filepresent (char * run);
+int get_word (char * sentence, char ** word);
+
 
 #define safe_sprintf(var, format, args...)	\
 	snprintf(var, sizeof(var), format, ##args) >= sizeof(var)
multipathd/Makefile (mode:100644) +2 -3
Index: multipathd/Makefile
===================================================================
@@ -26,9 +26,8 @@
 #
 # object files
 #
-OBJS = main.o copy.o log.o log_pthread.o pidfile.o \
-       $(MULTIPATHLIB)-glibc.a \
-       $(CHECKERSLIB)-glibc.a \
+OBJS = main.o copy.o log.o log_pthread.o pidfile.o uxlsnr.o uxclnt.o \
+       $(MULTIPATHLIB)-glibc.a $(CHECKERSLIB)-glibc.a \
 
 
 #
multipathd/main.c (mode:100644) +127 -2

176 lines not on this page · raw message

multipathd/uxclnt.c (mode:100644) renamed from dev/null (tree:3675ec950a3806374cce8caa81ff064c0513b382) +69 -0

69 lines not on this page · raw message

multipathd/uxclnt.h (mode:100644) renamed from dev/null (tree:3675ec950a3806374cce8caa81ff064c0513b382) +1 -0
Index: multipathd/uxclnt.h
===================================================================
@@ -0,0 +1 @@
+int uxclnt(char * inbuf);
multipathd/uxlsnr.c (mode:100644) renamed from dev/null (tree:3675ec950a3806374cce8caa81ff064c0513b382) +148 -0

148 lines not on this page · raw message

multipathd/uxlsnr.h (mode:100644) renamed from dev/null (tree:3675ec950a3806374cce8caa81ff064c0513b382) +4 -0
Index: multipathd/uxlsnr.h
===================================================================
@@ -0,0 +1,4 @@
+void * uxsock_listen(char * (*uxsock_trigger)
+			(char *, void * trigger_data),
+			void * trigger_data);
+
#10 lore raw
Quoted 10 lines · christophe varoqui
Quoted 7 lines · Alasdair G Kergon
Quoted 1 line · christophe varoqui

Can you elaborate on what you have in mind ?

Listen on a socket in the filesystem? [cf. what screen does] And have a separate helper program that sends messages down it similar to the uevent messages.

Would the following do what you want ?

No response ? LinuxTag vielleicht ?
Well, it must mean yes then :)

I commited the thing, plus readline support and a few fixes for bugs uncovered by this nice new feature.

The parser, and the synthax, are still ugly as hell. If someone cares, he should point me to a nice one.

I'm also open to "lp" and "lm" output format/content suggestions.

Regards,

Signature · 1 line
christophe varoqui <[email protected]>