A bit of history

It all started with Solaris and the new “revolutionary” ZFS file system in it. After a while, Solaris died, and ZFS was migrated to BSD and Linux. ZFS fans believe that BSD has a more correct version than Linux.

Linux has a belief that ZFS uses a huge amount of memory, but this is not the case: due to the curve of integration into the kernel, the ZFS process is visible separately from the cache of the kernel file system, although it is also a cache. It is known that the cache of the file system takes all the free memory, but also gives it away if necessary. In general, you just don’t need to pay attention to it. Actually, memory is used when deduplication is enabled, but it already needs to be decided - memory or this feature.

BTRFS appeared as a reworking of ext4 (the main Linux file system) to add features similar to ZFS. BTRFS has been in development for a long time, but now they say it is stable.

RedHat has been developing XFS and promoting LVM for a long time. They refused to include ZFS in the distribution due to the license (at the same time, Ubuntu was included, and Debian was included, but with the build on the user’s computer). ZFS has an open license, but there are questions whether it is compatible with the kernel license or not. And BTRFS was included as an experiment in CentOS 7 and sawed off its support in CentOS 8. At the same time, they said: yes, we already have almost everything for these amazing new functions, we only need to write a couple of “scripts”. This is how Stratis appeared - a kind of wrapper over device-mapper, LUKS, XFS and Clevis, which should close ZFS and BTRFS by function.

Which distributors use what?

NAS:

Distributors:

  • RHEL/CentOS/Rocky only support Stratis, but there are additional repositories: how to install ZFS and [how to install BTRFS](https://gist .github.com/orimanabu/8b36119af1a40f03f408f1fc759daf3a ) (or so).
  • Fedora supports BTRFS and Stratis.
  • Ubuntu supports everything (ZFS in packages by default, and utilities in universe – Canonical is not supported).
  • Debian supports everything, but ZFS is shipped as if in source code to avoid potential legal problems.

As a result, Linux-native NAS all use BTRFS. RH is doing something weird again, it doesn’t matter to the rest of the distributors, but they don’t support ZFS commercially.

What are the awesome features?

  • checksums of files and work on checking these checksums from time to time – rechecks that files can still be read (and automatically corrects if raid functionality is enabled)
  • snapshots – they are convenient to backup and you can roll back to them (as an easy backup option)
  • transparent hardware management: adding disks, mirroring (and other raid options)
  • “light” nested “file systems”: allows you to change settings and take snapshots of actually individual folders, and not as originally defined for the entire file system during system installation
  • transparent compression
  • transparent encryption
  • data deduplication (saving space if the files are the same or parts of them)
  • and all this from one console utility (for each FS, of course, it has its own and slightly different)
  • did you forget something else?

What should I choose?

It makes sense to choose Stratis only if there is a paid subscription with it, and BTRFS and ZFS are not in the subscription. It’s too painful for vendor lock and unpopular (which means problems are more likely).

The root file system (where the operating system is installed) I would leave it by default, there is not much point in changing it.

For NAS – BTRFS, the consensus is visible here. And working with a lot of discs and snapshots is important here.

At the same time, I still like ZFS for 3 reasons:

  • it has really been developed for a long time and there were no special problems even on Linux
  • there is no hard disk verification utility in it (unlike other systems), i.e. if it is recorded, then it is consistent (it will not spoil when recording)
  • on the project’s website it is centrally written how to put it under almost any OS

As a result, it is now more of a priority for BTRFS, but it is minimal.

I have the RH family on my servers, so for data - XFS, because all these new features are good, but they are not usually fundamental, and I do not want to put BTRFS/ZFS outside the distribution.

Naturally, this is all in the context of home use. Organizations have specially trained people who understand the specifics and make decisions.