Running ZFS on Linux: Things you should know and be aware of

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:

Kernel Updated
Kernel Not Updated

zfs-kmod Updated
Yes. Your ZFS will be available after the reboot.
Yes. Your ZFS will be available after the reboot.

zfs-kmod Not Updated
No. Your ZFS will not be available after the reboot.
Yes. Your ZFS will be available after the reboot

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:

FreeBSD or Linux in 6 Simple Questions

FreeBSD or Linux

FreeBSD or Linux (Ubuntu/RHEL)? This is a very old question. It’s like asking iPhone or Android. There is no short answer. It all depends on your situation. To make things easier, I am going to break it down into six simple questions to help you making decision.

My Background
I have been a FreeBSD user since 2003. My usage on FreeBSD mainly on service-oriented stuffs such as web farm, database clusters and file system etc. In short, I mainly use my FreeBSD system via command line. In 2009, I jumped into Linux world (Ubuntu/RHEL) because of my job. As an advanced user on both Operating Systems (FreeBSD and Ubuntu/RHEL Linux), here is my guide on these two systems.

There is only one FreeBSD, but there are many different variants of Linux. The Linux I mention below refers to two popular distributions: RHEL and Ubuntu.

FreeBSD vs Linux: Q.1 How do you describe yourself?

I am a very demanding person. I like to control everything I manage. –> FreeBSD
I don’t care about how a system is run. I am okay as long as it just works. –> Linux / Ubuntu / RHEL

Comment:
FreeBSD gives you freedom to control every single thing. One of its coolest feature is the port tree. You can build every application from source using port tree. In Linux world, you usually install applications from pre-built/pre-compiled package (yum, apt-get etc), which may not be exactly what you need.

Example:
In RHEL and Ubuntu, HTTP load balancer module does not come with Apache by default. You will need to compile Apache from source. What about in FreeBSD? All you need is to check a box (pretty much like shopping cart) and you are done.

FreeBSD vs Linux: Q.2 Do you prefer Ferrari or Hyundai?

Ferrari / BMW / SLR Camera –> FreeBSD
Toyota / Hyundai / Point and Shoot Camera / Phone Camera –> Linux / Ubuntu / RHEL

Comment:
The technology uses by FreeBSD such as kernel, file system, architecture etc are way better and more advanced than Linux. It’s like comparing Ferrari and Hyundai (And no, I am not kidding).

Example 1:
I need to run some extreme applications (e.g., DNA Sequence Alignment) which use all available threads and memory. The default settings of memory management in Linux is very poor. Every time I run my application, the system becomes not usable to other users. However, FreeBSD does not have this server problem. In fact, FreeBSD is smart enough not to cause the system to freeze. Of course you can tweak the memory management settings in Linux, or even run the command along with the nice command. However, these settings are just not available out of the box, and most of the time, you learn these tricks after your system has problem.

Example 2:
I installed FreeBSD 11 and RHEL 7 on two identical computers respectively. Both use default settings and enable similar services, such as enabling the SSH server and disable booting to X-Windows (RHEL). I used these two machines for exact the same purposes: SSH tunneling, with exact the same work load (evenly distributed). After using them for a month, I checked the memory usage. With FreeBSD, the available memory is about 800MB (out of 1GB), while there are only 200MB left (out of 1GB) on RHEL. Yes, Linux (at least with RHEL 7) consumes lots of memory.

Example 3:
FreeBSD comes with ZFS (The next generation file system) by default. Although it has been ported to Linux world, it is definitely unstable. We’ve tried to use it in a production environment. One thing that we’ve learned is that the ZFS may stop working after upgrading to a newer Linux kernel. I’ve received countless of email alert about missing the files (ZFS is not working, of course the files are gone) in the middle of the night. I ended up disable the auto update and disable the reboot after the update. Sounds familiar? That’s a feature in Windows, and for some odd reasons, this feature is available in Linux, a server.

