[comp.sys.mac] Connecting two MacPlusses to one SCSI drive!

frankk@mcvax.UUCP (04/08/87)

Here is a nice question.

How reliable is it, to connect two Mac's to the same SCSI hard disk?

I just tried it, and is *seems* to work, that is, both Mac's boot
from the drive, and they can read from and write to it.

The big question is: what will happen if both of the Mac's want to
write to the drive?

I know that SCSI devices need different numbers to perform ok when
connected, so now there are two devices (i.e. the Mac's) with the
same device number (=7) connected!

Anybody any idees?

-- 
                                                                      ___   
Frank Kuiper, CWI, Amsterdam.                                    _][__| |
frankk@mcvax, frankk@cwi.nl, frankk%cwi.nl@seismo.css.gov       <_______|-1
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch.       O-O-O

dgold@apple.UUCP (04/09/87)

In article <243@sering.mcvax.cwi.nl> frankk@cwi.nl.UUCP (Frank Kuiper) writes:
>Here is a nice question.
>How reliable is it, to connect two Mac's to the same SCSI hard disk?

This is a REALLY dangerous and bad thing to do.  The Mac file manager is
not set up to handle shared hard disks.  Even with the Control Panel cache
off, it caches information in memory, and two Macs writing to the same disk
are guaranteed to corrupt that disk, and fast.  DON'T DO THIS!
-- 
David Goldsmith
Apple Computer, Inc.
MacApp Group

AppleLink: GOLDSMITH1
UUCP:  {nsc,dual,sun,voder,ucbvax!mtxinu}!apple!dgold
CSNET: dgold@apple.CSNET, dgold%apple@CSNET-RELAY
BIX: dgoldsmith

ephraim@wang.UUCP (04/10/87)

In article <243@sering.mcvax.cwi.nl>, frankk@mcvax.cwi.nl (Frank Kuiper) writes:
> How reliable is it, to connect two Mac's to the same SCSI hard disk?
> 
> I just tried it, and is *seems* to work, that is, both Mac's boot
> from the drive, and they can read from and write to it.
> 
> The big question is: what will happen if both of the Mac's want to
> write to the drive?

Bad things!

> I know that SCSI devices need different numbers to perform ok when
> connected, so now there are two devices (i.e. the Mac's) with the
> same device number (=7) connected!
> 
Since nobody addresses the Mac on the SCSI bus, the fact that both Macs
respond at the same address is not a problem.  There are other problems:

	(1) Most SCSI drivers for the Mac are written on the assumption
	    that there's no other host out there, so there's no bus
	    activity that they didn't initiate.  If they find the bus
	    or drive busy, they simply return an error.

	(2) The Mac file system is written on the assumption that 
	    native volumes are the sole property of the local Mac.
	    Important data structures, such as the volume header,
	    volume allocation map, and directories are cached in
	    memory and flushed out to disk at various times.  With
	    two Macs mounting the same volume, you're headed for
	    big trouble *unless* the volume is read-only.

jjg@walden.UUCP (04/11/87)

In article <243@sering.mcvax.cwi.nl> frankk@cwi.nl.UUCP (Frank Kuiper) writes:
>
>Here is a nice question.
>
>How reliable is it, to connect two Mac's to the same SCSI hard disk?
 ...
>
>The big question is: what will happen if both of the Mac's want to
>write to the drive?

	If both Mac's arbitrate for the SCSI bus at the exact same time,
	I can see a real problem. From what I remember, during the SCSI
	arbitration time ( the request for the bus by the Initiator (Mac))
	the first step is to check Busy (a SCSI bus signal). No problem
	so far... (neither Mac is on the bus). Then, the Mac(s) should
	put their SCSI I.D. on the data bus and 'glance' around to see if
	it wins arbitration ( it has the highest I.D. on the bus). Since
	BOTH Mac's are addressed the same, each thinks it has the bus...
	what follows would be disaster. Since the arbitration/selection
	phase is done before any command to a Target ( the hard disk) it
	doesn't matter what the command is (i.e. both attempt write or read
	or mixed).
>
>I know that SCSI devices need different numbers to perform ok when
>connected, so now there are two devices (i.e. the Mac's) with the
>same device number (=7) connected!
>
		see above

>Anybody any idees?
>
	One idea.. I think the SCSI I.D. of the Mac is 'stored' in a
	register in the NCR 5380 (SCSI Proto. Cont. I.C.) You may be
	able to hack the SCSI init to change one of the Mac's to a
	different I.D. Maybe I.D. 6. Since there are 8 allowed I.D.'s
	just pick one that doesn't collide with the hard disk. I know
	this would work with the NCR 5385/6 (the ID REGISTER can be used
	in "strapped" or "programmed" id mode). You would have to check
	the data sheet on the NCR 5380 (sorry I don't have that one 
	handy!)

						good luck

						John Grana
						jjg@walden
				..!seismo!rochester!cci632!walden!jjg