Just got all the hardware set up and working today, super stoked!
In the pic:
- Raspberry Pi 5
- Radxa Penta SATA hat for Pi
- 5x WD Blue 8TB HDD
- Noctua 140mm fan
- 12V -> 5V buck convertor
- 12V (red), 5V (white), and GND (black) distribution blocks
I went with the Raspberry Pi to save some money and keep my power consumption low. I’m planning to use the NAS for streaming TV shows and movies (probably with Jellyfin), replacing my google photos account (probably with Immich), and maybe steaming music (not sure what I might use for that yet). The Pi is running Raspberry Pi Desktop OS, might switch to the server version. I’ve got all 5 drives set up and I’ve tested out streaming some stuff locally including some 4K movies, so far so good!
For those wondering, I added the 5V buck convertor because some people online said the SATA hat doesn’t do a great job of supplying power to the Pi if you’re only providing 12V to the barrel jack, so I’m going to run a USB C cable to the Pi. Also using it to send 5V to the PWM pin on the fan. Might add some LEDs too, fuck it.
Next steps:
- Set up
RAID 5ZFS RAIDz1? - 3D print an enclosure with panel mount connectors
Any tips/suggestions are welcome! Will post again once I get the enclosure set up.
Yes, it prevents bit rot. It’s why I switched to it from the standard mdraid/LVM/Ext4 setup I used before.
The instructions seem correct but there’s some room for improvement.
Instead of using logical device names like this:
sudo zpool create zfspool raidz1 sda sdb sdc sdd sde -f
You want to use hardware IDs like this:
sudo zpool create zfspool raidz1 /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA2FERAP /dev/disk/by-id/wwn-0x5000cca27dc48885 ...
You can discover the mapping of your disks to their logical names like this:
ls -la /dev/disk/by-id/*
Then you also want to add these options to the command:
sudo zpool create -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa zfspool ...
These do useful things like setting optimal block size, compression (basically free performance), a bunch of settings that make ZFS behave like a typical Linux filesystem (its defaults come from Solaris).
Your final create command should look like:
sudo zpool create -o ashift=12 -o autotrim=on -O acltype=posixacl -O compression=lz4 -O dnodesize=auto -O normalization=formD -O relatime=on -O xattr=sa zfspool raidz1 /dev/disk/by-id/ata-ST8000VN0022-2EL112_ZA2FERAP /dev/disk/by-id/wwn-0x5000cca27dc48885 ...
You can experiment till you get your final creation command since creation/destruction is nearly instant. Don’t hesitate to create/destroy multiple times till you got it right.