Skip to contentSkip to conversation

JFS or XFS

linux-lvm Rajesh Saxena 9 participants 13 messages Jan 15, 2004 – Jan 20, 2004

lore
Share & tools
lore
#0 lore raw

Greetings list..... I am a new user to LVM running kernel 2.4.21 and lvm 1.0.7
I have a brief question because I am used to ext2 and not new journaling
filesystems. Which would you recommend to use on a file mail or web server:
JFS or XFS and why? Please include your personal experience with the filesystems. Thank you so much.

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

#1 lore raw

reiserfs, guaranteed personally. Especially on a mail server.
I've used jfs, I crashed it twice on purpose (network swap, then disable network card), both times jfs failed to boot. (this is because it trusts it's own journal, which a lot of people love about it, both times for me it was wrong..) Personally I haven't had any problems with XFS though, but I haven't used it that much.

Quoted 18 lines

Greetings list..... I am a new user to LVM running kernel 2.4.21 and lvm 1.0.7
I have a brief question because I am used to ext2 and not new journaling
filesystems. Which would you recommend to use on a file mail or web server:
JFS or XFS and why? Please include your personal experience with the filesystems. Thank you so much.

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#2 lore raw
Quoted 9 lines · neuron

reiserfs, guaranteed personally. Especially on a mail server. I've used jfs, I crashed it twice on purpose (network swap, then disable network card), both times jfs failed to boot. (this is because it trusts it's own journal, which a lot of people love about it, both times for me it was wrong..)

Personally I haven't had any problems with XFS though, but I haven't used it that much.

As a note, any journaling FS that uses metadata for updates will have issues with server AbEnds where there is data in-flux. The meta-log(journal) will be in some state of flux and depending on the timing of the AbEnd, then you can be in trouble. The recent XFS code finally fixes a lot of issues about this with a meta journal update daemon and set of sysctls that are configurable. Also, another way to ensure your journal is safe, both with JFS, XFS, ext3 in full logging mode, is to put your journal on a separate device that may not be affected by the AbEnd. I can reveal more, but am short on time. I would personally ask each list of the FS your interested in after you've read about each.

It should be noted as well that each journaling FS has it's own issues which are application dependent. i.e. works better in some cases than others based on usage patterns, file types, etc.

Signature · 2 lines
Austin Gonyou <[email protected]>
Coremetrics, Inc.
#3 lore raw
In reply to neuron
Quoted 1 line · neuron

reiserfs, guaranteed personally. Especially on a mail server.

I agree, reiserfs was tuned for handling lots of small files. Sounds perfect for a mail server.

Quoted 3 lines

I've used jfs, I crashed it twice on purpose (network swap, then disable network card), both times jfs failed to boot. (this is because it trusts it's own journal, which a lot of people love about it, both times for me it was wrong..) Personally I haven't had any problems with XFS though, but I haven't used it that much.

If you go with XFS, stay away from anything older than 1.3.1.

The 1.2 and prior releases had this really nice feature that they ignored the sync command (and fsync I think).

The end result is that with a power outage or kernel lockup you could lose lots of work. I had one failure on a lightly used machine that had a whole days activities still sitting in the OS disk cache when the kernel locked up.

This is fixed in 1.3.1,

Greg

#4 lore raw
Quoted 6 lines · neuron
Quoted 1 line

reiserfs, guaranteed personally. Especially on a mail server.

I agree, reiserfs was tuned for handling lots of small files. Sounds perfect for a mail server.

Also, ReiserFS tools are very mature when it comes to repair and recover from damages. I do not know how the JFS/XFS tools are, but it would be a good idea to investigate how you can repair your FS _if_ you end up with some sort of failure..

Quoted 29 lines
Quoted 6 lines

I've used jfs, I crashed it twice on purpose (network swap,
then disable network card), both times jfs failed to boot. (this
is because it trusts it's own journal, which a lot of people love
about it, both times for me it was wrong..)
Personally I haven't had any problems with XFS though, but I haven't used it that much.

