xfs
[Top] [All Lists]

Re: XFS corruption during power-blackout

To: linux-xfs@xxxxxxxxxxx
Subject: Re: XFS corruption during power-blackout
From: "Russell Howe" <rhowe@xxxxxxxxxxxx>
Date: Wed, 6 Jul 2005 12:27:20 +0100
In-reply-to: <200507060424.HAA27591@raad.intranet>
Mail-followup-to: linux-xfs@xxxxxxxxxxx
References: <20050705181057.GA16422@kevlar.burdell.org> <200507060424.HAA27591@raad.intranet>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Wed, Jul 06, 2005 at 07:24:03AM +0300, Al Boldi wrote:
> Was ordered mode disabled/removed when XFS was add to the vanilla-kernel?

See the FAQ:

http://oss.sgi.com/projects/xfs/faq.html#nulls

XFS only journals metadata, not data.

So, you are supposed to get a consistent filesystem structure, but your
data consistency isn't guaranteed.

That's not to say XFS is especially cavalier about your data, but just
that the journalling functionality in XFS isn't journalling data writes.

I think quite a lot of work was done a year or two ago to make it less
likely that you would lose data after a crash or power loss, but XFS
makes no guarantees (although, I think if you read back through previous
postings, if you use fsync or fdatasync, then you should be able to
guarantee that your data was written out).

I think you can also mount with -o sync to make all writes synchronous
(although obviously, performance suffers), and you can also (thanks to
the hard work of a contributor whose name escapes me) use chattr to set
the 'sync' attribute on files and directories to specify that I/O to
those files is always synchronous (ignore the man page for chattr that
says it only works on ext[23]. XFS now supports the ioctls too).

There are probably other things I'm missing here, and I know nothing
about XFS internals and so on, but there are others on this list who can
probably fill in those blanks if there's anything specific you need to
know (and who can point out all the errors and omissions in the above too,
no doubt :)

-- 
Russell Howe       | Why be just another cog in the machine,
rhowe@xxxxxxxxxxxx | when you can be the spanner in the works?


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