Re: Disable read/write caching to disk?

From: Eric Anderson <anderson_at_centtech.com>
Date: Thu, 26 May 2005 12:40:19 -0500
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.
------------------------------------------------------------------------
Received on Thu May 26 2005 - 15:40:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:35 UTC