[4937] in linux-scsi channel archive
Re: dual-attached disk
daemon@ATHENA.MIT.EDU (Eric Youngdale)
Sat Oct 17 16:02:17 1998
Date: Fri, 16 Oct 1998 22:34:25 -0400 (EDT)
From: Eric Youngdale <eric@andante.jic.com>
To: "Stephen C. Tweedie" <sct@redhat.com>
cc: thoth@purplefrog.com, linux-scsi@vger.rutgers.edu
In-Reply-To: <199810161112.MAA02484@dax.dcs.ed.ac.uk>
On Fri, 16 Oct 1998, Stephen C. Tweedie wrote:
> Hi,
>
> On Tue, 13 Oct 1998 09:55:26 -0400, thoth@purplefrog.com said:
>
> > Does Linux support dual-attached SCSI drives? We have an
> > application where we'd like to take some disk and use it from one
> > machine, and if that machine fails, mount the disks on the other,
> > and resume serving data. In the Sun world, you just run a SCSI
> > chain out of one machine and into another. Can Linux do this?
>
> It's more of a driver issue. I have heard of people doing exactly
> this on Linux with certain SCSI drivers, and other people getting
> nowhere with a different driver. Common problems are things like bus
> resets: if a driver doesn't like an unexpected bus reset and responds
> by resetting the bus itself, you get an endless ping-pong of bus
> resets between the two controllers which kills the bus dead.
This all sounds correct. The main problem is that Linux
currently dosn't attempt to track the possibility that a second host is
attached to the bus. If we did have such knowledge, then the next bit
would be that we would need to account for this in some way. Some of the
things I can think of offhand:
1) The error handling code probably needs to be adjusted. Mainly
we would probably want to avoid resets unless we are trying to take away a
reservation for some reson.
2) In the multi-initiator case, we would probably want to reserve
the devices. I don't have a strong opinion as to when this should be done
- one possibility is that we could make the reservation when the device is
opened (more or less at the same time we lock the door for removeable
media). That might turn out to be too restrictive - it would make it
impossible for the 2nd host to read the partition table, for example, and
it would reserve the entire device (all partitions) for one particular
host.
3) The error handling code would need to know how to handle
reservation conflicts. In other words, don't try and do anything about
it. Some means would be needed to take away a reservation if the other
host is down.
The first step I guess would be to try and detect the presence of
a 2nd initiator on the bus. I have never tried it, but it is
theoretically possible that during bus scan it will turn up in one
form or another. Then again, it could depend upon what brand of card you
are using.
-Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.rutgers.edu