{"id":10980,"date":"2024-05-24T23:23:32","date_gmt":"2024-05-25T04:23:32","guid":{"rendered":"https:\/\/www.rushworth.us\/lisa\/?p=10980"},"modified":"2024-05-24T23:47:34","modified_gmt":"2024-05-25T04:47:34","slug":"openzfs-on-redhat-8","status":"publish","type":"post","link":"https:\/\/www.rushworth.us\/lisa\/?p=10980","title":{"rendered":"OpenZFS On RedHat 8 (From Package)"},"content":{"rendered":"\n<p>This process presumes you have <a href=\"https:\/\/www.rushworth.us\/lisa\/?p=10983\" data-type=\"post\" data-id=\"10983\">generated a signing key (\/root\/signing\/MOK.priv and \/root\/signing\/MOK.der) that has been registered for signing modules<\/a>.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n################################################################################\n## Install from Repo and Sign Modules\n################################################################################\nyum install https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-8.noarch.rpm\nyum install kernel-devel\n\n# Install kmod version of ZS\nyum install https:\/\/zfsonlinux.org\/epel\/zfs-release-2-3$(rpm --eval &quot;%{dist}&quot;).noarch.rpm\ndnf config-manager --disable zfs\ndnf config-manager --enable zfs-kmod\nyum install zfs\n\n# And autoload\necho zfs &gt;\/etc\/modules-load.d\/zfs.conf\n\n# Use rpm -ql to list out the kernel modules that this version of ZFS uses -- 2.1.x has quite a few of them, and they each need to be signed\n# Sign zfs.ko and spl.ko in current kernel\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/$(uname -r)\/weak-updates\/zfs\/zfs\/zfs.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/$(uname -r)\/weak-updates\/zfs\/spl\/spl.ko\n# And sign the bunch of other ko files in the n-1 kernel rev (these are symlinked from the current kernel)\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/avl\/zavl.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/icp\/icp.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/lua\/zlua.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/nvpair\/znvpair.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/unicode\/zunicode.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/common\/zcommon.ko\n\/usr\/src\/kernels\/$(uname -r)\/scripts\/sign-file sha256 \/root\/signing\/MOK.priv \/root\/signing\/MOK.der \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/zstd\/zzstd.ko\n\n# Verify they are signed now\nmodinfo -F signer \/usr\/lib\/modules\/$(uname -r)\/weak-updates\/zfs\/zfs\/zfs.ko\nmodinfo -F signer \/usr\/lib\/modules\/$(uname -r)\/weak-updates\/zfs\/spl\/spl.ko\n\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/avl\/zavl.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/icp\/icp.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/lua\/zlua.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/nvpair\/znvpair.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/unicode\/zunicode.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/zcommon\/zcommon.ko\nmodinfo -F signer \/lib\/modules\/4.18.0-513.18.1.el8_9.x86_64\/extra\/zfs\/zstd\/zzstd.ko\n\n# Reboot\ninit 6\n\n# And we&#039;ve got ZFS, so create the pool\nzpool create pgpool sdc\nzfs create zpool\/zdata\nzfs set compression=lz4 zpool\/zdata\n\nzfs get compressratio zpool\/zdata\nzfs set mountpoint=\/zpool\/zdata zpool\/zdata\n<\/pre><\/div>\n\n\n<p>What happens if you <em>only<\/em> sign zfs.ko? All sorts of errors that <em>look<\/em> like there&#8217;s some sort of other problem &#8212; zfs will not load. It will tell you the required key is not available<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nMay 22 23:42:44 sandboxserver systemd-modules-load&#x5B;492]: Failed to insert &#039;zfs&#039;: Required key not available\n<\/pre><\/div>\n\n\n<p>Using insmod to try to manually load it will tell you there are dozens of unknown symbols:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; title: ; notranslate\" title=\"\">\nMay 22 23:23:23 sandboxserver kernel: zfs: Unknown symbol ddi_strtoll (err 0)\nMay 22 23:23:23 sandboxserver kernel: zfs: Unknown symbol spl_vmem_alloc (err 0)\nMay 22 23:23:23 sandboxserver kernel: zfs: Unknown symbol taskq_empty_ent (err 0)\nMay 22 23:23:23 sandboxserver kernel: zfs: Unknown symbol zone_get_hostid (err 0)\nMay 22 23:23:23 sandboxserver kernel: zfs: Unknown symbol tsd_set (err 0)\n\n<\/pre><\/div>\n\n\n<p>But the real problem is that there are unsigned modules so &#8230; there <em>are<\/em> unknown symbols. But not because something is incompatible. Just because the module providing that symbol will not load. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>This process presumes you have generated a signing key (\/root\/signing\/MOK.priv and \/root\/signing\/MOK.der) that has been registered for signing modules. What happens if you only sign zfs.ko? All sorts of errors that look like there&#8217;s some sort of other problem &#8212; zfs will not load. It will tell you the required key is not available Using &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[30],"tags":[294,2019,1195,1944,2023,2022],"class_list":["post-10980","post","type-post","status-publish","format-standard","hentry","category-system-administration","tag-linux","tag-openzfs","tag-redhat","tag-zfs","tag-zfs-on-linux","tag-zfs4linux"],"_links":{"self":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10980","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10980"}],"version-history":[{"count":4,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10980\/revisions"}],"predecessor-version":[{"id":10998,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=\/wp\/v2\/posts\/10980\/revisions\/10998"}],"wp:attachment":[{"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=10980"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=10980"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rushworth.us\/lisa\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=10980"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}