{"id":3914,"date":"2016-02-29T00:55:36","date_gmt":"2016-02-29T06:55:36","guid":{"rendered":"https:\/\/icesquare.com\/wordpress\/?p=3914"},"modified":"2026-01-10T01:09:12","modified_gmt":"2026-01-10T07:09:12","slug":"zfs-linux-vs-freebsd","status":"publish","type":"post","link":"https:\/\/icesquare.com\/wordpress\/zfs-linux-vs-freebsd\/","title":{"rendered":"Running ZFS on Linux: Things you should know and be aware of"},"content":{"rendered":"<style>\nh3{\n   margin:15px 0px 15px 0px;\n}\n.simpleFrame{\n   border:2px solid #666;\n   color:#333;\n   box-shadow: 0 3px 3px rgba(34, 25, 25, 0.4);\n}\n.tableContainer{\n    display:table;\n    width:90%;\n    border-collapse: collapse;\n}\n.tableHeading{\n    font-weight: bold;\n     display:table-row;\n     text-align: center;\n     line-height: 25px;\n     font-size: 14px;\n     font-family:georgia;\n}\n.tableRow{  \n     display:table-row;\n     text-align: center;\n}\n.tableCol{\n    display:table-cell;\n    border: 1px solid #CCC;\n     padding:5px;\n}\n.seperator{\n   border-bottom: 1px dotted #999; \n   margin:20px 0px 20px 0px;\n}\n<\/style>\n<p>First Published: Feb 29, 2016<\/p>\n<p>Last Revised: January 10, 2026<\/p>\n<p>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 (<a href='http:\/\/zfsonlinux.org\/' target='_blank' rel=\"noopener noreferrer\">ZFS on Linux<\/a>) with just a few commands. <\/p>\n<p>Since 2013, I\u2019ve 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\u2019ll share key lessons and important caveats from my journey with ZFS on Linux.\n<\/p>\n<h2>Warning: ZFS on Linux Is Not Plug-and-Play<\/h2>\n<p>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.<\/p>\n<p>If you run into issues after a kernel update, see my <a href='\/wordpress\/how-to-fix-the-mess-created-by-zfs-on-linux-after-update\/' target='_blank'> ZFS on Linux recovery guide<\/a>.\n<\/p>\n<h3>TL;DR: My Advice<\/h3>\n<p>If you\u2019re short on time, here\u2019s the bottom line: Use FreeBSD (or another BSD variant) for ZFS whenever possible. Running ZFS on Linux is like putting a giraffe in Alaska\u2014it\u2019s possible, but not without challenges. However, if you must use Linux, here are my recommendations:<\/p>\n<ul>\n<li><strong>Use commercial-grade hardware<\/strong> 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.\n<\/li>\n<li><strong>Check your CPU compatibility<\/strong> if using RHEL. Ensure your CPU supports x86_64_v3 or higher. If it\u2019s 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.<\/li>\n<li><strong>Always use persistent disk identifiers<\/strong>, e.g., \/dev\/disk\/by-id\/ata-XXX_YYY_ZZZ instead of generic device names like \/dev\/sda when setitng up ZFS pools.<\/li>\n<li><strong>Expect minor storage overhead <\/strong> (less than 1%) compared to FreeBSD. This is usually negligible.<\/li>\n<li><strong>Exclude the kernel from automatic updates<\/strong>  if you have ZFS installed. Kernel updates can prevent ZFS from loading after reboot, requiring manual intervention.<\/li>\n<li><strong>Some distributions (e.g., RHEL 7) may not auto-load ZFS at boot. <\/strong> Use a cron job to import pools and restart dependent services (e.g., MariaDB, NFS, Apache) as needed.<\/li>\n<li><strong>Bookmark this <a href='\/wordpress\/how-to-fix-the-mess-created-by-zfs-on-linux-after-update\/' target='_blank'>this ZFS emergency recovery guide<\/a>. You never know when you\u2019ll need it.<\/strong><\/li>\n<\/ul>\n<div class='seperator'><\/div>\n<h3>Do not update the kernel automatically<\/h3>\n<p>I&#8217;ve written a detailed <a href='\/wordpress\/how-to-fix-the-mess-created-by-zfs-on-linux-after-update\/'>guide<\/a> on rescuing your ZFS filesystem after a kernel update.<\/p>\n<p>\nZFS 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: <strong>if the kernel and ZFS modules are out of sync, ZFS will not load. Never run your root (\/) filesystem on ZFS in Linux.<\/strong> If ZFS fails to load, your system will be unbootable.<br \/>\nHere\u2019s what happens after a system update:<\/p>\n<div class=\"tableContainer\">\n<div class=\"tableHeading\">\n<div class=\"tableCol\"> <\/div>\n<div class=\"tableCol\">Kernel Updated<\/div>\n<div class=\"tableCol\">Kernel Not Updated<\/div>\n<\/p><\/div>\n<div class=\"tableRow\">\n<div class=\"tableCol\">zfs-kmod Updated<\/div>\n<div class=\"tableCol\">Yes. Your ZFS will be available after the reboot.<\/div>\n<div class=\"tableCol\">Yes. Your ZFS will be available after the reboot.<\/div>\n<\/p><\/div>\n<div class=\"tableRow\">\n<div class=\"tableCol\">zfs-kmod Not Updated<\/div>\n<div class=\"tableCol\">No. Your ZFS will not be available after the reboot.<\/div>\n<div class=\"tableCol\">Yes. Your ZFS will be available after the reboot<\/div>\n<\/p><\/div>\n<\/div>\n<p><strong>Best practice:<\/strong><\/p>\n<p>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.<br \/>\nAlternatively, 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 <\/p>\n<pre>\r\ndnf update --skip-broken\r\n<\/pre>\n<p>to bypass them.  To exclude the kernel from updates, add the following to:<\/p>\n<pre>\r\n#\/etc\/yum.conf \r\n\r\nexclude=kernel*\r\n<\/pre>\n<p>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. <\/p>\n<p>Before running the following commands, make sure that you know what you are doing.<\/p>\n<pre>\r\n\r\n#Make sure that you reboot to the kernel you want to fix.\r\n#Find out what is the current kernel\r\nuname -a\r\nLinux 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\r\n\r\n#In my example, it is:\r\n5.14.0-611.16.1.el9_7.x86_64\r\n\r\n#Now, let's get into the fun part. We will remove them and reinstall them.\r\n#Don't forget to match your version.\r\nsudo dkms remove zfs\/2.2.9 --all\r\nsudo dkms --force install zfs\/2.2.9\r\n<\/pre>\n<p>And we will verify the result.<\/p>\n<pre>\r\n#sudo dkms status\r\nzfs\/2.2.9, 5.14.0-611.16.1.el9_7.x86_64, x86_64: installed\r\n<\/pre>\n<div class='seperator'><\/div>\n<h3>The Kernel Version Matters<\/h3>\n<p>\nAlways keep a copy of your previous kernel before upgrading. Test ZFS compatibility before making the switch. I\u2019ve encountered issues with certain kernel versions (e.g., CentOS 6.7\u2019s 2.6.32-573.7.1.el6.x86_64) and had to revert to an earlier version.<\/p>\n<div class='seperator'><\/div>\n<h3>Use Persistent Disk Identifiers<\/h3>\n<p>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. <\/p>\n<p>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.<\/p>\n<p>Here is an example:<\/p>\n<pre>\r\nzpool create -f mypool raidz \/dev\/disk\/by-id\/ata-ST14000DM000-1FKAAA_4567890 \\\r\n                              \/dev\/disk\/by-id\/ata-ST14000DM000-1FKBBB_4567890 \\\r\n                              \/dev\/disk\/by-id\/ata-ST14000DM000-1FKCCC_4567890 \\\r\n                              \/dev\/disk\/by-id\/ata-ST14000DM000-1FKDDD_4567890\r\n<\/pre>\n<p>This issue is less common on FreeBSD, which handles device mapping more gracefully.<\/p>\n<div class='seperator'><\/div>\n<h3>Stability Concerns<\/h3>\n<p>ZFS on Linux can become unstable or unavailable under heavy I\/O, particularly on older kernels and consumer-grade hardware. For example:<\/p>\n<pre>\r\n  pool: storage\r\n state: DEGRADED\r\n  scan: none requested\r\nstatus: One or more devices could not be opened.  Sufficient replicas exist for\r\n        the pool to continue functioning in a degraded state.\r\nconfig:\r\n\r\n        NAME                        STATE     READ WRITE CKSUM\r\n        storage                     DEGRADED     0     0     0\r\n          raidz1-0                  DEGRADED     0     0     0\r\n            wwn-0x5000c500206e46d4  ONLINE       0     0     0\r\n            wwn-0x5000c500205eba0d  ONLINE       0     0     0\r\n            wwn-0x50014ee25a9074e2  ONLINE       0     0     0\r\n            wwn-0x50024e9001c19fb2  UNAVAIL      0     0     0\r\n<\/pre>\n<p>Upgrading to a newer kernel often resolves these issues\u2014no hardware changes required. I have not encountered such problems on FreeBSD since version 9, suggesting better support for ZFS and low-end hardware.<\/p>\n<div class='seperator'><\/div>\n<h3>Loading ZFS at Boot<\/h3>\n<p>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:<\/p>\n<pre>\r\n# Edit \/etc\/crontab\r\n\r\n#Import all ZFS pools at boot\r\n@reboot         root    sleep 20; zpool import -a;\r\n\r\n#Import pools, then restart Apache, MariaDB, and NFS\r\n@reboot         root    sleep 20; zpool import -a; sleep 15; systemctl restart httpd.service; systemctl restart mariadb.service; systemctl restart nfs-server;\r\n<\/pre>\n<div class='seperator'><\/div>\n<p>Good luck!<\/p>\n<p>&#8211;Derrick<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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, <a class=\"more-link\" href=\"https:\/\/icesquare.com\/wordpress\/zfs-linux-vs-freebsd\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":true,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[94,146,78,6,109],"tags":[48,177],"class_list":["post-3914","post","type-post","status-publish","format-standard","hentry","category-computer-problems-computer-help-pc-support","category-everyday-computer-problem","category-product-comparison","category-technology","category-zfs","tag-linux","tag-zfs"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-118","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4725,"url":"https:\/\/icesquare.com\/wordpress\/amazon-ec2-vs-google-cloud-platform-storage-speed-comparison\/","url_meta":{"origin":3914,"position":0},"title":"Amazon EC2 VS Google Cloud Platform: Storage Speed Comparison","author":"Derrick","date":"April 1, 2020","format":false,"excerpt":"We've owned multiple cloud instances on both Amazon ECS and Google Cloud Platform. I always wonder what is the difference between them. So I decide to perform a very simple speed comparisons. All storage\/disks are attached on RHEL Linux instance and formatted to XFS. Everything are using the default settings.\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":3743,"url":"https:\/\/icesquare.com\/wordpress\/zfs-performance-mirror-vs-raidz-vs-raidz2-vs-raidz3-vs-striped\/","url_meta":{"origin":3914,"position":1},"title":"ZFS Performance: Mirror VS RAIDZ VS RAIDZ2 vs RAIDZ3 vs Striped","author":"Derrick","date":"September 25, 2014","format":false,"excerpt":"I always wanted to find out the performance difference among different ZFS types, such as mirror, RAIDZ, RAIDZ2, RAIDZ3, Striped, two RAIDZ vdevs vs one RAIDZ2 vdev etc. So I decide to create an experiment to test these ZFS types. Before we talk about the test result, let's go over\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4436,"url":"https:\/\/icesquare.com\/wordpress\/how-to-fix-the-mess-created-by-zfs-on-linux-after-update\/","url_meta":{"origin":3914,"position":2},"title":"&#8220;ZFS on Linux&#8221;: The ZFS modules are not loaded. Try running &#8216;\/sbin\/modprobe zfs&#8217; as root to load them.","author":"Derrick","date":"April 10, 2018","format":false,"excerpt":"Last Updated: Oct 10, 2021 This article is based on my experience with CentOS 7. If you are running other Linux distributions, please adjust the commands and package names accordingly (e.g., yum --> apt-get). As of Oct 3, 2019, I cannot get ZFS on Linux running on CentOS 8. ZFS\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4137,"url":"https:\/\/icesquare.com\/wordpress\/modprobe-error-could-not-insert-zfs-required-key-not-available\/","url_meta":{"origin":3914,"position":3},"title":"modprobe: ERROR: could not insert &#8216;zfs&#8217;: Required key not available","author":"Derrick","date":"June 10, 2016","format":false,"excerpt":"Today I was trying to install ZFS on a CentOS 7 box. Typically rebooting the computer, the ZFS mododule will be turned on. However, it didn't turn on in my case. Failed to load ZFS module stack. Load the module manually by running 'insmod \/zfs.ko' as root. So I tried\u2026","rel":"","context":"In &quot;Computer Problems&quot;","block_context":{"text":"Computer Problems","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/computer-problems-computer-help-pc-support\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/01\/zfs_logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]},{"id":4679,"url":"https:\/\/icesquare.com\/wordpress\/zfs-on-linux-trouble-this-pool-uses-the-following-features-not-supported-by-this-system-all-unsupported-features-are-only-required-for-writing-to-the-pool\/","url_meta":{"origin":3914,"position":4},"title":"[ZFS On Linux Trouble] This pool uses the following feature(s) not supported by this system&#8230;All unsupported features are only required for writing to the pool, zpool create: invalid argument for this pool operation","author":"Derrick","date":"February 11, 2020","format":false,"excerpt":"When I rebooted my computer and loaded my ZFS pool today, I got this error message: #sudo zpool import -a This pool uses the following feature(s) not supported by this system: org.zfsonlinux:project_quota (space\/object accounting based on project ID.) com.delphix:spacemap_v2 (Space maps representing large segments are more efficient.) All unsupported features\u2026","rel":"","context":"In &quot;Technology&quot;","block_context":{"text":"Technology","link":"https:\/\/icesquare.com\/wordpress\/category\/technology\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4286,"url":"https:\/\/icesquare.com\/wordpress\/how-to-install-zfs-on-rhel-centos-7\/","url_meta":{"origin":3914,"position":5},"title":"How to install ZFS on RHEL \/ CentOS 7","author":"Derrick","date":"January 4, 2017","format":false,"excerpt":"A friend of mine likes to try ZFS on CentOS 7, therefore I decide to make a guide for him. The following instructions have been well tested on CentOS 7. Before you decide to put ZFS in a production use, you should be aware of the following: ZFS is originally\u2026","rel":"","context":"In &quot;Everyday Computer Problem&quot;","block_context":{"text":"Everyday Computer Problem","link":"https:\/\/icesquare.com\/wordpress\/category\/everyday-computer-problem\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/icesquare.com\/wordpress\/wp-content\/uploads\/2011\/01\/zfs_logo.jpg?resize=350%2C200&ssl=1","width":350,"height":200},"classes":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3914","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/comments?post=3914"}],"version-history":[{"count":89,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3914\/revisions"}],"predecessor-version":[{"id":5084,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/3914\/revisions\/5084"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=3914"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=3914"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=3914"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}