From owner-freebsd-stable@FreeBSD.ORG Mon Apr 28 15:30:42 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 59FCE37B401 for ; Mon, 28 Apr 2003 15:30:42 -0700 (PDT) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id AF9C643F85 for ; Mon, 28 Apr 2003 15:30:39 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.12.9/8.12.6) with ESMTP id h3SMUTVI048522; Mon, 28 Apr 2003 15:30:29 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.12.9/8.12.6/Submit) id h3SMUTcI048521; Mon, 28 Apr 2003 15:30:29 -0700 (PDT) Date: Mon, 28 Apr 2003 15:30:29 -0700 (PDT) From: Matthew Dillon Message-Id: <200304282230.h3SMUTcI048521@apollo.backplane.com> To: Geoffroy DESVERNAY References: <3EAD48E8.2020401@esm2.imt-mrs.fr> <200304281541.h3SFfARi045685@apollo.backplane.com> <3EADA59D.6050201@esm2.imt-mrs.fr> cc: freebsd-stable@freebsd.org 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:30:42 -0000 : :> 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