[comp.unix.i386] multiple SCSI masters

gsteckel@diag2.East.Sun.COM (Geoff Steckel - Sun BOS Software) (05/26/90)

In article <520@fciva.FRANKLIN.COM> dag@fciva.UUCP (Daniel A. Graifer) writes:
>...a tape backup system to talk to two hosts?  How is contention handled?  If
>I have a bus that looks like this:
>
>    [SYSA]-[DSKA0]-[DSKA1]-[TAPE]-[DSKB1]-[DSKB0]-[SYSB]
>
>How do I keep SYSA from trying to control the DSKB?s ?  (Actually, guess this
>wont work for me anyways.  Each machine has a QIC tape on it as well. That's
>too many SCSI addresses (4/system + Exebyte). Maybe someday we'll get SCSI2!).

You might be able to add a second SCSI host adapter now; they're a lot
cheaper than another Exabyte!  It would depend on whether you have enough
interrupt and DMA channels left.

Most SCSI disks and tapes support `reserve' and `release' commands, which
are designed to allow multiple masters for devices.  I don't know of any
stock software which actually use these commands, though.

Each SCSI initiator identifies itself to the target of its commands, so in
the diagram above, each disk would know from where a command originated.
Depending on the (auto)configuration in the systems, it is possible just to
tell system B not to use system A's disks, and vice versa.  Only one master
may use the bus at any instant, so there might be throughput degradation.
You'd want to use disks and host adapters which support `disconnect-reconnect',
which, like the name implies, relinquish the bus when they don't need it,
even in the middle of a long data transfer.  This drastically increases the
responsiveness of such a system, since it allows transfers to interleave.

If you just wanted to share the Exabyte in the middle, a `simple' (:-) program
and some shell scripts could solve the problem.

The program would use driver hooks to issue a reserve request to the Exabyte and
return success or failure status.  If the program succeeds, the machine issuing
the request now owns the drive until further notice.  Do your backup as normal.
When done, run the program again to issue a release, which allows the other system
access to the drive.  This is of course vulnerable to operator error or system
failure, but would mostly serve the purpose.

If any gurus from ISC or Adaptec are reading this, a question: are there hooks
in the Adaptec 1542A driver for this sort of operation?

My NCR driver for my 68000 system allows (privileged only) access to
the SCSI command block and data interface, allowing identification,
setup, formatting, and diagnosis of random SCSI devices under normal
UNIX operation.  It's REALLY handy.  I just got a Miniscribe 9380
last night; I'm burning it in on my 68K system before putting it in my
386 box.  I can access all the format and configuration parameters,
reformat, test throughput and error recovery, etc., etc., without
taking Unix down other than to initially connect the drive cables.
	geoff steckel (gwes@wjh12.harvard.EDU)
			(...!husc6!wjh12!omnivor!gws)
Disclaimer: I am not affiliated with Sun Microsystems, despite the From: line.
This posting is entirely the author's responsibility.