From c2796e9a0d2300b54c592501ecfdd68c80fb85a6 Mon Sep 17 00:00:00 2001 From: Gauthier Provost Date: Fri, 26 Feb 2021 14:54:24 +0800 Subject: [PATCH] Rename and rework ZFS build page --- .../zfs}/Dockerfile | 0 .../zfs/install-zfs.sh} | 13 +++-- docs/helios64/software/zfs/build-zfs.md | 51 +++++++++++++++++++ docs/helios64/software/zfs/docker-zfs.md | 5 ++ .../software/zfs/install-zfs-buster.md | 37 -------------- docs/helios64/software/zfs/install-zfs.md | 6 +-- mkdocs.yml | 1 + 7 files changed, 65 insertions(+), 48 deletions(-) rename docs/helios64/{software/zfs/install-zfs-buster => files/zfs}/Dockerfile (100%) rename docs/helios64/{software/zfs/install-zfs-buster/install-zfs-buster.sh => files/zfs/install-zfs.sh} (80%) create mode 100644 docs/helios64/software/zfs/build-zfs.md delete mode 100644 docs/helios64/software/zfs/install-zfs-buster.md diff --git a/docs/helios64/software/zfs/install-zfs-buster/Dockerfile b/docs/helios64/files/zfs/Dockerfile similarity index 100% rename from docs/helios64/software/zfs/install-zfs-buster/Dockerfile rename to docs/helios64/files/zfs/Dockerfile diff --git a/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh b/docs/helios64/files/zfs/install-zfs.sh similarity index 80% rename from docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh rename to docs/helios64/files/zfs/install-zfs.sh index a5e5620..e4462a6 100755 --- a/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh +++ b/docs/helios64/files/zfs/install-zfs.sh @@ -4,13 +4,13 @@ zfsver="zfs-2.0.3" #creating building directory mkdir /tmp/zfs-builds && cd "$_" -rm -rf /tmp/zfs-builds/inside_zfs.sh +rm -rf /tmp/zfs-builds/build-zfs.sh apt-get download linux-headers-current-rockchip64 git clone -b $zfsver https://github.com/openzfs/zfs.git $zfsver-$(uname -r) #create file to execute inside container -echo "creating file to execute it inside container" -cat > /tmp/zfs-builds/inside_zfs.sh < /tmp/zfs-builds/build-zfs.sh < software -> softy -> docker* + +## **Step 2** - Create Dockerfile + +Create dedicated directory with the required Dockerfile + +```bash +mkdir zfs-builder +cd zfs-builder +wget https://wiki.kobol.io/helios64/files/zfs/Dockerfile +``` + +Build docker image for ZFS building purpose. + +```bash +sudo docker build --tag zfs-build-ubuntu-bionic:0.1 . +``` + +## **Step 3** - Build and install ZFS packages. + +```bash +wget https://wiki.kobol.io/helios64/files/zfs/install-zfs.sh +chmod +x install-zfs.sh +./install-zfs.sh +``` + +On succeed, you may need to reboot and enable services: + +```bash +sudo reboot +sudo systemctl enable zfs-import-cache zsf-import.target zfs-mount zfs.target zfs-zed +``` + +------------ + +*Page contributed by [samorodkin](https://github.com/samorodkin)* + +*Reference [Armbian Forum Dicussion](https://forum.armbian.com/topic/16119-zfs-on-helios64/)* diff --git a/docs/helios64/software/zfs/docker-zfs.md b/docs/helios64/software/zfs/docker-zfs.md index 52c890f..d6312d5 100644 --- a/docs/helios64/software/zfs/docker-zfs.md +++ b/docs/helios64/software/zfs/docker-zfs.md @@ -25,6 +25,11 @@ Create `/etc/docker/daemon.json` with the following content: ## **Step 2** - Install Docker +!!! Note + You can easily install docker by using **armbian-config** tool. + + *armbian-config -> software -> softy -> docker* + Add `/etc/apt/sources.list.d/docker.list` with the following content: ```bash diff --git a/docs/helios64/software/zfs/install-zfs-buster.md b/docs/helios64/software/zfs/install-zfs-buster.md deleted file mode 100644 index 12fd222..0000000 --- a/docs/helios64/software/zfs/install-zfs-buster.md +++ /dev/null @@ -1,37 +0,0 @@ -!!! Important This install procedure only works with *Armbian Buster* !!! - -Original forum post by @Grek https://forum.armbian.com/topic/16119-zfs-on-helios64/ - -Tested with Linux helios64 5.10.16-rockchip64 #21.02.2 SMP PREEMPT Sun Feb 14 21:35:01 CET 2021 aarch64 GNU/Linux - -First we need to have docker installed ( armbian-config -> software -> softy -> docker ) - -Create dedicated directory with Dockerfile ( we will customize ubuntu:bionic image with required libraries and gcc 10 . in next builds we can skip this step and just customize and run [install-zfs-buster.sh] (https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh) script) - -```bash -mkdir zfs-builder -cd zfs-builder -wget https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/Dockerfile -``` - -Build docker image for building purposes. - -```bash -sudo docker build --tag zfs-build-ubuntu-bionic:0.1 . -``` - -Build and install ZFS packages. - -```bash -wget https://raw.githubusercontent.com/kobol-io/wiki/master/docs/helios64/software/zfs/install-zfs-buster/install-zfs-buster.sh -chmod +x install-zfs-buster.sh -screen -L -Logfile buildlog.txt ./install-zfs-buster.sh -tail -n40 buildlog.txt -``` - -On succeed, you may need to reboot and enable services: - -```bash -sudo reboot -sudo systemctl enable zfs-import-cache zsf-import.target zfs-mount zfs.target zfs-zed -``` diff --git a/docs/helios64/software/zfs/install-zfs.md b/docs/helios64/software/zfs/install-zfs.md index a03c39e..7e9fcf6 100644 --- a/docs/helios64/software/zfs/install-zfs.md +++ b/docs/helios64/software/zfs/install-zfs.md @@ -1,12 +1,10 @@ -!!! Important - This install procedure only works with *Armbian Focal* for now. Instructions for *Armbian Buster* to be added soon. - So you already installed the system on eMMC or SD? You might want to use ZFS on the hard disk(s)! We assume rootfs is already on eMMC (or microSD Card) and you want to store your data on HDDs in ZFS pool. !!! Note This wiki does not cover root-on-zfs. (Although it should be also possible.) - +!!! Note + If this method fails you can try to build directly ZFS on your system with the following [instructions](/helios64/software/zfs/build-zfs). ## **Step 1** - Install ZFS diff --git a/mkdocs.yml b/mkdocs.yml index 7c50c28..6f936d3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -89,6 +89,7 @@ nav: - Install ZFS: 'helios64/software/zfs/install-zfs.md' - Docker with ZFS: 'helios64/software/zfs/docker-zfs.md' - LXD with ZFS: 'helios64/software/zfs/lxd-zfs.md' + - Build ZFS: 'helios64/software/zfs/build-zfs.md' - Hardware: - Overview: 'helios64/hardware.md' - Button: 'helios64/button.md'