<html>
<head>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<tt>Hi all,<br>
<br>
<br>
I think I found a bug in the HDS prioritizer module at
<a class="moz-txt-link-freetext"
href="http://git.kernel.org/gitweb.cgi?p=linux/storage/multipath/hare/multipath-tools.git;a=blob_plain;f=libmultipath/prioritizers/hds.c;hb=HEAD">http://git.kernel.org/gitweb.cgi?p=linux/storage/multipath/hare/multipath-tools.git;a=blob_plain;f=libmultipath/prioritizers/hds.c;hb=HEAD</a><br>
<br>
In there the following is stated for assigning the priority:</tt><tt><br>
<br>
* CONTROLLER ODD and LDEV ODD: PRIORITY 1<br>
* CONTROLLER ODD and LDEV EVEN: PRIORITY 0<br>
* CONTROLLER EVEN and LDEV ODD: PRIORITY 0<br>
* CONTROLLER EVEN and LDEV EVEN: PRIORITY 1<br>
<br>
When watching multipathing with debug output one can see that the
controllers returned are 1 and 2:<br>
<br>
May 08 14:44:00 | sdo: hds prio: VENDOR: HITACHI <br>
May 08 14:44:00 | sdo: hds prio: PRODUCT: DF600F <br>
May 08 14:44:00 | sdo: hds prio: SERIAL: 0x0089<br>
May 08 14:44:00 | sdo: hds prio: LDEV: 0x0004<br>
May 08 14:44:00 | sdo: hds prio: CTRL: 1
<= This is really controller 0<br>
May 08 14:44:00 | sdo: hds prio: PORT: C<br>
May 08 14:44:00 | sdo: hds prio: CTRL ODD, LDEV EVEN, PRIO 0<br>
May 08 14:44:00 | sdo: hds prio = 0<br>
<br>
May 08 14:44:00 | sdk: hds prio: VENDOR: HITACHI <br>
May 08 14:44:00 | sdk: hds prio: PRODUCT: DF600F <br>
May 08 14:44:00 | sdk: hds prio: SERIAL: 0x0089<br>
May 08 14:44:00 | sdk: hds prio: LDEV: 0x0004<br>
May 08 14:44:00 | sdk: hds prio: CTRL: 2
</tt><tt><= This is really controller 1</tt><br>
<tt> May 08 14:44:00 | sdk: hds prio: PORT: C<br>
May 08 14:44:00 | sdk: hds prio: CTRL EVEN, LDEV EVEN, PRIO 1<br>
May 08 14:44:00 | sdk: hds prio = 1<br>
<br>
This looks fine, but afaik HDS starts counting controllers from 0
(so actually I have 0 and 1). So when assigning LUN ownership in
the storage, a LUN with an active/passive path will actually
always be accessed through the wrong controller. This has a huge
performance penalty when the system is under stress, because of
the additional overhead generated by this.<br>
</tt><tt><br>
To sum this up, the priority is exactly swapped from what it
should be:<br>
<br>
Lun 0 mapped with ownership on Controller 0 (</tt><tt>CONTROLLER
EVEN and LDEV EVEN)</tt><tt> will be accessed on Controller 1<br>
Lun 1 mapped with ownership on Controller 1 (</tt><tt>CONTROLLER
ODD and LDEV ODD) </tt><tt>will be accessed on Controller 0<br>
<br>
I am not quite sure were to fix this. Looks like the code was
contributed by Hitachi in 2006. Back then they maybe started the
numbering of the controllers with 1. The AMS and the new HUS
systems start at 0 though.<br>
<br>
<br>
If you can tell me how I can help, I am glad to do so.<br>
<br>
Thanks,<br>
Christian<br>
</tt><br>
<div class="moz-signature">-- <br>
<title></title>
<tt><tt> <a href="http://www.ips.at"> <img
src="cid:part2.03080508.00010501@ips.at" alt="-=IPS
GmbH=-" border="0" height="32" width="400"> </a>
<p style="margin-top: 6pt; color: rgb(0, 51, 94); font-size:
8pt; font-family: Verdana;">Mit freundlichen Grüßen / Best
Regards </p>
<p style="margin: 0pt; padding: 0pt; font-size: 12pt; color:
rgb(221, 37, 63); font-family: Verdana;"> <b>Christian
Schausberger, MSc</b> </p>
<p style="margin: 0pt; padding: 0pt; font-size: 7pt; color:
rgb(107, 145, 166); font-family: Verdana;"> Systems
Engineer<br>
</p>
<p style="font-size: 8pt; color: rgb(0, 51, 94); font-family:
Verdana;"> IPS Vertriebsgesellschaft für innovative
EDV-Produkte und - Systeme GmbH <br>
Franzosengraben 10 <br>
A-1030 Wien </p>
<p style="font-size: 8pt; color: rgb(0, 51, 94); font-family:
Courier New;"> T#: +43 1 796 86 86 - 57<br>
F#: +43 1 796 86 86 - 15 <br>
M#: +43 664 88 45 46 11<br>
@#: <a href="mailto:schausberger@ips.at">schausberger@ips.at</a>
</p>
</tt></tt> </div>
</body>
</html>