Messages in this thread | | | Date | Thu, 31 Dec 1998 09:09:47 -0500 (EST) | From | "Richard B. Johnson" <> | Subject | Re: Drunken mumblings [OFFTROPIC] |
| |
On Wed, 30 Dec 1998, John R. Lenton wrote: [SNIPPED] > > Can a SCSI cable be used to connect computers? I mean, can a > computer be daisychained with say a hard disk? In theory at > least? Using a special card?
A SCSI disk (or any SCSI device) can be "shared" by other masters on the SCSI bus. The master only has to win arbitration (it's done by the chip), and it can access any device that wants to be accessed. I use "want" here in a particular way. A SCSI Host controller, and its driver software, generally doesn't "want" some other SCSI master telling it what to do.
Therefore, communications with a device such as a disk, by two separate computers, is not a problem. You can, in fact, use a common hard disk even to boot two different machines. The problems come if one or more of the machines tries to write to the disk.
Machine 1 creates a file called /tmp/xxx Machine 2 creates a file called /tmp/xxx
The physical location chosen for the data and the directory will depend upon the state of the machine's internal buffering at the time the file was created, the OS Version, and when the directory was actually written.
So you have two files, in two places on the physical media, that have the same name and probably different data. This is called file-system corruption. After you create/delete a few files for a time (such as a kernel compile), the state of the physical media will be entirely different than what each kernel "thinks" it is. Recovery from such a situation is best done with mke2fs (after disconnecting one of the machines).
If one modified some SYSV configuration files so that log files in /var/log and/or /var/adm, went to a separate (private) disk, it is possible to have two (or more) Linux machines share the same root partition on a shared SCSI hard disk. One only has to make sure that this partition is mounted read/only.
A NFS mounted root partition works differently. You can read/write at will because the server performs those functions on behalf of each client. The server, therefore, always "knows" and maintains the state of its file-systems. Its hard disk is "logically" shared, not "physically" shared.
Cheers, Dick Johnson ***** FILE SYSTEM WAS MODIFIED ***** Penguin : Linux version 2.1.131 on an i686 machine (400.59 BogoMips). Warning : It's hard to remain at the trailing edge of technology.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |