JFS or XFS or anything else?

After deciding to use LVM2 as volumemanager on our servers there was also the wish for an online resizeable filesystem. After reading a few articles I decided to use JFS in favour of XFS.

Now today I had a power outage on our office server and I discovered that one file on the JFS volume has been completely corrupted. While this might happen the system fooled me into believing everything is alright by not indicating any filesystem problems during the bootup after the power failure. All filesystems were clean after replaying the journal.

This leaves me with a bad taste. I don't want a filesystem which would not recover well after a power outage, but I really don't want a filesystem which doesn't tell me that there might be a problem.

So I thought I give it a shot and ask which filesystem do you prefer? Which one do you favour and why? I'm looking for the following features:

  1. robust
  2. online growable
  3. good performance for usual workloads (normal filesizes - nothing special like millions of small files or such)
  4. available in the CentOS 5.4 distribution, but that's optional

I'd also like to know if you have used JFS and have had bad experiences with it - also of course if there're success stories using JFS. And ultimately: would you prefer XFS over JFS or vice versa (as mentioned for everyday use, not for specific workloads)


Solution 1:

XFS.

JFS is basically dead/unmaintained now.

Most/all of the XFS developers now work at Redhat and kernel support for XFS is available out of the box in RHEL 5.4.

Solution 2:

Replaying a journal just means that the meta data gets put back to a clean state. It makes no guarantees on the data itself. This is true with any journaled file system, at least any that don't also do other tricks like COW (Copy On Write). So there is a potential for data corruption like this anytime a server gets shutdown uncleanly regardless of which file system you select. Your file system did it's job and was able to get the file system back to a clean state minimizing data loss/corruption.

So the lesson learned from this should be always have your servers on a UPS that can instruct the server to shut down cleanly when it's battery is low. And always have good backups.

If you're really worried about data integrity you'll have to move to a more robust file system like ZFS on OpenSolaris or BSD. It's the only production ready free solution that I know about at this time. BTRFS on Linux will be a decent solution in a few years once it's mature and tested. But I wouldn't really recommend using it in a production environment at this time. Even these more robust file systems are not a replacement for backups.

Solution 3:

Same experience as Brad here.

JFS was really nice performance- and feature-wise, but I just lost 3 partitions worth of data after a forced shutdown.

I've thus tossed JFS to the bin and will use XFS in the future (and wait for ZFS on Linux as well as BTRFS).