Rename and rework ZFS build page

This commit is contained in:
Gauthier Provost 2021-02-26 14:54:24 +08:00
parent 3780846279
commit c2796e9a0d
7 changed files with 65 additions and 48 deletions

View File

@ -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 <<EOF
echo "creating ZFS build script to be executed inside container"
cat > /tmp/zfs-builds/build-zfs.sh <<EOF
#!/bin/bash
cd scratch/
dpkg -i linux-headers-current-*.deb
@ -26,25 +26,24 @@ rm -rf "/scratch/$zfsver-$(uname -r)"
exit
EOF
chmod +x /tmp/zfs-builds/inside_zfs.sh
chmod +x /tmp/zfs-builds/build-zfs.sh
echo ""
echo "####################"
echo "starting container.."
echo "####################"
echo ""
docker run --rm -it -v /tmp/zfs-builds:/scratch zfs-build-ubuntu-bionic:0.1 /bin/bash /scratch/inside_zfs.sh
docker run --rm -it -v /tmp/zfs-builds:/scratch zfs-build-ubuntu-bionic:0.1 /bin/bash /scratch/build-zfs.sh
# Cleanup packages (if installed).
modprobe -r zfs zunicode zzstd zlua zcommon znvpair zavl icp spl
apt remove --yes zfsutils-linux zfs-zed zfs-initramfs
apt autoremove --yes
dpkg -i "/tmp/zfs-builds/deb-$zfsver-$(uname -r)"/kmod-zfs-$(uname -r)*.deb
dpkg -i "/tmp/zfs-builds/deb-$zfsver-$(uname -r)"/{libnvpair3,libuutil3,libzfs4,libzpool4,python3-pyzfs,zfs}_*.deb
dpkg -i "/tmp/zfs-builds/deb-$zfsver-$(uname -r)"/{libnvpair3,libuutil3,libzfs4,libzpool4,python3-pyzfs,zfs}_*.deb
echo ""
echo "###################"
echo "building complete"
echo "###################"
echo ""

View File

@ -0,0 +1,51 @@
!!! important
This install procedure only works on **Armbian Buster**
!!! note
Tested with Linux helios64 5.10.16-rockchip64 / Armbian 21.02.2
This page describes a method to easily build ZFS on your system in case the DKMS install method described [here](/helios64/software/zfs/install-zfs/) fails.
## **Step 1** - Install Docker
You can easily install docker by using **armbian-config** tool.
*armbian-config -> 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/)*

View File

@ -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

View File

@ -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
```

View File

@ -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

View File

@ -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'