If you go with XFS, stay away from anything older than 1.3.1.

The 1.2 and prior releases had this really nice feature that they ignored the sync command (and fsync I think).

The end result is that with a power outage or kernel lockup you could lose lots of work. I had one failure on a lightly used machine that had a whole days activities still sitting in the OS disk cache when the kernel locked up.

This is fixed in 1.3.1,

Greg

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

#5 lore raw
Quoted 2 lines

how you can repair your FS
_if_ you end up with some sort of failure..

Suggeest reading it as "_when_". Problem with "_if_" is that the fix is too often ignoring it.

--
Steven Lembark 2930 W. Palmer
Workhorse Computing Chicago, IL 60647

                                           +1 888 359 3508
#6 lore raw
In reply to Greg Freemyer
Quoted 5 lines · Greg Freemyer
Quoted 1 line · neuron

reiserfs, guaranteed personally. Especially on a mail server.

I agree, reiserfs was tuned for handling lots of small files. Sounds perfect for a mail server.

Many tests prove this to be true as well. Search on google for what Greg's saying. Lots of benches out there to see.

[...]

Quoted 5 lines
Quoted 1 line

Personally I haven't had any problems with XFS though, but I haven't

used it that much.

Quoted 1 line

If you go with XFS, stay away from anything older than 1.3.1.

Not to mention 1.3.x is when the xfslogd and xfsdatad were finally implemented. I noted this in my prior email regarding tunable log updates.

Quoted 2 lines

The 1.2 and prior releases had this really nice feature that they ignored the sync command (and fsync I think).

It wasn't ignored, just not paid attention too as often it should've been. ;)

Quoted 5 lines

The end result is that with a power outage or kernel lockup you could lose lots of work. I had one failure on a lightly used machine that had
a whole days activities still sitting in the OS disk cache when the kernel locked up.

Depending on how often a system might sync()/fsync() this is true. As well as any FS options you use for mounting XFS volumes regarding log-buffers, io buffers, etc.

Quoted 3 lines

This is fixed in 1.3.1,

Greg

Yes, much better now. Still, even with JFS or EXT3, as I noted before, certain AbEnds will cause meta data to be lost. This is more a function of hardware caching in a non-backed state, such as large cache buffers of some drives 8MB drive cache, etc. (i.e. no battery backed up cache)

Signature · 2 lines
Austin Gonyou <[email protected]>
Coremetrics, Inc.
#7 lore raw
In reply to Rajesh Saxena

Thank you all for the replies regarding ReiserFS....... I will have to do more research into this matter because originally I did not consider reiser for the server. It is always good to get other peoples opinions on topics like this. I have one small request if you don't mind. The mail server will run cyrus imapd and while reading the documentation I saw the following note which is attached below after my email. The author of this document also notes that XFS includes a program called xfs_freeze which will freeze a filesystem from new changes so a more reliable snapshot can be created. Again people here with more experience with LVM and reiserfs might know of a better way to do the snapshot for backups. Any opinions?
Thank you all for your insight. Please keep posting if you have different opinionss.

Please scroll all the way to the bottom:
http://acs-wiki.andrew.cmu.edu/twiki/bin/view/Cyrus/Backup

One issue you may run into: if you're using ReiserFS, at least on Linux 2.4 with LVM1, then snapshots may occasionally fail. The snapshot will be created fine, but the ReiserFS fileystem on it will not be mountable if it has incomplete transactions. The ReiserFS code tries to replay the transactions, fails because the snapshot is read-only, and fails to mount the FS. I've found that syncing the disks before taking the snapshot reduces the chances of this happening dramatically:

sync && sleep 1 && sync && sleep 1 && sync # try to make sure FS will be clean
nice -n -19 lvcreate -s -L 1G -n var_s /dev/OS/var >&/dev/null || \
( echo "Error creating snapshot of /var: $?" && exit 1 )

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

