After 2 SSD crashes within 4 years with data loss, I decided I want a NAS box. Found a neat used semi-professional SOHO NAS box, only 3-4 years old, and since it's fairly decent hardware I'll also use it as a general-purpose server at home. For storage It has an internal USB 2 plug (inside the case), 2xNVMe 1.3 and 2xSATA III. For the setup of the base OS I have these options, and I'd like to hear your opinions which one is best:
- base OS / root on UFS filesystem on the internal USB flash drive.
This is the genuine setup of the Linux-based OS, already replaced with the real thing. I would use a 3 partition setup like nanobsd(8). I had that setup on a xterminal until it broke a while ago and liked it. You switch between two partitions on an update, these are read-only during normal operation, the 3rd partition is for the configuration files. Very clean design, easy to handle, if s/th goes wrong I can help myself. Thanks to geom_uzip(4) the system can reside on a very small USB thumb drive. Rollback after a failed update is easy, just boot from the other partition. Changes to the configuration would have to be managed by an external tool, I like the good old cvs(1) for that (IIRC rcs(1) can not be used by root, else I would take that because I don't need the "C" in cvs). - base OS on a zpool(8) on the internal USB stick
I have no experience with ZFS on an USB flash ("thumb") drive. I'd have an extra ROOT/default/etc dataset that I can rw/ro as needed, and also mount most of the base OS read-only during normal operation. /var could be a md(4) or tmpfs(4) like above, saved to the stick or to the data disks regularly. ZFS compression would keep the size small, like in the 1st option. Creation of a new boot environment on every update makes rollback easy. Changes in the configuration would be tracked twice: 1. with automatic snapshots, either regular or triggered by a file monitor 2. with an external tool like above. - base OS on the NVMe SSD with ZFS
Maybe the most natural setup? I want to use the NMVe drives mainly for L2ARC cache, intent log (mirrored), maybe special (mirrored) vdevs and swap. Placing the OS here would take away some space, but having ZFS on a "real" disk device appeals me because I have all the bells and whistles of ZFS vs. "boring" UFS. - OS on the SATA HDD, but I don't like that. I'd like to have the base OS separate from the data.
Last edited: