I'm going to be building a fancy new desktop soon, and I want to experiment with file systems. I know that ext3 is the most common for linux, but what about ext4, or zfs? Are their any pros or cons to certain ones?
I won't be doing anything spectacularly off the wall, just using it as my main box. It is a good possibility that it will double as my web server, though.
EDIT [21 Jan 2011] This question is horribly out of date. ext4 is now the default in Ubuntu, and most of the ones mentioned in the answers below are much more stable.
Generally, I would use ext3 for typical desktop machines. Why? Because it's been tested for centuries, and pretty much every linux made in the last 500 years will be able to read your data in case your system crashes.
There are various older comparisons involving ReiserFS, JFS and XFS: http://www.debian-administration.org/articles/388
For JFS and XFS, check out the Wikipedia Articles:
http://en.wikipedia.org/wiki/XFS
http://en.wikipedia.org/wiki/JFS_%28file_system%29 [1]
Now, ext4 is brand new, and while ZFS is considered stable by Sun in Solaris, the Linux Port is also fairly new. ZFS essentially shines in large servers, as you can easily add more capacity to the file system and do other funky stuff that makes it extremely flexible if you have to reconfigure your server quite often (i.e. due to unexpected growth) or if you have very large filesystems.
My personal recommendation: Ext3 for a Desktop machine with an eye on Ext4, ZFS or JFS for File Systems above 2 TB.
But there is really no "Best" File System. Each has strengths and weaknesses, depending on your hardware, the size of the file system, the number of files, the amount of concurrent accesses etc.
[1] http://en.wikipedia.org/wiki/JFS%5F%28file%5Fsystem%29I would echo the thoughts expressed here:
Now, if you're really eager to experiment, what I would recommend is the following:
This will give you a bootable system even if the other filesystem gets hosed. It also would let you test the performance of the other filesytem in relation to ext3.
Good luck
For the average user I Highly recommend using Ext3 everybody else has already expounded its advantages. However, I will sum them up again: Reliability, Ease of use, Standardization, Performance(yes it really does perform well even in really weird situations).
In recent machines the only time I have deviated from that was for a buddy who wanted a machine to copy all of movies, dvds, tv shows, and music onto, and wanted to download more. He showed up with 3 1TB Hard drives and said make it work, make it easy and make it reliable.
So here I used ZFS, because I know the issues of using ubuntu (his distro of choice) and software raids in the long run. I felt that if an upgrade went wrong he would be able to recover on his own, and it would not leave a system that I could remote into. Data integrity is not as guaranteed. The last reason was Disk sizes, if he has a problem will he be able to get another 1 TB disk, will they still be expensive, maybe it will happen so far in the future he will not be able to reliably find disk so small, if he just wants to upgrade.
I used ZFS with copies set to 2, and compression on max. This way if he loses a drive hes fine, whatever isn't small will be compressed (he doesn't need speed, he is what TV and listening to music).
The drawbacks, I had to write a custom script to guarantee that ubuntu always mounted the disks/zfs pool properly. If I am not around where will he get help? What if something fails in an unexpected way?
That is where I am at on all single or dual disk systems I am using Ext3 on more than that I am using either raid5+Ext3 or ZFS.
I recently hit the 32000 links in an inode of the ext3 filesystem (http://www.linuxforums.org/forum/misc/46443-ext2-ext3-limit-32-000-links-inode.html), which prevents you to add so many subdirectories to a directory. With that in mind, I will probably use an other file system in the future. EXT4 is said to go beyond this limit.
I would pay more attention to what is underneath the filesystem: LVM. Because of LVM I have basically had the same Linux installation on three hard drives in three different laptop models.
Because of the way LVM is structured you can migrate the data from one disk to another, while the machine is up and running!
I also tend to create filesystems for each major area of the filesystem hierarchy (my current install has six) and create them as small as possible. You can then grow them from the spare space on the disk when needed.
If I was bored and wanted to play around with the internals of my machine I'd install a fresh distro with ZFS just to see how it runs. Otherwise, I'm not sure why you'd really care what FS your OS chooses to use in a desktop environment-- maybe if it was a high traffic webserver. I'd be happy with the well-tested default choice in any other case (that being ext3
).
ZFS for linux is only available when combined with Fuse (ZFS-fuse). It's quit stable now, and it's easy for experimenting with this filesystem. Maybe in the future it will be build in the kernel... Who knows...
If you want a linux stack and a ZFS filesystem try Distrobution "Nexenta". This has the open solaris kernel, but the ubuntu software stack (including apt-get). It is realy cool because it also has zfs zones and other zfs features...
Also try XFS if you are going to be working with large files, for example in a media server or personal video recorder. EXT3 can be quite slow when deleting large files.
Been there, done that a few times over. Go with the default. Don't bother about the type of the file system unless it gets in your way, because they're really too close to definitively say that one stands out from the rest. Ext3 is the default on most systems for now. Believe me, it will free up your time to bother about other stuff on your main box that really matters - like tweaking your choice of media center application if you're going to be using it as such (for example). It will also save you a lot of headache when you need to restore your file system.
ZFS is really very nice but I don't think it is stable enough to use in linux. As far as I know there is no kernel space implementation of ZFS. But you could upgrade to solaris and use it there. We have upgraded some boxes at work to solaris to get ZFS.
If you're going to install Linux to play with filesystems, I would recommend you also install Solaris to have a play. ZFS is just cool. I used to have a Linux install for my web development stuff, but I've moved over to Solaris.
It can be frustrating though.
BtrFS [1] and Ext4 [2] have been in the kernel for a while and they are quiet stable/fast and scale very well.
I've been personally running all my dev machines and desktop as btrfs since 2.6.31 and they are rock solid, coding, every day work, torrents, mysql, and mounting my root with compression enabled.
[1] http://btrfs.wiki.kernel.org/One problem with ReiserFS is that its creator is going to be unavailable to submit bug fixes for a while...
I lost my data with a problem in ext3 journaling system when happened a power failure
For a pure linux system, I'd go with ext3. But if you need to dual boot and need to read the partition from Windows you'll need FAT32. (Writing to an NTFS partition from linux is still somewhat unstable do to Microsoft's lack of cooperation with the FOSS community.)
I'd go with XFS due to its IO advantages. You can also check this article for more info. http://www.linux.org/lessons/advanced/x1254.html
Ext3 is what I typically use on my desktop machines, but I also have an Eee PC laptop. The Eee has an SSD hard disk and the lifetime of an SSD can be prolonged with fewer writes. The ext2 file system is supposed to perform fewer read/writes than ext3 so I opted to use it on the Eee.
I've seen a lot of comparisons and ReiserFS and ext3 have been in the top for stability and performance. I personally use ext3 everywhere now, it's good enough for my desktop, fast enough for my servers, and the toolset for it is stable and anything out there.
You should defınately use ext3 unless you have a need to use something else.