Per title. From quick googling, I understand that zfs is a filesystem that provides some kind of software RAID and resiliency (eg CRC checks at the block level). Is my understanding right that it just good for detecting storage corruption, but not really self healing?
My home server just for a mini storage/ media server and I am broke to afford RAID. So at the moment, it’s just 2 consumer grade drives .
So pros with zfs I can think of, I get slightly better data resiliency.
But after reading the docs, the cons for me are that a) it’s not so straightforward/ somewhat complex to tune and use, b) it’s not default in mainline linux, and c) slightly lower performance?
What do you think and is it worth learning to use it vs just slapping a plain xfs/ ext4 ?
If you spend more than an a few hours a year on unix IT, ZFS pays dividends.
In my experience, RAID 5 has always been poor performance, and at RAID 50 you’re better off just using ZFS.
ZFS’s killer feature (aside from RAIDZ) is silent data corruption protection, which is why its preferred for large pools with many drives or anywhere where data resiliency needs to be very high.
The key here is the pool size, ZFS is only worth running if you have a sizable amount of drives and the system resources (RAM mostly) to run it.
You can run it on a cheap homelab server, and people do, but I wouldn’t recommend it unless you only use it for storage and you get more drives for RAIDZ.
Otherwise, the cheapo method of getting better data resiliency without performance loss is RAID 10 (Or in your case, RAID 1). That’s my default for any consumer grade drives. The cost of half the usable space is just worth the level of protection you get from a drive failure, especially when you’re on a budget (still much cheaper per TB than buying some beefy SAS drives and doing RAIDZ).
Make it a RAID 1 and chuck XFS on it for some corruption protection (or BTRFS, or ext4).
Also, make sure you use smartctl and even consider making a script that runs a test monthly and saves the results somewhere easy. Start a long test of your drives and check the output later (take a couple of hours to a day) to see if it found any errors and look at the error counter stats. A failing drive will have a lot of errors stacked up in the counter, and a failed drive is if the long test fails.
One of the most annoying parts is that OpenZFS drags their feet on Linux kernel releases. I understand Linux isn’t their only target, but adapting to the new APIs is usually merged quickly, but you are lucky to get a release before the last kernel is deprecated. I’ve been keeping Linux 7.2 on life support for weeks now.
The old advice was to stick to LTS. For stability this is true, but now with all these LLM-guided bug/security finds, much of these aren’t backported & leaves one at greater risk than before.
You’d be surprised at how many companies still use el7 internally 🥶
el7?
Just chipping in as someone who’s tried mdadm, zfs and btrfs over the years…
I settled on btrfs in the end basically due to the quantity of tools that can read the filesystem.
I use clonezilla and gparted a lot when setting up and maintaining systems and btrfs just has more support, easier to add disk, etc.
It’s also - as others have mentioned - already in the kernel so you can keep your data and change your distro if needed.
I see - and this is a generalisation - most people have ZFS because of TrueNAS, which is fine, but when I built my own (Arch, btw) NAS, it just all came together nicely (giggity) with btrfs
I have no opinion here, and I’m rather on the ‘interested in the replies’ side. But I think what is it about just being with ext4? I have it on most my computers, as I had it many years ago. Only my home computer (Fedora, default install) has btrfs, and ironically it contains none of the data anyone cares about.
I am not really willing to reformat most of my disks, so I wonder what should I expect then? Do I need to do backups meticulously?
I lost some data recently due to a hard drive failing (no backups rip) and previously some files on disk due to corrupt blocks. I didn’t expect the drive to fail soon because it’s new but I learned my lesson.
I want a more fault tolerant system to avoid this again in the future. Of course RAID is not a backup but mostly fault tolerance
I use both in my Proxmox cluster: ZFS on the big storage node, LVM-thin on the smaller ones. ZFS is worth it where you want snapshots, send/receive and checksums, but it wants RAM and you should plan the pool layout up front. On small boxes LVM-thin is simpler and does the job.
I like ZFS but I don’t like striped RAID for most home applications. The problem with striped RAID is that if you lose parity + 1, you lose all the data on all the drives. I use Unraid, which is unstriped RAID. Meaning if I lose parity + 1, I keep all the data on the unaffected drives. It’s also much more flexible, meaning I can mix and match drives of different sizes, and easily expand the array over time as required. If this interests you, SnapRAID is free and does the same thing. In fact, it’s even better, as it offers bitrot detection.
With only two drives you don’t need to worry about RAID yet. Maybe with three+, where one drive becomes your parity drive. So if a drive dies, you can replace it and not lose your data. It’s a terrible time to be leaning into this hobby given the price of HDDs.
if you want to store something for a long time use zfs and 3,2,1
just find a way and you won’t regret it
Thanks to btrfs I learned I had bad RAM that was corrupting files. Nothing was crashing, so I would never have noticed otherwise. 100% would recommend using a file system with checksumming, be it ZFS or btrfs.
it’s not default in mainline linux
This may or may not be a huge con depending on what distro you’re using. I guess a lot of folks like using something like TrueNAS, which I assume takes a lot of the pain of maintaining the ZFS install…
On the other hand, if you want freedom of distro choice… this might be more important to consider… I’m currently blocked on updating my Fedora IoT servers because the ZFS installation (that I had to manually do) some how broke… 😭
btrfs actually being part of Linux seems really nice. I just started with ZFS, so that’s what I know. I actually did look into switching to btrfs last year… but now I don’t remember why I stuck with ZFS… maybe I should check again.
Zfs slaps and it’s so simple it doesn’t really need complex documentation, just get started and don’t fiddle with advanced options until you understand how they work
I think BTRFS is easy enough (included in the kernel, pretty stable) and has most of the practical benefits of ZFS with little overhead. I like the snapshots and FS compression
I love ZFS, and you don’t have to get deep in the technical stuff to enjoy the basic benefits. I’ve used it via TrueNAS, and it’s super easy to get set up.
Worth it 100%. Even for single-drive systems like laptops. It allows for a trivial full system backups while the system is running.
I’d go with zfs. You’ll get copy-on-write snapshots that take a split second to create and do not add any read or write overhead, online filesystem checking, detection of corrupt files down to the filename in the filesystem and all snapshots, lz4 file compression, and more. I even use zfs on single disk usb drives just because the features it offers are so good.






