sharing scsi disk beetween two freesbd's ...
Matthew Dillon
dillon at apollo.backplane.com
Mon Apr 28 15:30:42 PDT 2003
:
:> going to change out from under it, and when it does you could crash the
:> kernel.
:>
:> A better solution would be to attach the disk to a single machine and then
:> export the filesystem to the second machine via NFS.
:>
:> -Matt
:Of course, but the two machines are going to be redundant servers, ant
:the disc
:(an IDE raid array presented as scsi disk) will have to be accessible by
:the second server,
:in case of failure of the first one...
:
:Isn't there any mechanism that could force the system to flush read
:cache on each operation ?
:
:I think the design of scsi bus, which allow 2 'SCSI adapters' (=> 2
:computers) should imply that one disc (or device) can be accessed by two
:hosts at the same time... for reading of course :)
:
:What do I forget/misunderstand ?
:
:--
:Geoffroy DESVERNAY
No, you are talking about filesystem level cache coherency and it is
simply not possible to do it at the disk device level. A SCSI system
can share disks, certainly, but that doesn't mean that filesystems being
managed on top of those disks can be shared in that manner!
There are several solutions. The easiest is to get a stand-alone
RAID subsystem like a NetApp and export it to both machines via NFS.
Poof, problem solved. Well, mostly solved. In both the system you
describe and this solution you still have a weak link in that both
depend on the same physical RAID hardware.
Other solutions depend on what you mean by 'in case of failure'. I'm
not sure I understand how the secondary server would be able to take
over from the primary using a read-only mount when the primary server
needed a read-write mount. If the servers are accessing databases and
such and the primary fails, the secondary would at a minimum have to do
a sanity check on the filesystem and the database before it could use it,
and you would need some surefire way to ensure that the secondary machine
doesn't mount the disks read-write if there is any chance that the primary
machine is still operating with the mounted read-only.
Fail-over can mean many things. In a web server cluster fail-over would
occur if response rates from a particular server dropped too low, or if
that server's web service died... which is very different from the server
itself crashing.
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the freebsd-stable
mailing list