Debian Bullseye + ZFS on Lacie 5Big NAS Pro
Written 2021-11-26
Tags:ZFS 5big NAS Debian Lacie
System Configuration
5Big NAS Pro, unlike Lacie's earlier, ARM-based systems, has an Intel Atom processor, DDR3 SO-DIMM RAM, and a traditional BIOS accessible with a keyboard and VGA monitor. For my system, I added an internal USB stick for the OS, but this is not required - you could also use a SATA disk, though I wanted to reserve all of those for storage. For now you'll need to set the BIOS to boot from an external USB stick over any SATA or internal USB disks.
Base Installation
I used the ISO from here: https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/current/amd64/iso-cd/ and then wrote it to a USB thumbdrive, inserted it to the NAS, booted and installed. Notably, though the BIOS appears to support EFI, I couldn't get it to boot Debian, and so re-installed with GRUB and no EFI partition.
Apt Configuration
Add or update the following entries to /etc/apt/sources.list
Add backports: deb http://deb.debian.org/debian/ bullseye-backports main contrib non-free Add contrib non-free to: deb http://deb.debian.org/debian/ bullseye main contrib non-freeZFS is in bullseye-backports and we need bulleye's contrib and non-free components to update the CPU microcode. Once done, run 'apt update'.
Additional Packages
You may find the additional packages useful
sudo openssh-server #remote access htop #better system monitor nload #network monitor fatrace #watch for unexpected disk accesses powertop #power monitoring and configuration intel-microcode #ZFS guide suggests running up to date microcode linux-headers-amd64 #will be needed for installing ZFS hdparm #used to set spindown for power savings samba #used for windows file sharing nfs-kernel-server #used for UNIX-like file sharing i2c-tools #needed for scanning the motherboard
Debian recommended installing ZFS by specifying the target release like so:
apt install -t bullseye-backports zfsutils-linux
Configuring Spindown
Note, this is a point of contention among many, and it is easy to end up with a system where your disks spin up and down too often. Keeping the disks up limits latency and wear and tear, but does cost power. In my case, the NAS lives in a small office with poor ventilation, and is not accessed often, so I enabled spindown
Edit /etc/hdparm.conf and uncomment or adjust(it means N * 5 seconds):
spindown_time = 24
Configure Swappiness
Because I placed a swap partition on a USB drive, I lowered the swappiness from default to 10. To do so, add a line(or file) to /etc/sysctl.d/local.conf with
vm.swappiness = 10