{"id":4679,"date":"2020-02-11T14:36:46","date_gmt":"2020-02-11T20:36:46","guid":{"rendered":"http:\/\/icesquare.com\/wordpress\/?p=4679"},"modified":"2020-04-05T09:33:43","modified_gmt":"2020-04-05T14:33:43","slug":"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","status":"publish","type":"post","link":"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\/","title":{"rendered":"[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"},"content":{"rendered":"<p>When I rebooted my computer and loaded my ZFS pool today, I got this error message:<\/p>\n<pre>\r\n#sudo zpool import -a\r\nThis pool uses the following feature(s) not supported by this system:\r\n        org.zfsonlinux:project_quota (space\/object accounting based on project ID.)\r\n        com.delphix:spacemap_v2 (Space maps representing large segments are more efficient.)\r\nAll unsupported features are only required for writing to the pool.\r\nThe pool can be imported using '-o readonly=on'.\r\ncannot import 'my_zpool': unsupported version or feature\r\n<\/pre>\n<p>On my another machine, I also saw something similar when I tried to create a new pool:<\/p>\n<pre>zpool create: invalid argument for this pool operation<\/pre>\n<p>This kind of error usually happens when you move your ZFS pool from one system to the other. For example, if your ZFS pool was created in ZFS v10, and you move it to a new system that can only handle ZFS v9, then this error message will show up. Obviously, this is simply not true in my case (and yours too). My system showed me this message after rebooting the server. It had nothing to do with moving the ZFS pool from one to the other. In short, this message is misleading, however it gave me some idea of what was going wrong.<\/p>\n<p>Long story short. It is a known bug of the ZFS on Linux. This kind of problem happens when your Linux kernel is updated every time. If you want to get this resolved, you can only do two things. Never update your system kernel, or never reboot your server (so that the new kernel will not be loaded). If you can&#8217;t do any of these, then ZFS on Linux is not for you.<\/p>\n<p>If you need to access your data now, you can mount it as read only, although this is not a long term solution:<\/p>\n<pre>\r\nsudo zpool import my_zpool -o readonly=on\r\n<\/pre>\n<p>Another way is to reboot your server to the older working kernel, assuming your old kernel is still available in your system.<\/p>\n<p>So here is the reason why your system could not open your ZFS pool:<\/p>\n<ol>\n<li>You are running Linux kernel ver A and ZFS on Linux ver X, and your system is happy.<\/li>\n<li>A new kernel is release (e.g., ver B). Your system download it and the kernel is sitting under \/boot<\/li>\n<li>Later, a new ZFS on Linux (e.g., ver Y) is available. In theory, when upgrading the ZFS on Linux, it supposes to compile the DKMS code with each kernel in the system. In the other words, your current kernel (ver A) and the new pending kernel (ver B) should know how to use the ZFS on Linux (both ver X and Y). Notice that I am using the word: &#8220;In theory&#8221;. And you probably know that things are not ideal in reality.<\/li>\n<li>So when your system is booted into the new kernel, for some reasons, your new kernel does not have the skill (ZFS on Linux ver Y) to open your ZFS pool, therefore you see that error message.<\/li>\n<\/ol>\n<p>Here is how to solve the problem. Reinstalling the ZFS and DKMS packages is not going to solve the problem. You will need to rebuild the DKMS modules with your new kernel. First, reboot your computer to the latest kernel first. Here are my versions. Your versions may be different.<\/p>\n<pre>\r\nOld Kernel: 3.10.0-1062.9.1.el7.x86_64\r\nNew Kernel: 3.10.0-1062.12.1.el7.x86_64\r\n\r\nOld DKMS ZFS Module:   0.8.2\r\nNew DKMS ZFS Module:   0.8.3\r\n<\/pre>\n<p>Remove your old kernels.<\/p>\n<pre>\r\nsudo package-cleanup --oldkernels --count=1 -y\r\n<\/pre>\n<p>Check your current DKMS status. It should contain some error:<\/p>\n<pre>\r\nsudo dkms status\r\nError! Could not locate dkms.conf file.\r\nFile: \/var\/lib\/dkms\/zfs\/0.8.2\/source\/dkms.conf does not exist.\r\n<\/pre>\n<p>Clean up the DKMS folder:<\/p>\n<pre>\r\n#cd \/var\/lib\/dkms\/zfs\/\r\n\r\n#ls -al\r\n# Move old libraries and old kernels to somewhere\r\n0.8.2  <---- Move this to \/tmp\r\n0.8.3  <-- Keep\r\noriginal_module\r\nkernel-3.10.0-1062.9.1.el7.x86_64-x86_64 -> 0.8.3\/3.10.0-1062.9.1.el7.x86_64\/x86_64  <-- Move this to \/tmp\r\n<\/pre>\n<p>Remove the old DKMS modules that are associated with old kernels:<\/p>\n<pre>\r\nsudo dkms remove zfs\/0.8.2 --all;\r\n<\/pre>\n<p>Recompile the new DKMS module with the current kernel:<\/p>\n<pre>\r\nsudo dkms --force install zfs\/0.8.3\r\n<\/pre>\n<p>Check your DKMS status again, it should be clean:<\/p>\n<pre>\r\nsudo dkms status\r\nzfs, 0.8.3, 3.10.0-1062.12.1.el7.x86_64, x86_64: installed\r\n<\/pre>\n<p>If you see any old kernel that is associated with the new DKMS module, remove them, e.g.,<\/p>\n<pre>\r\n#sudo dkms status\r\nzfs, 0.8.3, 3.10.0-1062.12.1.el7.x86_64, x86_64: installed (original_module exists)\r\nzfs, 0.8.3, 3.10.0-1062.9.1.el7.x86_64, x86_64: built (original_module exists) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!) (WARNING! Missing some built modules!)\r\n<\/pre>\n<pre>\r\nsudo dkms remove zfs\/0.8.3 -k 3.10.0-1062.9.1.el7.x86_64\r\n<\/pre>\n<p>Now you may try to import your ZFS pool again. If it doesn't work, try to mount the ZFS pool in read only mode first, back up your data, rebuild the pool and restore it from backup.<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 <a class=\"more-link\" href=\"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\/\">Continue Reading &rarr;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_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":[6,69,109],"tags":[177],"class_list":["post-4679","post","type-post","status-publish","format-standard","hentry","category-technology","category-troubleshooting-technology","category-zfs","tag-zfs"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/p1sqzr-1dt","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":4830,"url":"https:\/\/icesquare.com\/wordpress\/zfshow-to-repair-a-zfs-pool-if-one-device-was-damaged\/","url_meta":{"origin":4679,"position":0},"title":"[ZFS]How to repair a ZFS pool if one device was damaged","author":"Derrick","date":"November 13, 2020","format":false,"excerpt":"Today, I accidentally dd'ed a disk which was part of an active ZFS pool on my test server. I dd'ed the first and the last 10 sectors of the disk. Technically I didn't lose any data because my ZFS configuration was RAIDZ. However once I rebooted my computer, my 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":3458,"url":"https:\/\/icesquare.com\/wordpress\/how-to-stress-test-zfs-system\/","url_meta":{"origin":4679,"position":1},"title":"How to Stress Test ZFS System","author":"Derrick","date":"January 26, 2014","format":false,"excerpt":"If you have set up a ZFS system, you may want to stress test the system before putting it in a production environment. There are many different ways to stress test the system. The most common way is to fill the entire pool using dd. However, I think scrubbing the\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":4563,"url":"https:\/\/icesquare.com\/wordpress\/zfs-errors-permanent-errors-have-been-detected-in-the-following-files\/","url_meta":{"origin":4679,"position":2},"title":"ZFS &#8211; errors: Permanent errors have been detected in the following files:","author":"Derrick","date":"February 3, 2019","format":false,"excerpt":"I got the following messages today when I inspected my ZFS: errors: Permanent errors have been detected in the following files: \/mypool\/data\/file1.dat \/mypool\/data\/file2.dat \/mypool\/data\/file3.dat \/mypool\/data\/file4.dat \/mypool\/data\/file5.dat As usual, the first thing I did was to scrub the entire pool, i.e., sudo zpool scrub mypool Unfortunately, it didn't work. The error\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":2562,"url":"https:\/\/icesquare.com\/wordpress\/freebsd-9-zfs-one-or-more-devices-has-experienced-an-error-resulting-in-data-corruption-applications-may-be-affected\/","url_meta":{"origin":4679,"position":3},"title":"[FreeBSD+ZFS]One or more devices has experienced an error resulting in data corruption.  Applications may be affected.","author":"Derrick","date":"January 17, 2012","format":false,"excerpt":"When you check the ZFS status, you may find the following error message: One or more devices has experienced an error resulting in data corruption. Applications may be affected.. There can be million reasons to cause this error message showing up. Of course, 99% of them are caused by hardware\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":4648,"url":"https:\/\/icesquare.com\/wordpress\/zfs-on-linux-what-to-do-when-resilver-takes-very-long\/","url_meta":{"origin":4679,"position":4},"title":"[ZFS On Linux] What to Do When Resilver Takes Very Long","author":"Derrick","date":"January 13, 2020","format":false,"excerpt":"If you check your Zpool health status and you notice an error like the following: sudo zpool status pool: myzpool state: DEGRADED status: One or more devices are faulted in response to persistent errors. Sufficient replicas exist for the pool to continue functioning in a degraded state. action: Replace the\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":2064,"url":"https:\/\/icesquare.com\/wordpress\/zfsusb-building-a-super-large-server-using-usb-memory-cf-card-and-sd-card\/","url_meta":{"origin":4679,"position":5},"title":"ZFS+USB: Building a Super Large Server Using USB Memory, CF Card and SD Card.","author":"Derrick","date":"December 17, 2011","format":false,"excerpt":"[ad#adbrite-square] I got a lot of unused USB thumb drives, CF flash card and SD cards sitting in my drawer. The sizes range from 8MB to 8GB. Unlike few years ago, it is getting a lot easier to access to the Internet, so I no longer need to carry my\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":[]}],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4679","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=4679"}],"version-history":[{"count":16,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4679\/revisions"}],"predecessor-version":[{"id":4747,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/posts\/4679\/revisions\/4747"}],"wp:attachment":[{"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/media?parent=4679"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/categories?post=4679"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/icesquare.com\/wordpress\/wp-json\/wp\/v2\/tags?post=4679"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}