Home Server – setting up ZFS (revisited)
Introduction
Finally, after two years of renovations and two children, I am revisiting the idea of a small home server. I don’t expect it to do much:
Whenever I’m accessing a remote system (even when using SSH in my internal network) I prefer to start a TMUX session. That way, if I get disconnected (for instance) during the middle of a package upgrade, the process just continues and I can reconnect at a later time without issues (if tmux is not yet installed or you’re not using it yet, I highly recommend reading up on it and taking a bit of time to get used to the basic concepts. I used this quick-start a couple of years ago).
Setting up ZFS
Install the required `zfs`` package:
sudo apt update && sudo apt install zfsutils-linux
Then find out which drives you want to use:
sudo fdisk -l
Fdisk output
In my case, I wanted to use the two 1.8GB drives (/dev/sdb
and /dev/sdc
) in a mirror configuration. I don’t have a hundred movies to fill a drive, most space will be taken up by photos and system images.
sudo zpool create mypool mirror /dev/sdb /dev/sdc
Check the pool status to verify that it is as intended:
zpool status
Zpool status
The pool automatically gets mounted on /mypool
with root:root
as owner/group. To change the owner/group:
sudo chown <user>:<user> /mypool/ # (replace <user>)