Move and rework a bit ZFS instructions

This commit is contained in:
Gauthier Provost 2020-12-23 16:14:36 +08:00
parent 1d2c31a15a
commit cd60db4e42
5 changed files with 43 additions and 25 deletions

View file

@ -1,6 +1,4 @@
# Docker with ZFS pool When you already have a working ZFS pool (see [here](/helios64/software/zfs/install-zfs/)) and want to use Docker - it is good idea to configure them together.
When you already have working ZFS pool (see [here](/helios64/install/zfs)) and want to use Docker - it is good idea to use them togeter.
## **Step 1** - Prepare filesystem ## **Step 1** - Prepare filesystem
@ -45,7 +43,7 @@ sudo apt install docker-ce docker-ce-cli containerd.io
You might want this: You might want this:
```bash ```bash
sudo usermod -aG docker your-user sudo usermod -aG docker <your-username>
``` ```
Voila! Your Docker should be ready! Test it: Voila! Your Docker should be ready! Test it:
@ -65,3 +63,9 @@ docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /va
``` ```
Go to `http://yourip:9000` and configure. Go to `http://yourip:9000` and configure.
------------
*Page contributed by [michabbs](https://github.com/michabbs)*
*Reference [Armbian Forum Dicussion](https://forum.armbian.com/topic/16559-tutorial-first-steps-with-helios64-zfs-install-config/)*

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View file

@ -1,35 +1,38 @@
# ZFS on HDD !!! 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)! 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. (Althrough it should be also possible.) We assume rootfs is already on eMMC (or SD) and you want to keep your data on HDDs in ZFS pool. !!! Note
This wiki does not cover root-on-zfs. (Although it should be also possible.)
Important: *Focal* is required. Do not use Buster.
## **Step 1** - Install Focal on eMMC
See necessary steps [here](/helios64/install/transfer). ## **Step 1** - Install ZFS
## **Step 2** - Install ZFS
```bash ```bash
sudo armbian-config sudo armbian-config
``` ```
Go to Software and install headers. Go to *Software* and install headers.
![Kernel Headers](/helios64/software/zfs/img/install-headers.png)
Once kernel headers installed, install ZFS with the following command:
```bash ```bash
sudo apt install zfs-dkms zfsutils-linux sudo apt install zfs-dkms zfsutils-linux
``` ```
Optional: Optional:
```bash ```bash
sudo apt install zfs-auto-snapshot sudo apt install zfs-auto-snapshot
``` ```
Reboot. Reboot.
## **Step 3** - Prepare partitions ## **Step 2** - Prepare partitions
Use `fdisk` of `gdisk` to create necessary partitions on your hard drive. This is beyond scope of this wiki. Use `fdisk` of `gdisk` to create necessary partitions on your hard drive. This is beyond scope of this wiki.
When ready look for assigned uuids: When ready look for assigned uuids:
@ -38,7 +41,7 @@ When ready look for assigned uuids:
ls -l /dev/disk/by-partuuid/ ls -l /dev/disk/by-partuuid/
``` ```
## **Step 4** - Create ZFS pool ## **Step 3** - Create ZFS pool
```bash ```bash
sudo zpool create -o ashift=12 -m /mypool mypool mirror /dev/disk/by-partuuid/abc123 /dev/disk/by-partuuid/xyz789 sudo zpool create -o ashift=12 -m /mypool mypool mirror /dev/disk/by-partuuid/abc123 /dev/disk/by-partuuid/xyz789
@ -55,7 +58,7 @@ If your disks are SSDs, enable trim support:
sudo zpool set autotrim=on mypool sudo zpool set autotrim=on mypool
``` ```
## **Step 5** - Reboot ## **Step 4** - Reboot
After reboot make sure the pool was imported automatically: After reboot make sure the pool was imported automatically:
```bash ```bash
@ -64,3 +67,8 @@ zpool status
You should now have working system with root on eMMC and ZFS pool on HDD. You should now have working system with root on eMMC and ZFS pool on HDD.
------------
*Page contributed by [michabbs](https://github.com/michabbs)*
*Reference [Armbian Forum Dicussion](https://forum.armbian.com/topic/16559-tutorial-first-steps-with-helios64-zfs-install-config/)*

View file

@ -1,6 +1,4 @@
# LXD with ZFS pool When you already have a working ZFS pool (see [here](/helios64/software/zfs/install-zfs/)) and want to use LXD - it is good idea to configure them together.
When you already have working ZFS pool (see [here](/helios64/install/zfs)) and want to use LXD - it is good idea to use them togeter.
## **Step 1** - Prepare filesystem ## **Step 1** - Prepare filesystem
@ -16,7 +14,7 @@ sudo apt install lxd
You might want this: You might want this:
```bash ```bash
sudo usermod -aG lxd your-user sudo usermod -aG lxd <your-username>
``` ```
## **Step 3** - Configure LXD ## **Step 3** - Configure LXD
@ -45,3 +43,9 @@ sudo zfs set com.sun:auto-snapshot=true mypool/lxd-pool/containers
sudo zfs set com.sun:auto-snapshot=true mypool/lxd-pool/custom sudo zfs set com.sun:auto-snapshot=true mypool/lxd-pool/custom
sudo zfs set com.sun:auto-snapshot=true mypool/lxd-pool/virtual-machines sudo zfs set com.sun:auto-snapshot=true mypool/lxd-pool/virtual-machines
``` ```
------------
*Page contributed by [michabbs](https://github.com/michabbs)*
*Reference [Armbian Forum Dicussion](https://forum.armbian.com/topic/16559-tutorial-first-steps-with-helios64-zfs-install-config/)*

View file

@ -81,12 +81,14 @@ nav:
- SDcard Install : 'helios64/install/sdcard.md' - SDcard Install : 'helios64/install/sdcard.md'
- First Start : 'helios64/install/first-start.md' - First Start : 'helios64/install/first-start.md'
- Transfer Installed OS: 'helios64/install/transfer.md' - Transfer Installed OS: 'helios64/install/transfer.md'
- ZFS on HDD: 'helios64/install/zfs.md'
- Docker with ZFS: 'helios64/install/docker-zfs.md'
- LXD with ZFS: 'helios64/install/lxd-zfs.md'
- Recovery : - Recovery :
- Recovery Mode: '/helios64/button/#recovery-button' - Recovery Mode: '/helios64/button/#recovery-button'
- Maskrom Mode: 'helios64/maskrom.md' - Maskrom Mode: 'helios64/maskrom.md'
- Software:
- ZFS:
- 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'
- Hardware: - Hardware:
- Overview: 'helios64/hardware.md' - Overview: 'helios64/hardware.md'
- Button: 'helios64/button.md' - Button: 'helios64/button.md'