I use and highly recommend truenas. It uses zfs by default and has a nice web ui, so you don't have to worry about setting up zfs. It has docker built in and can also do virtual machines and containers.
post
Self healing for bit-rot in files. So if your data is critical it is worth it.
it does report bitrot, but for self healing it needs duplication set up right?
I chose btrfs over zfs, because you can add and remove disks from a volume (I'm not sure if zfs has this feature now) I use this to move the volume from old to new disks.
It's my personal opinion but: no
Btrfs is integrated in the kernel already and pretty solid. I have been running it for the last few years. I use Linux mdarray to create a raid5 and on top of it, format btrfs.
Never had issues, and yes it did catch data corruption (and fixed it) so I am pretty happy .
Zfs on the other hand, needs specific kernel patches and I don't like that too much.
fully agree.
i used zfs on arch many yeara ago and my updates would fall months behind.
then i switched to freebsd for better zfs support. but lost support of some linux apps
later i started using truenas and it works great.
on a related note, i switched to cachyos on my desktop and laptop and used btrfs for the first time and i absolutely love it.
so if youre building a nas from scratch, id say use btrfs, but if youre using an os that manages that stuff for you, zfs is a great choice.
If you only require mirrors (RAID 1) then BTRFS works fine, but if you need something more and the system has good support for it (e.g. Ubuntu) then ZFS is better IMO. Yes you can use mdraid with BTRFS, but I prefer 1 ZFS over 10 different moving parts.
I use both, choosing which one depending on the conditions.
ZFS has been running with upstream kernels for years. Ubuntu ships with precompiled module and Debian has a DKMS package which compiles ZFS against the stock kernel.
ZFS shines with large datastores and multiple drives. It has its uses, for sure.
As others have said, it puts all the layers: RAID blocks, file system, volume management, etc, all under a single umbrella. Because of this it can do some things that are more challenging with other approaches.
For your two drives, I wouldn't bother with anything other than what they are, and make sure you have proper backups.
Drives die all the time. Just today one of my RAID boxes complained about a drive, in the process of replacing the drive I discovered 2 other bad drives that I had sitting around as spares.
Last week an external drive decided to die. Fortunately I was using it as one of three replicants of my primary system, so no big deal.
That is a good point. A backup is probably higher priority over choosing a filesystem assuming you already have something functional and no backup.
Worth it 100%. Even for single-drive systems like laptops. It allows for a trivial full system backups while the system is running.
Personally, I use ZFS heavily, and I'd highly recommend it ... but for such a simple system with only two drives and you just want redundancy, ZFS is kind of overkill. The only benefit you might get is the 'copy on write' feature, which gives you the ability to mount older snapshots of the drive and potentially recover data that has been deleted or overwritten. (Without unmounting the current version of the partition, you can mount an older version that still has the files that are gone. However, the deleted/overwritten files don't stay around forever, especially if the drive is nearly full or gets written to often. It's kind of like a fancy 'recycle bin', but it's smarter about what files to keep shadow copies of -- for example, files that existed for longer are more likely to be retained than files that only existed for a brief time.)
Where ZFS really shines is in more complex setups where you want to take advantage of the performance gains. It can do some pretty cool stuff because unlike most other systems, it's aware of both the layout of the data on the physical drives and the files and filesystem. In most other systems, those two things are handled by different subsystems that aren't really aware of one another and can't optimize things as nicely. For example, in a normal RAID system, the data blocks that are mirrored/striped across multiple drives are always the same size. But ZFS can mirror/stripe data blocks of varying sizes, allowing it to better optimize for a mix of small and large files. You can also do cool stuff like designating particular partitions/drives as file directories or caches to further optimize performance. (Great use for that old fast but small SSD you have lying around.)
I got into ZFS with very little experience, and it was actually pretty straightforward to set up. If you want to use it just to learn it, I'd recommend that. But for the very simple setup you want, there are probably simpler solutions if you want something that just works out of the box without needing to configure things in the command line.
Both ZFS and BTRFS require having at least 2 copies for healing, however, unlike a standard RAID1 that is oblivious to which of the 2 copies is healthy, the 2 filesystems use CRC checksums to figure out which is corrupt and recover the good one. As long as you have at least 2 copies, they will check the checksum on every read and heal it if corruption is detected. Besides that, you'd schedule a periodic scrub to also check the data that hasn't been read in a while.
In ZFS you can tell it to keep 2 copies of everything even if you only have 1 drive, which would give you the healing effect, but this obviously halves the drive capacity, and does not save you if that 1 drive dies, hence spreading it on multiple drives is better.
Personally, I find ZFS easier to use than BTRFS, it's not that complicated once you get the hang of it, plus LLMs can help anyway. It does have many dials that can be tuned, but unless you are trying to optimize it for a specific usecase, the generally recommend setting are fine for most use cases.
It's not built into the kernel, but server distros (e.g. Ubuntu) build it as a loadable module, which is kept in step with the kernel, so generally no issues there. On distros like Arch it can be really annoying though.
"Slightly lower" is a bit of an understatement, both for ZFS and BTRFS. Those are CoW (Copy on Write) filesystems, so they are much slower to write, which is a traid off for the benefits of CoW. On the other hand, reads are only slightly slower (since CRC is always checked), and thanks to transparent compression, they can be even faster to read.
One downside of ZFS over BTRFS is fragmentation, all CoW filesystems suffer from it, but BTRFS allows you to defragment in place (takes a while though) unlike ZFS.
If you can't afford storage, the data you want to store is generally compressible, and speed is not critical/priority, it might be woth using ZFS/BTRFS just for the transparent compression to save on space and get more out of the drives you have. I'm using BTRFS on a Fedora system for this reason alone, helps me avoid buying a new SSD 😬
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
It’s not that hard to learn. It’s a few commands to set up a pool, vdev and a dataset. The defaults are fine, though you might want to enable compression, set a large block size and optionally enable encryption via parameters.
Contrary to popular myths it’s not ram heavy either, at least with default parameters. This might come from the ram heavy (optional) deduplication or the fact that it likes to use unused available ram for caching (as it should).
With your two disks though you could either mirror them or stripe them. Both are not ideal, it really shines when you have enough disks to use the parity, ie in Z1 you can lose one of your disks without losing data, z2 you can lose two disks. I run it as Z2 with six disks, so any two can fail without losing data and I get the capacity of four disks.
The main advantage of zfs over other file systems is that it will checksum absolutely everything, including your data, and restore it, if possible (at least a mirror or Zx; a simple stripe can not recover anything of course).
I absolutely recommend ZFS. I've been burned by MD (the other software RAID) because it doesn't scan the array for bad data, so bit rot and silent errors can go undetected until a process wants to read it. ZFS periodically scans the array and fixes corrupted data if possible.
ZFS can use more CPU resources compared to MD, but the difference in performance is insignificant compared to the read bandwidth of mechanical hard drives. Memory usage is comparatively high because it uses the RAM as cache, but you can set a limit. My current 8TB RAIDZ1 array uses only 8GB of RAM and it could still be lower.
I recommend using some dedicated OS to manage ZFS pools, like TrueNAS Scale or Proxmox.
https://pve.proxmox.com/wiki/ZFS_on_Linux
it’s not default in mainline linux
It's purely an issue of licenses. ZFS is a mature solution, and being out-of-tree does not reflect a qualitative issue. It's available as a separate package on most distributions.
You cannot compare zfs to md, they are different like apples and oranges.
MD it's a raid device, not a filesystem.
You should compare btrfs to zfs, they pretty much share the same capabilities and features.
I use MD as my raid array, and btrfs on top of MD.
Of course if you use ext4 on top of MD you get nothing of the good stuff, except a very solid array management due to md.
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.
Short answer: not for this machine. Your reading is right: on a single drive ZFS only detects corruption. It repairs a file only when a second copy exists, and with two drives that means a mirror. So the real question is what the second drive should do. I would give it a backup job rather than a mirror. A mirror survives one drive dying, but it also copies every deletion and every mistake to both drives at the same moment. A second drive holding a nightly copy (rsync, or restic if you want older versions) covers both cases, and then plain ext4 or XFS on the first drive is plenty. If you can, keep the backup drive in another room. ZFS or btrfs earns its place later, when you have more drives and want checksums and snapshots, and nothing you set up now stops you moving to it. Once the nightly copy runs, test it by restoring one file from the backup drive onto the first.@FukOui @selfhosted
Snapshotting, which ZFS has, prevents any data loss from accidental deletion or mistakes.
Snapshots also occupy no space until you delete files
Compression!
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.
I never had problems with zfs either on Solaris or BSD derivates nor Linux. It just works.
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.
I'm happy with ZFS, on Debian it's not that complicated to set up I'd say. Just make sure your consumer drives are not DM-SMR drives, otherwise the performance is bad, especially when "scrubbing" (data integrity verification) or "resilvering" (updating a disconnected, or replacing a failed drive).
See here for more info.
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 requires also quite a bit of RAM, so if you're tight on it then just go with traditional filesystem. But if you've got the hardware to support it, it can absolutely be worth it. But, like any RAID or other similar solutions, it's not a backup and all hardware will fail, so plan accordingly.
My nas is an SBC with 4GB ram and a 2 disk mirror. There is no appreciable performance difference between this and my recent retired 128GB ram nas.
ZFS will use as much memory as you want it to, but it doesn't need it if you consider your setup.
Try btrfs if ram footprint of zfs scares you. Pretty solid , all the same features (at least the ones I need) and no licensing issues and already baked in Linux kernel.
It does not require much RAM. It uses whatever you give it. It uses the RAM for read speedup. By default it takes half of the system RAM but you can give it basically nothing and it'll work fine. I've used it on Raspverry Pi 3 for years without fault.
The "ZFS requires a lot of RAM" meme comes from back in the day when people were obsessed with the de-duplication feature (which yes, does require a lot of RAM) as the big cool feature to use ZFS for. Nobody uses the de-duplication feature.
Depends on your requirement and hardware really. If you don't have the RAM for zfs, but a proper RAID controller, just go for raid 6. (The ones crying about raid and dataloss never use a proper RAID controller). If you do not have one, then zfs is a pretty decent choice, but it benefits greatly from having loads of RAM (not required, just very beneficial). If you need something ridiculously large, beegfs is your friend.
For me, personally, I use zfs to serve a volume of 24 physical drives at home. I find that zfs sits in the middle where it's flexible enough to serve a lot of those intermediate situations where mdraid isn't enough, you don't have a (proper) raid controller, and it's not enough disks/machines to justify beegfs.
With 2 drives I'd just go mdraid.
If you don't have ram for zfs, go with btrfs, it's pretty much lightweight in my experience. But never tried zfs so cannot compare
Also btrfs has zero licensing issues and it's standard in the Linux kernel without the need for additional patches like zfs.
I'm the inverse, I've never use birds btrfs, lol. I've got all my use cases covered already, so I don't foresee a need for it.
Edit: ducking autocorrect
Personally, I don't use it, but only because I've never needed to. That and its legendary need of ram to be performant. But it has some nice features and if those sound good to you, go for it.
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
Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I've seen in this thread:
| Fewer Letters | More Letters |
|---|---|
| IoT | Internet of Things for device controllers |
| RAID | Redundant Array of Independent Disks for mass storage |
| SBC | Single-Board Computer |
| SSD | Solid State Drive mass storage |
| ZFS | Solaris/Linux filesystem focusing on data integrity |
5 acronyms in this thread; the most compressed thread commented on today has 9 acronyms.
[Thread #175 for this comm, first seen 21st Nov 2026, 22:30] [FAQ] [Full list] [Contact] [Source code]
all 47 comments