sharing scsi disk beetween two freesbd's ...

Geoffroy DESVERNAY dgeo at esm2.imt-mrs.fr
Mon Apr 28 15:05:08 PDT 2003


> :
> :I want to use one scsi disk with two redondant servers, mounted r/w on server A and r/o on 
> :server B.
> :Everything works, except that when I write data from server A, I can't read it on server B 
> :before un-mounting the disk ant re-mounting it... (with AND without soft-updates)
> :
> :Is there any way to mount a disk r/o keeping in sync with real disk data ?
> :
> :Thank you.
> :
> :-- 
> :Geoffroy DESVERNAY
> 
>     The machines cache the disk data in memory, so if one machine has read
>     a track and the second machine writes it, the first machine will not see
>     the changes until it flushes its caches (which may be never).  
> 
>     Also, what you are doing is extremely dangerous.  Even the machine with
>     the read-only mount is going to assume that the data on the disk is not
>     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



More information about the freebsd-stable mailing list