Linux users,
Why don’t you use btrfs?
Why do you prefer ext4 or even ZFS?
Boost appreciated!
@dpk btrfs has absolutely aweful multi device handling when I had to replace a broken disk, which caused the process to take about a week to replace the disk.
zfs handles the exact same problem in about 5 minutes plus resync time.
It's been about 10 years, but btrfs really burnt me.
@dpk I have very simple requirements for my personal computing, so I only use Btrfs on my main PC. For anything else, like my laptop and PinePhone, I just use ext4 because I know it and it's reliable.
If I had a more complex project, like a NAS device, I'd definitely try ZFS because of all the amazing things that @allanjude has said it can do (like adding new drives to a volume without losing any uptime).
@dpk if you want details: the broken disk was still on the bus and reacted to basic commands, but reading or writing data timed out. that caused massive delays on every command and btrfs refused to just treat the disk as broken and release its usage in the kernel, as it still seemed to work, requiring me to rebalance the whole filesystem away from that broken disk to remove it.
zfs has an offline command to just take a specific disk offline, which solves this issue.
@dpk
KISS
10:55:04 janneke@dundal:~/src/linux
$ wc -l fs/ext2/* | grep total
9899 total
10:55:14 janneke@dundal:~/src/linux
$ wc -l fs/ext4/* | grep total
67225 total
10:55:18 janneke@dundal:~/src/linux
$ wc -l fs/btrfs/* | grep total
153224 total
@dpk XFS on LVM guy here. Works for me, no need to switch.
@dpk old systems, speed, space. I used btr for a long time but rarely messed with the cool stuff. Zfs, if it's close to what the real sun version was is the best of the bunch. Btrfs is a poor man's clone .
The real reason is probably the default on install is what people stick with unless they have a very compelling reason to use a different one and actually understand why. Like I can't think of any reason why xfs was a default for one vendor, but it probably had a useful feature
@dpk
I go with defaults—partly because laziness, but also I'm not doing anything special
@dpk ext4 has been working well enough for me since I started using it in probably ~2008. I did consider btrfs from time to time but never saw a big enough reason to switch on my machines.
@dpk
On my devices I use whatever comes by default with the os (Ubuntu, so ext-4).
I don't personally need any of the features of more advanced file systems, and I do need the ease and reliability of using a highly supported and stable one.
I'm not a storage expert and have no wish to become one; giving me a more powerful tool to manage will cause more breakage than sticking with the system default.
@dpk ZFS is more stable, particularly when it comes to the features I care about, above all RAID 5 and 6, and has a far better UX. Though I do use Btrfs on systems where I don't need those features. The btrfs CLI tools are bad, but not so bad that I want to compile the kernel.
@dpk The last time I tried btrfs (about twenty years ago) it burned me.
he/him
@dpk
I use default btrfs on Fedora. I should learn to use the cool features... I am a poor man, so a poor man's zfs suits.
@dpk hours I spent fixing btrfs the last 5 years: 6+
hours I spent fixing ext4 or zfs: 0
@dpk It's the default in the Debian installer. Also, many many years ago, it had the reputation of being experimental and not as reliable as ext4, and that's still stuck in my head.
I feel like I should spend some time to learn more about it, as I'm hearing good things nowadays, but haven't managed to do that yet.
@dpk I keep reading bad things about btrfs failures, and OTOH I have decades of good experiences with ext4 (and lvm and raid) as an allrounder FS, and ZFS for cases where I need the extra features (checksumming, and snapshot sending). Also, btrfs, apart from the minor convenience of not needing extra installation like ZFS, doesn't seem to offer any benefits, so why risk my data?
@dpk I prefer ext4 for three main reasons: (1) it's conceptually simpler; (2) (possibly just because it's older, possibly because of that first factor) it is both lighter and more predictable in its use of system resources; and (3) ext2/3/4 have never lost data for me that wasn't directly due to failing hardware while btrfs has (and the diagnostic / recovery tooling was much better at the time for ext).
I want what btrfs offers! It's not off the table, I still keep up with its development.
The answers to this are basically of two types:
1. I don’t care; I just use whatever the default is, and the default is ext4 (which only begs the question, because why are distros still using ext4 by default?)
This surprises me, because essentially what people don’t care about about is … the software responsible for accurately storing and retrieving every bit of their personal data
Journaling alone made things a bit more reliable, but I personally will never use a non-CoW filesystem again
2. ZFS is more reliable and easier to administrate than btrfs
This really surprises me.
For the record, I was a FreeBSD user on my servers until a couple of years ago when I switched – mostly in order to be able to use Nix on the server as well as on my Mac. On FreeBSD, I always used ZFS, even when ZFS root was still a bit awkward to set up. (See also: I do not trust my data on non-CoW filesystems.)
But until I asked today, the only stories I had heard of ZFS on Linux were pretty negative.
Mostly, admittedly, to do with the fact that ZFS on Linux has (had?) to be loaded in separately from an external source, and sometimes there were problems with kernel upgrades, etc.
ZFS on FreeBSD was always rock solid for me once set up, and as far as I recall, I never heard of any actual data corruption issues on Linux either.
However, my experiences with btrfs have been generally that I find it easier to administer than ZFS.
For example, in btrfs you can set properties like transparent compression for a directory you own without being root. At least on FreeBSD that wasn’t possible, because you had to create a separate subvolume and set the mount properties of it to achieve that – which required root privileges.
Resizing a zpool was also quite hard, and the fact that the btrfs documentation at least made it *sound* easier also made me feel like btrfs was a safer choice
Dumbass of the day prizes go to:
the person who tried btrfs ‘20 years ago’ (in 2006 it wasn’t even created yet, and anything like 20 years ago it was probably still unstable – it wasn’t even stable on-disk till 2013) and had data corruption and vowed never to use it again. newsflash: unstable software is unstable and will break on you
the person who showed me the lines of code count for ext4 vs btrfs and said ‘look! it’s much simpler!’ reliability is a feature, and features cost code
Anyway, I’m certainly not a btrfs fangirl. It seems to have significant issues when available disk space is low – a problem I’ve personally run into.
But I wonder how much of the reluctance to use it stems from that long development period when it was unstable, even though it’s now in production all over the place. The fact that some features are shipping but still considered unstable (RAID 5/6) also likely doesn’t help
Maybe this isn’t the best development model for a file system.
Oh, and btrfs also seems to be much less of a memory hog than ZFS
@dpk to my knowledge there was a concerted proprietary-alternative marketing push against btrfs which had (has?) a failure state in one "get struck by lightning twice" pathological scenario.
But I think there is less difference than you might think between getting hit by lightning twice at once and getting hit by lightning three times at once anyway, so it might be right to not structure all of your storage around one very pathological two lightning strike scenario.
@dpk my reason is: ext4 does all the things i need, and i understand it conceptually. zfs/btrfs have concepts i don't understand, and you need to use their native tooling as df etc aren't working very well with them?
@janl @dpk That said, since you asked: I trust the btrfs development team less than the zfs development team, even with all of the staff changes over the years.
Reading the threads about btrfs on LKML etc. have not instilled confidence this is being run by thoughtful, considerate individuals, and that matters when I am literally betting my entire net worth on the stability and strength of the code involved.
@dpk Because btrfs lost my rootfs long time ago, and Shishkin told it is badly designed. I prefer xfs, it is rock solid.