From owner-freebsd-stable@FreeBSD.ORG Mon Apr 28 15:05:08 2003 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 792DE37B401 for ; Mon, 28 Apr 2003 15:05:08 -0700 (PDT) Received: from mail.dgeos.net (dgeos.net [62.212.101.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 476D643F85 for ; Mon, 28 Apr 2003 15:05:07 -0700 (PDT) (envelope-from dgeo@esm2.imt-mrs.fr) Received: from localhost (unknown [127.0.0.1]) by localhost (TerrorMail(0.1c)) with ESMTP id A029AC10B; Tue, 29 Apr 2003 00:05:04 +0200 (CEST) Received: from esm2.imt-mrs.fr (dgeos.dgeos.net [192.168.0.1]) by mail.dgeos.net (TerrorMail(0.1c)) with ESMTP id 91F62C10B; Tue, 29 Apr 2003 00:05:00 +0200 (CEST) Message-ID: <3EADA59D.6050201@esm2.imt-mrs.fr> Date: Tue, 29 Apr 2003 00:05:17 +0200 From: Geoffroy DESVERNAY User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030401 Debian/1.0.2-2 X-Accept-Language: fr-fr, fr MIME-Version: 1.0 To: Matthew Dillon , freebsd-stable@freebsd.org References: <3EAD48E8.2020401@esm2.imt-mrs.fr> <200304281541.h3SFfARi045685@apollo.backplane.com> Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: AMaViS-ng and clam @ dgeos.net Subject: Re: sharing scsi disk beetween two freesbd's ... X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Apr 2003 22:05:08 -0000 > : > :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