public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Roland Dreier <roland@kernel.org>,
	linux-scsi@vger.kernel.org, eric@purestorage.com
Subject: Re: Handling multiple paths to enclosure devices?
Date: Fri, 29 Jul 2011 09:21:56 +0200	[thread overview]
Message-ID: <4E325F94.6040104@suse.de> (raw)
In-Reply-To: <1311923380.8190.3.camel@mulgrave>

On 07/29/2011 09:09 AM, James Bottomley wrote:
> On Thu, 2011-07-28 at 13:57 -0700, Roland Dreier wrote:
>>   >  My initial thought is that in a multi-path situation, as above, we get
>>   >  two enclosures appearing as well (one down each path).  If we
>>   >  incorporated the idea of topological subtrees into the identity matching
>>   >  code, we'd end up filling each of the enclosures with the path connected
>>   >  devices.  That seems to be an easy situation for multi-path drivers to
>>   >  sort out and one requiring no alteration of the existing enclosure code
>>   >  (except to do the topological subtree search).
>>
>> Ah, good insight: we do have two copies of the expander device, and so
>> it would be natural to attach each disk to the expander device on the
>> same path to that disk.
>>
>> I'm a bit confused by what you mean about multi-path drivers though --
>> it would seem we would need the enclosure stuff to handle this
>> somehow?  It seems that if I have this situation, my HBA driver (eg
>> mpt2sas) will discover the SCSI bus, hit an enclosure, trigger loading
>> the ses driver (which pulls in the enclosure driver), and then
>> continue discovering disks.  And it seems this code needs to get the
>> topology sorted by itself -- how could a multi-path driver inject
>> itself into the symlink creation in enclosure.c?
>
> I merely meant that our current philosophy is to layer multi-path
> awareness in a separate driver: dm.  There's certainly no expander
> awareness in dm-mp at the moment, but there could be.  It should be
> quite simple:  match the expanders to something like a dm-exp and then
> basically use the slot information in the expander to construct dm
> devices for each of the physicals (the rule for dm device creation would
> be dm-exp slot matching).
>
Doesn't help as device-mapper is only concerned with block devices,
what with dm devices being essentially abstract block devices.

But yes, we should stick to our current philosophy of treating 
multipath devices as separate trees underneath the accessing HBA.
We should not (and, in fact, cannot) try to map the external 
topology in sysfs, rather should stick to a logical view as seen 
from each HBA. So the enclosure class needs to be updated
int include the HBA number in there to avoid duplicate links.

The correct mapping and accessing these 'multipathed enclosures'
will then be left as an exercise to the reader :-)

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		      zSeries & Storage
hare@suse.de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-07-29  7:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-28 17:05 Handling multiple paths to enclosure devices? Roland Dreier
2011-07-28 20:33 ` James Bottomley
2011-07-28 20:57   ` Roland Dreier
2011-07-29  7:09     ` James Bottomley
2011-07-29  7:21       ` Hannes Reinecke [this message]
2011-07-29  7:25         ` James Bottomley
2011-07-28 22:01   ` Douglas Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E325F94.6040104@suse.de \
    --to=hare@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=eric@purestorage.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=roland@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox