From owner-freebsd-current@FreeBSD.ORG Thu May 26 17:27:51 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 2FF0516A41C for ; Thu, 26 May 2005 17:27:51 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from mail.efacilitas.de (efacilitas.de [213.133.110.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C2FF43D55 for ; Thu, 26 May 2005 17:27:50 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from eurystheus.local (port-212-202-37-137.dynamic.qsc.de [212.202.37.137]) by mail.efacilitas.de (Postfix) with ESMTP id 019D012397E; Thu, 26 May 2005 19:26:24 +0200 (CEST) Received: from localhost (eurystheus.local [192.168.1.67]) by eurystheus.local (Postfix) with ESMTP id EE1D012B09E; Thu, 26 May 2005 19:26:56 +0200 (CEST) Received: from eurystheus.local ([192.168.1.67]) by localhost (eurystheus.locaL [192.168.1.67]) (amavisd-new, port 10024) with ESMTP id 35653-07; Thu, 26 May 2005 19:26:50 +0200 (CEST) Received: from [192.168.1.67] (eurystheus.local [192.168.1.67]) by eurystheus.local (Postfix) with ESMTP id 0999012B09A; Thu, 26 May 2005 19:26:50 +0200 (CEST) Message-ID: <429606D9.6080602@cs.tu-berlin.de> Date: Thu, 26 May 2005 19:26:49 +0200 From: Bjoern Koenig User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050517 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Eric Anderson References: <4295D51F.50106@centtech.com> In-Reply-To: <4295D51F.50106@centtech.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: amavisd-new at example.com 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:27:51 -0000 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" 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. You can mount partitions that I/O will done synchronously by adding the option 'sync' to fstab. > 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. 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. Regards Björn