From owner-freebsd-current@FreeBSD.ORG Thu May 26 17:40:42 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 B5CF516A41C for ; Thu, 26 May 2005 17:40:42 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from mh2.centtech.com (moat3.centtech.com [207.200.51.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4DF1943D4C for ; Thu, 26 May 2005 17:40:41 +0000 (GMT) (envelope-from anderson@centtech.com) Received: from [10.177.171.220] (neutrino.centtech.com [10.177.171.220]) by mh2.centtech.com (8.13.1/8.13.1) with ESMTP id j4QHeXGM053685; Thu, 26 May 2005 12:40:34 -0500 (CDT) (envelope-from anderson@centtech.com) Message-ID: <42960A03.6020001@centtech.com> Date: Thu, 26 May 2005 12:40:19 -0500 From: Eric Anderson User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.7) Gecko/20050504 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Bjoern Koenig References: <4295D51F.50106@centtech.com> <429606D9.6080602@cs.tu-berlin.de> In-Reply-To: <429606D9.6080602@cs.tu-berlin.de> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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 17:40:42 -0000 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" That appears to be for ata devices only, correct? I'm using fiber channel so it's scsi-like. > to /boot/loader.conf. I'm not sure if there are methods to disable the > read cache of the hard disk drive. I can't imagine that the read cache > is relevant concerning file system consistency. Host A has filesystem mounted rw, host B has it mounted ro. If host A makes changes, host B cannot see them without unmounting and remounting ro. I wanted to find out if it was a read caching issue on host B. > You can mount partitions that I/O will done synchronously by adding the > option 'sync' to fstab. I've tried this. I'm not sure if it made any difference. >> Also - what exactly are the issues with forcing an unclean filesystem >> to mount rw? I know you could (will?) have data corruption, but on >> which data? Only data that has not been synced to disk? Any random >> amount of data? > > > If you use soft updates, then you will notice that some files disappear. > This is not corruption, but rather a loss. In theory you won't have > corruption under certain circumstances, practically it's a controversial > issue. I've turned off softupdates to minimize my variables. > My machine crashes around three or four times a week for the last four > month and I still don't have serious problems with the filesystem > consistency. > > Read more about soft updates in the handbook: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/configtuning-disk.html#SOFT-UPDATES > > > There are some discussions about this topic in the mailing list archive. I'll look again.. Thanks Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology A lost ounce of gold may be found, a lost moment of time never. ------------------------------------------------------------------------