xfs
[Top] [All Lists]

Re: XFS corruption during power-blackout

To: Steve Lord <lord@xxxxxxx>
Subject: Re: XFS corruption during power-blackout
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Wed, 29 Jun 2005 13:56:41 -0700
Cc: Al Boldi <a1426z@xxxxxxxxx>, "'Nathan Scott'" <nathans@xxxxxxx>, linux-xfs@xxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, reiserfs-list@xxxxxxxxxxx
In-reply-to: <42C2E0BC.8040508@xfs.org>
References: <20050629001847.GB850@frodo> <200506290453.HAA14576@raad.intranet> <556815.441dd7d1ebc32b4a80e049e0ddca5d18e872c6e8a722b2aefa7525e9504533049d801014.ANY@taniwha.stupidest.org> <42C2E0BC.8040508@xfs.org>
Sender: linux-xfs-bounce@xxxxxxxxxxx
On Wed, Jun 29, 2005 at 12:56:12PM -0500, Steve Lord wrote:

> There are also cool bits of technology which use the rotational
> energy of the spinning down drive to dump the cache out to a special
> track (or this may be an urban legend, not sure).

This seems only to be true for very small writes.  I suspect on power
loss a drive and finish writing the current sector.

Anyhow, I've tested power loss on drives with caching enabled and they
definatley do lose data.  Sometimes a couple of MBs worth.

I don't know if this is true for all drives but NONE of the ones I had
access to when testing did anything like save the cache --- pretty
much all data that was inflight got lost.

> I did spend a bunch of time once ensuring that when you typed sync
> on xfs you could pull the power right after that and everything from
> before the sync survived.

I think this is probably still true.  If I sync then drop power I
don't seem to have any problems provided caching is off.

If caching is enabled I still lose data.  Linux does have a concept of
write barriers but these are presently not implemented for XFS right
now.  Once they are I assume sunc + poweroff will be reliable with
caching enabled.


<Prev in Thread] Current Thread [Next in Thread>