Re: Change Filesystem

From: Lee Sau Dan (danlee_at_informatik.uni-freiburg.de)
Date: 12/09/04


Date: 09 Dec 2004 18:02:33 +0800


>>>>> "Dances" == Dances With Crows <danSPANceswitTRAPhcrows@gmail.com> writes:

>> Mh, you are aware that xfs is a journaling fs, recovering in a
>> second from an unplanned shutdown.

    Dances> That's the theory.

No, it isn't. The theory (of journaling *filesystem meta-data*) only
says that the structure of the filesystem can be recovered easily
after a crash. It doesn't say that the file CONTENTS can be
recovered. If you want the file contents to survive a crash, you need
a fs that supports *data-journaling* and you usually need to
explicitly enable it.

    Dances> ISTR reading something somewhere (one of the
    Dances> comp.os.linux.* groups, or possibly Slashdot) written by
    Dances> someone who kept a lot of data on XFS partitions and lost
    Dances> most of it to an unplanned shutdown.

Not surprising, if data-journaling is not enabled.

Did that someone tell you the filesystem becomes inconsistent (i.e.
with unclaimed blocks, cross-linked blocks, or references to
non-existent blocks) after the crash? I guess if he did, the answer
would be NO. The meta-data journal only guarantees that the data
structure can be recovered. It can do nothing with the file CONTENTS.
So, that guy should not have lost any files. He only had corrupted
file contents. This is consistent with the theory: you journal the
meta-data: the meta-data (==files and directories and
permissions/ownerships) can be recovered. You don't journal the data
(==file contents) : you can't always have the file contents recovered.

    Dances> Maybe the commit interval was set too high, maybe it was a
    Dances> bug in XFS that has since been fixed. People have made
    Dances> the same data-loss complaints about ReiserFS.

Has anybody report a corrupted filesystem, i.e. data *structures* in
the filesystem to be in an inconsistent state? If not, then you can't
say the fs code is buggy based on this.

Again, journal (of meta-data only) guarantees the the filesystem has a
consistent data structure, but not correct file contents.

    Dances> IME, ReiserFS and ext3 deal with power loss situations
    Dances> very well, though. 3 power outages this year at my
    Dances> apartment, ReiserFS and ext3 partitions on 2 desktop
    Dances> machines, no data loss ever.

That also agrees with my personal experience. However, knowing that
I'm not using data-journal (not available in reiser3, not enabled in
ext3 by default), I still know that I'm vulnerable to loss of *file
contents*. I know the journal (of meta-data) is only good to
guarantee that the filesystem *data structures* are safe against
crashes, which is quite enough for me.

-- 
Lee Sau Dan                     §õ¦u´°                          ~{@nJX6X~}
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee


Relevant Pages

  • Re: [PATCH 0/4] jbd: possible filesystem corruption fixes
    ... fail to write a metadata buffer to block B in the journal ... reboots and mount the filesystem ... Actually, the journal checksum in ext4/jbd2 detects this kind of error, ... abort journaling ...
    (Linux-Kernel)
  • Re: Ahh, thats better...
    ... Vista and use that partition to store my virtual machine harddrives. ... TxF (transactional NTFS journaling) would be nice if it was actually ... It's a pain removing meta files from the filesystem. ... the pointers to the actual file data could be lost. ...
    (rec.games.computer.ultima.dragons)
  • Re: EXT2 and Windows: WAS Re: FC5 fails to boot after install
    ... support ext3 journaling, but can still read it fine, and can write to it ... Is there a particular issue known when using this driver? ... but I'm more concerned about disk and filesystem ... And one reason to doubt a third-party driver is simply that it isn't ...
    (Fedora)
  • Re: Ahh, thats better...
    ... Vista and use that partition to store my virtual machine harddrives. ... TxF (transactional NTFS journaling) would be nice if it was actually ... It's a pain removing meta files from the filesystem. ... the pointers to the actual file data could be lost. ...
    (rec.games.computer.ultima.dragons)
  • Re: kern/67919: Why nobody take serious to fix this bug?
    ... On Mon, 31 Oct 2005, 16:08+0100, Uwe Doering wrote: ... could it really be meta-data? ... > in the filesystem code, ... I'm under different impression. ...
    (freebsd-current)