Skip to contentSkip to conversation

latest multipath-tools from git breaks EMC CX

DISCUSSION Lars Marowsky-Bree 3 participants 5 messages Jun 2, 2005 – Jun 3, 2005 Device mapper

lore
Share & tools
lore
#0 lore raw

More specifically, it fails to detect the vendor correctly, and uses the most basic internal defaults:

...
===== path sdz =====
bus = 0
dev_t = 65:144
size = 280278656
path checker = readsector0 (internal default)
#

# all paths :
#
#:#:#:# sdaa 65:160  []
#:#:#:# sdab 65:176  []
#:#:#:# sdac 65:192  []
#:#:#:# sdad 65:208  []
#:#:#:# sdae 65:224  []
#:#:#:# sdaf 65:240  []
#:#:#:# sdag 66:0    []
#:#:#:# sdah 66:16   []
#:#:#:# sdai 66:32   []
#:#:#:# sdaj 66:48   []

...
params = 0 0 4 2 round-robin 0 1 1 65:240 1000 round-robin 0 1 1 66:224 1000 round-robin 0 1 1 8:16 1000 round-robin 0 1 1 65 :0 1000
status = 1 0 0 4 2 E 0 1 0 65:240 F 1 A 0 1 0 66:224 A 0 E 0 1 0 8:16 F 1 E 0 1 0 65:0 A 0 3600601607cf30e00174589a37a31d911
[size=127 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdaf 65:240 [failed]
\_ round-robin 0 [active][best]
\_ #:#:#:# sdau 66:224 [active]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdb 8:16 [failed]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdq 65:0 [active]

...

Just what the heck is going on there? ;-)

I don't get any more output than that, sorry.

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"
#1 lore raw

Most certainly the 8af5a2b1b5e4d3a457f5bb477214356385087eae commit is the culprit : I did a bit of spliting in path discovery, and introduced a new fn to get the sysfs bus that I use as a switch to choose a discovery template.

Reading your output, I would say the bus fetching went wrong.

Well, revert it or debug it :/

Strange it didn't blew on me ...

Quoted 48 lines · Lars Marowsky-Bree

More specifically, it fails to detect the vendor correctly, and uses the most basic internal defaults:

...
===== path sdz =====
bus = 0
dev_t = 65:144
size = 280278656
path checker = readsector0 (internal default)
#

# all paths :
#
#:#:#:# sdaa 65:160  []
#:#:#:# sdab 65:176  []
#:#:#:# sdac 65:192  []
#:#:#:# sdad 65:208  []
#:#:#:# sdae 65:224  []
#:#:#:# sdaf 65:240  []
#:#:#:# sdag 66:0    []
#:#:#:# sdah 66:16   []
#:#:#:# sdai 66:32   []
#:#:#:# sdaj 66:48   []

...
params = 0 0 4 2 round-robin 0 1 1 65:240 1000 round-robin 0 1 1 66:224 1000 round-robin 0 1 1 8:16 1000 round-robin 0 1 1 65 :0 1000
status = 1 0 0 4 2 E 0 1 0 65:240 F 1 A 0 1 0 66:224 A 0 E 0 1 0 8:16 F 1 E 0 1 0 65:0 A 0 3600601607cf30e00174589a37a31d911
[size=127 GB][features="0"][hwhandler="0"]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdaf 65:240 [failed]
\_ round-robin 0 [active][best]
\_ #:#:#:# sdau 66:224 [active]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdb 8:16 [failed]
\_ round-robin 0 [enabled]
\_ #:#:#:# sdq 65:0 [active]

...

Just what the heck is going on there? ;-)

I don't get any more output than that, sorry.

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

Signature · 1 line
christophe varoqui <[email protected]>
#2 lore raw
Quoted 9 lines · christophe varoqui [[email protected]] wrote:

Most certainly the 8af5a2b1b5e4d3a457f5bb477214356385087eae commit is the culprit : I did a bit of spliting in path discovery, and introduced a new fn to get the sysfs bus that I use as a switch to choose a discovery template.

Reading your output, I would say the bus fetching went wrong.

Well, revert it or debug it :/

I was hitting the same problem on my system (the sysfs_get_bus function leaving bus a none) the hack below fix it for me, but I only tested the bus code against scsi YMMV.

-andmike
--
Michael Anderson
[email protected]

Hack fix for libmultipath sysfs_get_bus function.

---

libmultipath/discovery.c +7 -12
@@ -337,6 +337,7 @@ get_serial (char * str, int fd)
 static void
 sysfs_get_bus (char * sysfs_path, struct path * curpath)
 {
+	struct sysfs_device *sdev;
 	char attr_path[FILE_NAME_SIZE];
 	char attr_buff[FILE_NAME_SIZE];
 
@@ -352,25 +353,19 @@ sysfs_get_bus (char * sysfs_path, struct
 		condlog(0, "attr_path too small");
 		return;
 	}
-	if (0 > sysfs_get_link(attr_path, attr_buff, sizeof(attr_buff)))
-		return;
-
-	if (strlen(attr_buff) + 4 > FILE_NAME_SIZE) {
-		condlog(0, "attr_path too small");
-		return;
-	}
-	snprintf(attr_path, FILE_NAME_SIZE, "%s/bus", attr_buff);
 
 	if (0 > sysfs_get_link(attr_path, attr_buff, sizeof(attr_buff)))
 		return;
 
-	basename(attr_buff, attr_path);
-	
-	if (!strncmp(attr_path, "scsi", 4))
+	sdev = sysfs_open_device_path(attr_buff);
+
+	if (!strncmp(sdev->bus, "scsi", 4))
 		curpath->bus = SYSFS_BUS_SCSI;
-	else if (!strncmp(attr_path, "ide", 3))
+	else if (!strncmp(sdev->bus, "ide", 3))
 		curpath->bus = SYSFS_BUS_IDE;
 
+	sysfs_close_device(sdev);
+
 	return;
 }
 
#3 lore raw
Quoted 5 lines

I was hitting the same problem on my system (the sysfs_get_bus function leaving bus a none) the hack below fix it for me, but I only tested the bus code against scsi YMMV.

Works for me too with iSCSI (scsi sysfs bus too).

Thanks, commited.

#4 lore raw
Quoted 6 lines · Christophe Varoqui
Quoted 3 lines

I was hitting the same problem on my system (the sysfs_get_bus function leaving bus a none) the hack below fix it for me, but I only tested the bus code against scsi YMMV.

Works for me too with iSCSI (scsi sysfs bus too).

Thanks, commited.

Confirmed, works for me too.

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"