#8 lore raw
Quoted 17 lines · Rajesh Saxena

Thank you all for the replies regarding ReiserFS....... I will have to do more research into this matter because originally I did not consider reiser for the server. It is always good to get other peoples opinions on topics like this. I have one small request if you don't mind. The mail server will run cyrus imapd and while reading the documentation I saw the following note which is attached below after my email. The author of this document also notes that XFS includes a program called xfs_freeze which will freeze a filesystem from new changes so a more reliable snapshot can be created. Again people here with more experience with LVM and reiserfs might know of a better way to do the snapshot for backups. Any opinions?
Thank you all for your insight. Please keep posting if you have different opinionss.

Please scroll all the way to the bottom:
http://acs-wiki.andrew.cmu.edu/twiki/bin/view/Cyrus/Backup

Quoted 7 lines

One issue you may run into: if you're using ReiserFS, at least on Linux 2.4 with LVM1, then snapshots may occasionally fail. The snapshot will be created fine, but the ReiserFS fileystem on it will not be mountable if it has incomplete transactions. The ReiserFS code tries to replay the transactions, fails because the snapshot is read-only, and fails to mount the FS. I've found that syncing the disks before taking the snapshot reduces the chances of this happening dramatically:

Rajesh,

you need to apply the VFS-Lock patch from our web site to avoid your following 'trick'. That enables LVM to 'flush' all pending fs io before activating the snapshot.

Another option is to try out LVM2/device-mapper which supports writable snapshots :)

Regards,
Heinz -- The LVM Guy --

Quoted 7 lines

sync && sleep 1 && sync && sleep 1 && sync # try to make sure FS will be clean
nice -n -19 lvcreate -s -L 1G -n var_s /dev/OS/var >&/dev/null || \
( echo "Error creating snapshot of /var: $?" && exit 1 )

Quoted 8 lines

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

_______________________________________________
linux-lvm mailing list
[email protected]
http://lists.sistina.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf Germany
[email protected] +49 2626 141200

                                                       FAX 924446

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

#9 lore raw
Quoted 3 lines · --- Heinz Mauelshagen

you need to apply the VFS-Lock patch from our web site to avoid your following 'trick'. That enables LVM to 'flush' all pending fs io before activating the snapshot.

ok I will have to look into that this weekend. Just to point something out I am most likely looking in wrong place but I can't find patch for kernel 2.4.21 here
http://tech.sistina.com/cgi-bin/viewcvs.cgi/LVM/PATCHES/

Quoted 2 lines

Another option is to try out LVM2/device-mapper which supports writable snapshots :)

I was under impression that LVM2 and device-mapper are dependant on kernel 2.6 which I don't feel comfortable using for server. I am curious which filesystem you prefer with LVM 1 since you are the "The LVM Guy" =)

______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

#10 lore raw
Quoted 2 lines · Rajesh Saxena

I was under impression that LVM2 and device-mapper are dependant on kernel 2.6 which I don't feel comfortable using for server.

There are device-mapper patches for 2.4 kernels for use with LVM2 tools.

Note that LVM1 snapshots are implemented differently from LVM2 snapshots so you should drop any LVM1 snapshots before switching to LVM2.

(And Linus's 2.6 tree does not include snapshot support, as this is still being tested.)

Alasdair

Signature · 1 line
[email protected]
#11 lore raw

* Alasdair G Kergon <[email protected]> shaped the electrons to say...

Quoted 7 lines

There are device-mapper patches for 2.4 kernels for use with LVM2 tools.

Note that LVM1 snapshots are implemented differently from LVM2 snapshots so you should drop any LVM1 snapshots before switching to LVM2.

(And Linus's 2.6 tree does not include snapshot support, as this is still being tested.)

Where can one find 2.6 snapshot patches?

-D

Signature · 1 line
There is no spoon.