5

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)

fen
  • 415
  • 4
  • 8

6 Answers6

10

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.

James
  • 7,553
  • 2
  • 24
  • 33
  • Ok - this is the answer I was initially looking for. – fen Mar 11 '10 at 08:00
  • Note that you may need to still download/install xfsprogs from e.g. CentOS to have full XFS support on RHEL 5.4 - not an issue if you're using CentOS anyway. – James Mar 11 '10 at 09:27
8

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.

3dinfluence
  • 12,409
  • 2
  • 27
  • 41
  • 1
    +1 for ZFZ on OpenSolaris or Solaris. – Jonas Mar 10 '10 at 21:14
  • 2
    +1 for explaining that journaling does not mean data protection. i did not realize that. so jfs is a good choice? – fen Mar 10 '10 at 21:15
  • 2
    Wikipedia has a decent comparison of file systems here: http://en.wikipedia.org/wiki/Comparison_of_file_systems Data integrity features that you would be interested in are block journaling, meta-data only journaling, COW, and CheckSums/ECC. They don't have a column that indicates if the file system supports online growing of file systems. – 3dinfluence Mar 10 '10 at 21:16
  • 2
    I've never used JFS so I can't really comment on it. But I did manage about 30TB of LVM storage using XFS for the volumes. I never ran into any issues but it's really just a matter of when...not if. I've been running ZFS on Opensolaris on my fileserver at home and really like ZFS....would rather Linux over OpenSolaris though....mostly due to being comfortable with it. I'm really looking forward to BTRFS maturing though. – 3dinfluence Mar 10 '10 at 21:19
  • One last quick note. Everyone likes to suggest EXT3 as a safe stable choice and it's not a bad one as it's very well understood, tested, and default file system in many distributions. But I've run into corruption issues with it in the past due to an unclean shutdown. So I'm convinced that this issue is a when not an if with most file systems. It's just a bit of bad luck really. You could do 100 unclean shutdowns and not have any data corruption issues. But as file systems get replaced with more modern ones like ZFS and BTRFS this will be mostly a thing of the past. – 3dinfluence Mar 10 '10 at 21:27
  • +1 for zfs too. There're other solutions like http://www.nilfs.org/en/ but still in infancy. – PiL Jul 02 '10 at 15:14
2

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).

demonkoryu
  • 75
  • 6
2

I wonder had anyone among above-mentioned "losers" tried using fsck before giving up with JFS? JFS@Linux hasn't kernel built-in journal recovery code, and thus requires using appropriate user-space tool for that.

poige
  • 9,171
  • 2
  • 24
  • 50
  • I almost lost a partition recently during an online resize JFS. Luckily no data has been lost, but it required a reboot and a fsck to get the filesystem clean. All my XFS Partitions have never had a Problem during resizing and I'm going to move the JFS partitions to XFS in the next weeks: I'm never going to use JFS again. – fen Jan 22 '11 at 17:33
  • You've said "discovered that one file on the JFS volume has been completely corrupted" due to power outage. Now you says it's due to online resize. Man, I just have nothing to add. – poige Jan 25 '11 at 00:38
2

The standard Linux ext3 filesystem supports online grow, and meets your other requirements as well. Unless you have other special needs, that's really the right answer. Even though XFS has a long history and a good reputation, using it still puts you into a special case, which is fine, but comes with a inherent cost in increased complexity — and why "pay" for something you don't need?

mattdm
  • 6,550
  • 1
  • 25
  • 48
  • You're and I wasn't aware ext3 supports online growing the filesystem. Just looked up the man page and found that it is supported. This is good to know - so thank you for the hint. – fen Jan 22 '11 at 17:35
1

I used JFS In a large scale professional environment, and got burned bad. Massive corruption problems that would not show up right away, sometimes all files would end up in lost+found just from a clean reboot.

Changed over to XFS, and never looked back. Using it for 5 years now on hundreds of mutiterabyte systems.