{"id":603,"date":"2020-11-29T20:25:48","date_gmt":"2020-11-29T12:25:48","guid":{"rendered":"https:\/\/blog.haostudio.net\/hwp\/?p=603"},"modified":"2020-11-29T20:32:28","modified_gmt":"2020-11-29T12:32:28","slug":"zfs-%e5%ae%89%e8%a3%9d%e7%b4%80%e9%8c%84-on-helios64-rk3399","status":"publish","type":"post","link":"https:\/\/blog.haostudio.net\/hwp\/zfs-%e5%ae%89%e8%a3%9d%e7%b4%80%e9%8c%84-on-helios64-rk3399\/","title":{"rendered":"ZFS \u5b89\u88dd\u7d00\u9304 (on Helios64-RK3399)"},"content":{"rendered":"<h1>ZFS \u5b89\u88dd\u7d00\u9304 (on Helios64-RK3399)<\/h1>\n<p>\u4f7f\u7528 Armbian \u4e2d Helio64 ubuntu-20.04(kernel 5.8.x) images\n\u7531\u65bc\u7528 apt \u5b89\u88dd ubuntu 20.04 \u7684 zfs \u5957\u4ef6\u6703\u5931\u6557(zfs-dkms \u5957\u4ef6\u6703\u6709\u554f\u984c), \u56e0\u6b64\u53ea\u80fd\u81ea\u5df1\u91cd\u65b0build zfs.<\/p>\n<!--more-->\n<p><a href=\"https:\/\/forum.armbian.com\/topic\/15441-unable-to-build-zfs-module-on-buster-rockchip64\/?tab=comments#comment-110830\">\u53c3\u8003\u7db2\u5740<\/a><\/p>\n<p>\u76ee\u524d\u6e2c\u8a66\u6210\u529f\u7684\u7248\u672c\u662f:\nArmbian ubuntu focal(20.04) , kernel 5.8.16-rockchip64, zfs source code 0.8.5<\/p>\n<h2>\u5b89\u88dd\u6b65\u9a5f<\/h2>\n<p>\u9996\u5148\u5c07Helios64 kernel \u5957\u4ef6\u66f4\u65b0\u5230\u6700\u65b0\u7684\u7248\u672c. \u88dd\u5b8c\u5f8c\u91cd\u65b0\u958b\u6a5f, \u78ba\u8a8dkernel \u7684\u7248\u672c\u5df2\u7d93\u66f4\u65b0.\n\u5176\u76ee\u7684\u662f\u70ba\u4e86\u5f8c\u6b65\u9a5f\u4e2d,\u6293\u4e0b\u4f86\u7684 linux header \u7248\u672c\u80fd\u5920\u548c\u76ee\u524d\u7684 kernel \u7248\u672c\u76f8\u7b26<\/p>\n<pre><code>apt update\napt install linux-image-current-rockchip64\nreboot\n<\/code><\/pre>\n<p>\u6e96\u5099\u7de8\u8b6fzfs. \u9019\u88e1\u5229\u7528docker \u5728container \u4e2d\u7de8\u8b6fzfs, \u7de8\u8b6f\u5b8c\u5f8c, \u76f4\u63a5\u96e2\u958bcontainer \u5373\u53ef.<\/p>\n<pre><code>cd \/root\nmkdir zfs-scratch\ncd zfs-scratch\n\napt-get download linux-headers-current-rockchip64\ngit clone -b zfs-0.8.5 https:\/\/github.com\/openzfs\/zfs.git\n\ndocker run --rm -it -v $(pwd):\/scratch ubuntu:focal\n\n1. inside the container\ncd \/scratch\napt update\napt install build-essential autoconf automake libtool gawk alien fakeroot dkms libblkid-dev uuid-dev libudev-dev libssl-dev zlib1g-dev libaio-dev libattr1-dev libelf-dev python3 python3-dev \npython3-setuptools python3-cffi libffi-dev flex bison\ndpkg -i linux-headers-current-*.deb\n\ncd zfs\nsh autogen.sh\n.\/configure\nmake -s deb\n<\/code><\/pre>\n<p>\u96e2\u958bdocker container \u5f8c, \u5c31\u53ef\u4ee5\u5728\/root\/zfs-sractch\/zfs \u76ee\u9304\u4e2d\u627e\u5230\u4e00\u5806\u5df2\u7d93\u7de8\u8b6f\u597d\u7684zfs deb packages.\n\u63a5\u4e0b\u4f86\u5b89\u88dd\u9019\u4e9b\u5957\u4ef6\u5373\u53ef.<\/p>\n<pre><code># \u5148\u5b89\u88dd\u4e00\u4e9b\u5fc5\u8981\u5957\u4ef6\napt install dkms\n\n1. \u958b\u59cb\u88dd\u525b\u525b\u7de8\u8b6f\u597d\u7684zfs\u5957\u4ef6, \u9664\u4e86devel \u548c test \u76f8\u95dc\u7684\u5957\u4ef6\u6211\u6c92\u5b89\u88dd, \u5176\u9918\u5168\u88dd\u4e86\ncd \/root\/zfs-scratch\/zfs\ndpkg -i kmod-zfs-5.8.16-rockchip64_0.8.5-1_arm64.deb libnvpair1_0.8.5-1_arm64.deb libuutil1_0.8.5-1_arm64.deb libzfs2_0.8.5-1_arm64.deb libzpool2_0.8.5-1_arm64.deb python3-pyzfs_0.8.5-1_arm64.deb \nzfs_0.8.5-1_arm64.deb zfs-dracut_0.8.5-1_arm64.deb zfs-initramfs_0.8.5-1_arm64.deb\n\n1. \u518d\u88dc\u4e0a\u4e00\u500bzfs-zed \u5957\u4ef6\napt install zfs-zed\n\n1. kernel module\u8f09\u5165\u76f8\u95dc, \u8b93\u958b\u6a5f\u81ea\u52d5\u8f09\u5165zfs modules\ndepmod\necho &quot;zfs&quot; &amp;gt;&amp;gt; \/etc\/modules-load.d\/modules.conf\nreboot\n<\/code><\/pre>","protected":false},"excerpt":{"rendered":"<p>ZFS \u5b89\u88dd\u7d00\u9304 (on Helios64-RK3399) \u4f7f\u7528 Armbian &hellip; <a href=\"https:\/\/blog.haostudio.net\/hwp\/zfs-%e5%ae%89%e8%a3%9d%e7%b4%80%e9%8c%84-on-helios64-rk3399\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15,29],"tags":[],"class_list":["post-603","post","type-post","status-publish","format-standard","hentry","category-embedded-system","category-zfs-2"],"_links":{"self":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/603","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/comments?post=603"}],"version-history":[{"count":6,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/603\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/posts\/603\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/media?parent=603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/categories?post=603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.haostudio.net\/hwp\/wp-json\/wp\/v2\/tags?post=603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}