{"id":595,"date":"2017-03-15T20:42:38","date_gmt":"2017-03-15T19:42:38","guid":{"rendered":"http:\/\/hamsterhirn.de\/?p=595"},"modified":"2017-03-15T20:51:04","modified_gmt":"2017-03-15T19:51:04","slug":"ubuntu-and-a-custom-build-zfs-and-spl-from-git","status":"publish","type":"post","link":"https:\/\/hamsterhirn.de\/index.php\/2017\/03\/ubuntu-and-a-custom-build-zfs-and-spl-from-git\/","title":{"rendered":"Ubuntu and a custom build zfs and spl from git"},"content":{"rendered":"<p>I wanted to try the 0.7.0-rc3 from git. So I cloned from git and changed to the zfs and spl version 0.7.0-rc3 tag.<\/p>\n<p>Since ubuntu ships with a prebuilt zfs and spl my custom packages didn&#8217;t work.<br \/>\nIt always loaded the prebuilt zfs and spl from the kernel modules directory but not the one I built.<br \/>\nI figured out a way to make it work nonetheless.<\/p>\n<p>&#8211; check your currently running zfs module:<br \/>\n<pre><code class=\"preserve-code-formatting\"># modinfo zfs\nfilename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/lib\/modules\/4.8.0-41-generic\/kernel\/zfs\/zfs\/zfs.ko\nversion:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.6.5.8-0ubuntu4.1<\/code><\/pre><\/p>\n<p>&#8211; remove kernel mods (make sure to have all zfs pools unmounted, otherwise it will fail):<br \/>\n<pre><code class=\"preserve-code-formatting\">rmmod zfs zunicode zcommon znvpair spl zavl\n<\/code><\/pre><\/p>\n<p>&#8211; remove kernel module from your current running kernel:<br \/>\n<pre><code class=\"preserve-code-formatting\">rm -r \/lib\/modules\/$(uname -r)\/kernel\/zfs\n<\/code><\/pre><\/p>\n<p>&#8211; build deb packages for your currently running ubuntu (<a href=\"https:\/\/github.com\/zfsonlinux\/zfs\/wiki\/Custom-Packages\" target=\"_blank\">see their wiki<\/a>):<br \/>\n<pre><code class=\"preserve-code-formatting\">cd $where_your_spl_from_git_resides\nmake clean; .\/autogen.sh\ncd $where_your_zfs_from_git_resides\nmake clean; .\/autogen.sh\ncd $where_your_spl_from_git_resides\n.\/configure; make deb\nfor file in *.deb; do gdebi -q --non-interactive $file; done\ncd $where_your_zfs_from_git_resides\n.\/configure; make deb\nfor file in *.deb; do gdebi -q --non-interactive $file; done<\/code><\/pre><\/p>\n<p>&#8211; do a modprobe:<br \/>\n<pre><code class=\"preserve-code-formatting\">modprobe zfs\n<\/code><\/pre><\/p>\n<p>&#8211; check again the running zfs module:<br \/>\n<pre><code class=\"preserve-code-formatting\"># modinfo zfs | head -2\nfilename:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \/lib\/modules\/4.8.0-41-generic\/extra\/zfs\/zfs\/zfs.ko\nversion:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0.7.0-rc3<\/code><\/pre><\/p>\n<p>After that it worked just well. I guess it has to be done for every new kernel release. If there is another better way instead of deleting modules from the kernel modules directory to make it work, please share.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I wanted to try the 0.7.0-rc3 from git. So I cloned from git and changed to the zfs and spl version 0.7.0-rc3 tag. Since ubuntu ships with a prebuilt zfs and spl my custom packages didn&#8217;t work. It always loaded the prebuilt zfs and spl from the kernel modules directory but not the one I [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[295,297,298,296,292,299,294,24,293],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-it","tag-0-7-0-rc3","tag-compile","tag-custom-modules","tag-git","tag-kernel","tag-override","tag-spl","tag-ubuntu","tag-zfs"],"_links":{"self":[{"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/comments?post=595"}],"version-history":[{"count":6,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":601,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/posts\/595\/revisions\/601"}],"wp:attachment":[{"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/media?parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/categories?post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hamsterhirn.de\/index.php\/wp-json\/wp\/v2\/tags?post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}