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 working ZFS pool (see [here](/helios64/install/zfs)) and want to use Docker - it is good idea to use them togeter.
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.
## **Step 1** - Prepare filesystem
@ -45,10 +43,10 @@ sudo apt install docker-ce docker-ce-cli containerd.io
You might want this:
```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:
```bash
docker run hello-world
@ -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.
------------
*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 2** - Install ZFS
## **Step 1** - Install ZFS
```bash
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
sudo apt install zfs-dkms zfsutils-linux
```
Optional:
```bash
sudo apt install zfs-auto-snapshot
```
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.
When ready look for assigned uuids:
@ -38,7 +41,7 @@ When ready look for assigned uuids:
ls -l /dev/disk/by-partuuid/
```
## **Step 4** - Create ZFS pool
## **Step 3** - Create ZFS pool
```bash
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
```
## **Step 5** - Reboot
## **Step 4** - Reboot
After reboot make sure the pool was imported automatically:
```bash
@ -64,3 +67,8 @@ zpool status
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 working ZFS pool (see [here](/helios64/install/zfs)) and want to use LXD - it is good idea to use them togeter.
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.
## **Step 1** - Prepare filesystem
@ -16,7 +14,7 @@ sudo apt install lxd
You might want this:
```bash
sudo usermod -aG lxd your-user
sudo usermod -aG lxd <your-username>
```
## **Step 3** - Configure LXD
@ -28,7 +26,7 @@ sudo lxc init
Configure ZFS this way:
```bash
Do you want to configure a new storage pool (yes/no) [default=yes]? yes
Name of the new storage pool [default=default]:
Name of the new storage pool [default=default]:
Name of the storage backend to use (dir, btrfs, ceph, lvm, zfs) [default=zfs]: zfs
Create a new ZFS pool (yes/no) [default=yes]? no
Name of the existing ZFS pool or dataset: mypool/lxd-pool
@ -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/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'
- First Start : 'helios64/install/first-start.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 Mode: '/helios64/button/#recovery-button'
- 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:
- Overview: 'helios64/hardware.md'
- Button: 'helios64/button.md'