From owner-freebsd-current@FreeBSD.ORG Thu May 26 18:05:35 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 02FA916A41C for ; Thu, 26 May 2005 18:05:35 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A0C443D1F for ; Thu, 26 May 2005 18:05:33 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.14] (imini.samsco.home [192.168.254.14]) (authenticated bits=0) by pooker.samsco.org (8.13.3/8.13.3) with ESMTP id j4QI7IAX043976; Thu, 26 May 2005 12:07:18 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <42960F8F.2050109@samsco.org> Date: Thu, 26 May 2005 12:03:59 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.7) Gecko/20050416 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <4295D51F.50106@centtech.com> <429606D9.6080602@cs.tu-berlin.de> <42960ACB.7090801@cs.tu-berlin.de> <42960CFE.4060307@centtech.com> In-Reply-To: <42960CFE.4060307@centtech.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: FreeBSD Current Subject: Re: Disable read/write caching to disk? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2005 18:05:35 -0000 Eric Anderson wrote: > Bjoern Koenig wrote: > >> Bjoern Koenig wrote: >> >>> Eric Anderson wrote: >>> >>>> Is it possible to disable all read and write caching to a disk? >>> >>> >>> >>> You can disable write the cache by adding the line >>> >>> hw.ata.wc="0" >> >> >> >> I assumed that you use ATA. If you use SCSI devices then read at least >> the manpages da(4) and camcontrol(8). > > > Thanks.. I've just read (quickly) both man pages. It seems as though > you are suggesting disabling the physical disk caching, which should not > make a difference in my case. The disk would report whatever it needs > to report to either host, and those should be in sync. > > When I mount the filesystem on host B ro, it shows me the filesystem as > of the time that I mounted it ro. Any subsequent changes on host A > (which has it mounted rw) are not seem on host B unless I unmount and > mount again on host B. This seems like a FreeBSD feature and not a > general scsi feature. > > Eric > > > > You simply cannot disable OS caching in FreeBSD. It's a fundamental part of the block I/O and VM layers. There are filesystems like GFS that deal with the issue of directly connecting more than one computer to a disk or set of disks, and there are distributed filesystems like AFS and Coda that deal with making the storage on multiple computers appear as a single network filesystem. Unfortunately, no port of GFS has been done yet, and I estimate that such a port would take 4-6 months. Scott