Example 4:
LVM+RAID is an the most advanced storage method in Linux world. Unfortunately it does not do what it promises, i.e., you may lose your data if a hard drive is failure, even if you follow its directions to detach your failed hard drive correctly. Not to mention that the data will get corrupted if the power is down (which has been taken care of in ZFS, available in FreeBSD).

That’s why I prefer ZFS over LVM+RAID here: Building a Super Large and Reliable File Server with Mixed Size of Harddisks. It solves my problem (yes, even the power is failed during writing to the disk, my data is still safe!)

FreeBSD vs Linux: Q.3 Do you have lots of free time?

Yes: FreeBSD
No: Linux / Ubuntu / RHEL

Comment:
Making a production-ready system using FreeBSD can take you days to weeks if you are not an experienced FreeBSD user, while everything works out of the box in Linux. Sometimes, the new upgrade from the port tree can drive you nut, such as package conflicts etc. However, working with Linux is a leisure thing.

Example:
Installing Apache + MySQL + PHP from FreeBSD port (compiling the source) can take at least half day on a computer with a dual core CPU (AMD Athlon 64 X2 Dual Core Processor 4600+), while it takes less than 30 minutes on Linux. That’s because you need to compile the code from source in FreeBSD, while you simply download the packages and extract them in Linux. The time difference is huge.

FreeBSD vs Linux: Q.4 Do you prefer simplicity or complexity?

Adding sugar into water –> FreeBSD
Taking sugar away from soda–> Linux / Ubuntu / RHEL

Comment:
FreeBSD is a very very simple system. Think of it as a bare-bone system that comes with no junk. By default, it comes with no graphic user interface, no unnecessary application. It likes a pure distilled water.

In Ubuntu / RHEL, everything is configured and ready to use. It comes with very attractive, beautiful graphical user interface. Everything just works out of the box, no tuning or tweaking is required. However, it also comes with lots of junk such as Ubuntu One (For Ubuntu Cloud service), SELinux (A program developed by Red Hat where many people don’t use it), etc. It makes your system very bulky and increase the computation resource consumption.

FreeBSD vs Linux: Q.5 Are you going to use the computer as desktop?

Yes: Linux / Ubuntu / RHEL
No: FreeBSD

Comment:
Setting up a desktop-ready system on FreeBSD can take a long time. Main reason is the drivers availability. A lot of hardware such as graphic cards, audio cards or webcams are not supported in FreeBSD natively. If you want to get them working as good as on Windows / Ubuntu, you will need to get the driver first (if available), build it (which may gives error during compiling the codes), and recompile the kernel to make it supports the new driver, which can take few days if you are not experienced with FreeBSD and debugging driver.

On the other side, the Linux driver community is very strong and well developed. Usually they develop drivers for most popular hardware.

Example:

#1: My Logitech Orbit MP webcam (Pan / Tilt / Zoom) is not working on FreeBSD but works like a charm on Linux.

#2: Some vendors such as Highpoint may stop developing drivers for their products for newest version of FreeBSD.

FreeBSD vs Linux: Q.6 Do you need to blame someone when something goes wrong?

Yes: Linux / Ubuntu / RHEL
No: FreeBSD

Comment:

When something goes wrong, you can blame Linux and you can’t blame FreeBSD.

FreeBSD is a community driven operating system, while some Linux distributions such as Ubuntu and RHEL are backed by commercial vendors. In the world of FreeBSD, it is not uncommon that some unskilled developers introduce bugs, troubles to the rest of the world. Yes, we know it is free, so we can’t complaint about it. However, as an IT administrator, you will need to use your judgement to judge whether those new stuffs are safe to use or not. In short, that will increase your workload. It’s more like Windows update. How many people actually read the change log before hitting the update button?

In Linux (e.g., RHEL), that’s a whole different story. Every patches, new updates have been screened by the vendor before hitting to public. So you can trust them in some degree. And the key thing is, you can blame them when something goes wrong.

Conclusion

In short, use FreeBSD for your personal purpose while Linux for your work. Be the top 5%, not the bottom 95%.

Our sponsors: