advanced:target
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| advanced:target [2018/10/03 00:36] – dan | advanced:target [2018/10/10 00:02] (current) – [Build ZFS on Linux] dan | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Building a FreeNAS replication target on an Odroid HC2 ====== | ====== Building a FreeNAS replication target on an Odroid HC2 ====== | ||
| + | |||
| + | **THIS IS A VERY ROUGH WORK IN PROGRESS. | ||
| + | |||
| The [[https:// | The [[https:// | ||
| Unfortunately, | Unfortunately, | ||
| - | + | ===== Create a non-privileged user with sudo capability | |
| - | ===== Rebuild the kernel | + | |
| - | To ensure you have the headers for the running kernel installed, run the following commands (taken from the [[https:// | + | |
| < | < | ||
| - | sudo apt update && sudo apt upgrade | + | adduser fred |
| - | sudo apt install git gcc g++ build-essential | + | usermod -aG sudo fred |
| - | git clone --depth 1 https:// | + | </code> |
| - | cd linux | + | ===== Install the kernel headers ===== |
| - | make odroidxu4_defconfig | + | In order to build ZFS, you must have the headers for the running kernel installed on the system. |
| - | make -j8 | + | < |
| - | sudo make modules_install | + | wget http://deb.odroid.in/5422-s/pool/main/l/linux-source-4.14.73-136/linux-headers-4.14.73-136_20181001_armhf.deb |
| - | sudo cp -f arch/arm/boot/zImage / | + | sudo dpkg -i linux-headers-4.14.73-136_20181001_armhf.deb |
| - | sudo cp -f arch/arm/boot/dts/exynos5422-odroidxu3.dtb / | + | |
| - | sudo cp -f arch/ | + | |
| - | sudo cp -f arch/arm/ | + | |
| - | sudo cp .config / | + | |
| - | sudo update-initramfs -c -k `make kernelrelease` | + | |
| - | sudo mkimage -A arm -O linux -T ramdisk | + | |
| - | sudo cp / | + | |
| - | sync | + | |
| </ | </ | ||
| - | Then reboot your system to start using the new kernel. | ||
| ===== Build ZFS on Linux ===== | ===== Build ZFS on Linux ===== | ||
| These instructions are taken from the [[https:// | These instructions are taken from the [[https:// | ||
| < | < | ||
| - | sudo apt install build-essential autoconf libtool gawk alien fakeroot zlib1g-dev uuid-dev libattr1-dev libblkid-dev libselinux-dev libudev-dev parted lsscsi ksh libssl-dev libelf-dev | + | sudo apt install |
| </ | </ | ||
| Then download, build, and install the ZFS code: | Then download, build, and install the ZFS code: | ||
| Line 52: | Line 44: | ||
| </ | </ | ||
| + | ===== Enable encryption, and create an encrypted dataset ===== | ||
| + | |||
| + | The idea of this system is to be a standalone storage " | ||
| + | < | ||
| + | zpool set feature@encryption=enabled dozer | ||
| + | </ | ||
| + | Then, create the encrypted dataset: | ||
| + | < | ||
| + | zfs create -o encryption=on -o keylocation=prompt -o keyformat=passphrase dozer/ | ||
| + | </ | ||
| + | The system will prompt you for a passphrase, which you'll need whenever you mount that dataset. | ||
| + | |||
| + | ===== Create a replication user ===== | ||
| + | For the sake of security, it would be best if replication to this device ran as a user other than root. First, create a user in the FreeNAS web GUI called '' | ||
| + | |||
| + | Then, on the Odroid, as root, run | ||
| + | < | ||
| + | adduser zfsuser -u userid -s /bin/false | ||
| + | </ | ||
| + | where " | ||
| + | |||
| + | Now allow that user to make changes on the encrypted dataset: | ||
| + | < | ||
| + | zfs allow -ldu zfsuser create, | ||
| + | </ | ||
| + | ===== Install Zerotier ===== | ||
| + | [[https:// | ||
| + | < | ||
| + | sudo apt install curl | ||
| + | curl https:// | ||
| + | </ | ||
advanced/target.1538526998.txt.gz · Last modified: by dan
