[Top] [All Lists]

Re: XFS questions

To: Grozdan Nikolov <microchip@xxxxxxxxx>
Subject: Re: XFS questions
From: Chris Wedgwood <cw@xxxxxxxx>
Date: Fri, 8 Sep 2006 12:19:40 -0700
Cc: xfs@xxxxxxxxxxx
In-reply-to: <200609081923.08215.microchip@xxxxxxxxx>
References: <200609081923.08215.microchip@xxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
On Fri, Sep 08, 2006 at 07:23:07PM +0200, Grozdan Nikolov wrote:

> I'm also worried about the 'zeroing' thing in XFS.

Most of what people claim is a bit vague and often incorrect.

> 1) How reliable is XFS at data-integrity?

Fine, if your applications are sane.  MTAs like postfix for example
*never* had any problems with XFS.

> 2) Will the 'zeroing' thing be removed/fixed in the near future?

What usually happens if that if you truncate over a file, and write
data *then* loose power some of the data might not have been written
to disk yet so when you read it back the XFS returns zeroes.

This is normal/expected for journalling filesystems.  Now, by default
ext3 doesn't have this 'problem' so I think have a misconception as to
how it should work (or how they would like it to).

In recent kernels when XFS truncated over a file the data is flushed
after close() so the chances of loosing data are much less.

Why have people seen this?  Because a lot of applications do something

   open file ~/.bookmarks


   open file ~/.bookmarks, truncating the existing file

The open + truncate is journalled, so that will survive a power
failure, but the 'write' isn't --- so you might end up with a file
that looks like it has zeroes.

I'll claim this in general is a bad practise and I'm also going to
claim applications that do this ideally should be fixed to open/creat
tmp, write, fsync, close, rename tmp to original.  Not only does that
make things more reliable for XFS, but also pretty much every other fs
out there on any unix-like OS.  It also is more reliable again
something like a crash/powerfailure in the application during write
out (which I've seen).

<Prev in Thread] Current Thread [Next in Thread>
  • XFS questions, Grozdan Nikolov
    • Re: XFS questions, Chris Wedgwood <=