First Published: Feb 29, 2016
Last Revised: January 10, 2026
ZFS is a next-generation file system renowned for its reliability and advanced features. However, due to legal and licensing issues, it is not included by default in most Linux distributions. Fortunately, you can still install (ZFS on Linux) with just a few commands.
Since 2013, I’ve deployed ZFS on various Linux (CentOS/RHEL) servers in high-traffic production environments. My experience spans commercial-grade servers (Xeon + ECC RAM), gaming desktops (i7), and entry-level consumer hardware (i3). In this article, I’ll share key lessons and important caveats from my journey with ZFS on Linux.
Warning: ZFS on Linux Is Not Plug-and-Play
ZFS on Linux is powerful, but it comes with a critical caveat: kernel updates can break your ZFS installation. Unless you never update or reboot your system (which is unrealistic), be prepared to spend significant time troubleshooting after updates. For a more robust and hassle-free experience, consider using BSD or Solaris, where ZFS is natively supported.
If you run into issues after a kernel update, see my ZFS on Linux recovery guide.
TL;DR: My Advice
If you’re short on time, here’s the bottom line: Use FreeBSD (or another BSD variant) for ZFS whenever possible. Running ZFS on Linux is like putting a giraffe in Alaska—it’s possible, but not without challenges. However, if you must use Linux, here are my recommendations:
- Use commercial-grade hardware whenever possible. Even a basic Dell PowerEdge server is sufficient for light ZFS workloads. Avoid consumer-grade machines unless they have high-end (gaming) components designed for heavy loads. As of January 2026, one of my ZFS servers built with gaming components in 2009 is still running strong.
- Check your CPU compatibility if using RHEL. Ensure your CPU supports x86_64_v3 or higher. If it’s v2 or below, stick with RHEL 9. AlmaLinux 10 offers an x86_64_v2 version, but its ZFS on Linux packages require x86_64_v3.
- Always use persistent disk identifiers, e.g., /dev/disk/by-id/ata-XXX_YYY_ZZZ instead of generic device names like /dev/sda when setitng up ZFS pools.
- Expect minor storage overhead (less than 1%) compared to FreeBSD. This is usually negligible.
- Exclude the kernel from automatic updates if you have ZFS installed. Kernel updates can prevent ZFS from loading after reboot, requiring manual intervention.
- Some distributions (e.g., RHEL 7) may not auto-load ZFS at boot. Use a cron job to import pools and restart dependent services (e.g., MariaDB, NFS, Apache) as needed.
- Bookmark this this ZFS emergency recovery guide. You never know when you’ll need it.
Do not update the kernel automatically
I’ve written a detailed guide on rescuing your ZFS filesystem after a kernel update.
ZFS is not native to Linux. The ZFS on Linux project works by injecting kernel modules (zfs-kmod) at boot. This approach avoids the performance penalties of FUSE-based solutions, but introduces a risk: if the kernel and ZFS modules are out of sync, ZFS will not load. Never run your root (/) filesystem on ZFS in Linux. If ZFS fails to load, your system will be unbootable.
Here’s what happens after a system update:
Best practice:
If you must update the kernel, update it first, reboot (ZFS will be missing), then reinstall or update the ZFS modules for the new kernel. This process is tedious and error-prone, so avoid it unless absolutely necessary.
Alternatively, disable automatic kernel updates. Only update when both the kernel and zfs-kmod are available for your system. Be aware that some packages may require a newer kernel, in which case you can use
dnf update --skip-broken
to bypass them. To exclude the kernel from updates, add the following to:
#/etc/yum.conf exclude=kernel*
If you find ZFS missing after a kernel update, you may need to manually remove and reinstall the ZFS module. Proceed with caution and ensure you understand each command.
Before running the following commands, make sure that you know what you are doing.
#Make sure that you reboot to the kernel you want to fix. #Find out what is the current kernel uname -a Linux 5.14.0-611.16.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Dec 22 03:40:39 EST 2025 x86_64 x86_64 x86_64 GNU/Linux #In my example, it is: 5.14.0-611.16.1.el9_7.x86_64 #Now, let's get into the fun part. We will remove them and reinstall them. #Don't forget to match your version. sudo dkms remove zfs/2.2.9 --all sudo dkms --force install zfs/2.2.9
And we will verify the result.
#sudo dkms status zfs/2.2.9, 5.14.0-611.16.1.el9_7.x86_64, x86_64: installed
The Kernel Version Matters
Always keep a copy of your previous kernel before upgrading. Test ZFS compatibility before making the switch. I’ve encountered issues with certain kernel versions (e.g., CentOS 6.7’s 2.6.32-573.7.1.el6.x86_64) and had to revert to an earlier version.
Use Persistent Disk Identifiers
Always configure ZFS pools using unique, persistent disk identifiers (e.g., /dev/disk/by-id/ata-ST14000DM000-1FK123_4567890). Avoid generic device names like /dev/sda, as these can change after a reboot, especially on consumer-grade hardware.
For example, RHEL may assign device names based on the order drives are detected, which can change if you add or remove USB devices. This can break your ZFS pool configuration.
Here is an example:
zpool create -f mypool raidz /dev/disk/by-id/ata-ST14000DM000-1FKAAA_4567890 \
/dev/disk/by-id/ata-ST14000DM000-1FKBBB_4567890 \
/dev/disk/by-id/ata-ST14000DM000-1FKCCC_4567890 \
/dev/disk/by-id/ata-ST14000DM000-1FKDDD_4567890
This issue is less common on FreeBSD, which handles device mapping more gracefully.
Stability Concerns
ZFS on Linux can become unstable or unavailable under heavy I/O, particularly on older kernels and consumer-grade hardware. For example:
pool: storage
state: DEGRADED
scan: none requested
status: One or more devices could not be opened. Sufficient replicas exist for
the pool to continue functioning in a degraded state.
config:
NAME STATE READ WRITE CKSUM
storage DEGRADED 0 0 0
raidz1-0 DEGRADED 0 0 0
wwn-0x5000c500206e46d4 ONLINE 0 0 0
wwn-0x5000c500205eba0d ONLINE 0 0 0
wwn-0x50014ee25a9074e2 ONLINE 0 0 0
wwn-0x50024e9001c19fb2 UNAVAIL 0 0 0
Upgrading to a newer kernel often resolves these issues—no hardware changes required. I have not encountered such problems on FreeBSD since version 9, suggesting better support for ZFS and low-end hardware.
Loading ZFS at Boot
Some distributions (e.g., CentOS 7) may not automatically import ZFS pools at boot. You can use a cron job to import pools and restart dependent services:
# Edit /etc/crontab #Import all ZFS pools at boot @reboot root sleep 20; zpool import -a; #Import pools, then restart Apache, MariaDB, and NFS @reboot root sleep 20; zpool import -a; sleep 15; systemctl restart httpd.service; systemctl restart mariadb.service; systemctl restart nfs-server;
Good luck!
–Derrick
Our sponsors:
