Re: [Hampshire] Write-caching and journalling filesystems.

Top Page

Reply to this message
Author: John Cooper
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Write-caching and journalling filesystems.
Hugo Mills wrote:
>    All - 

>
>    I turned this up while browsing through today's LKML postings.  The
> main information is in the XFS FAQ:

>
> http://oss.sgi.com/projects/xfs/faq.html#wcache
>
>    The potted summary is: if you have write cache enabled on your hard
> disk, then your system may be at risk of data corruption on power
> loss.

>
>  - If you have write cache enabled on the disk, and write barriers
>    enabled (see below) on the filesystem, then you are OK.

>
>  - If you have write cache enabled on the disk, and battery-backed
>    cache on the disk, then you are OK.

>
> - If you have write cache disabled on the disk, then you are OK.
>
> - In any other situation, you may be at risk.
>
>    Barriers are a filesystem feature which allows the filesystem to
> flush the disks write cache to the platter at regular intervals. By
> default, XFS and ReiserFS have barriers enabled. *ext3 does not*

>
>    So, if you're using ext3, you should do one or other of the
> following:

>
>  - Disable the write cache on your hard disks (see the link at the top
>    of this mail for details)

>

Hugo, this would explain why my CCTV server file system was corrupted in
a recent power cut as I thought using ext3 was supposed to prevent this
happening.

sudo hdparm -I /dev/sda | grep cache
           *    Write cache


--
--------------------------------------------------------------
Discover Linux - Open Source Solutions to Business and Schools
http://discoverlinux.co.uk
--------------------------------------------------------------