5 ms·
FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)
- TacticalCoder 10mo agoThis is getting lots of upvotes and rightfully so. I think people would love more posts about FreeBSD: especially about ZFS and bhyve (the FreeBSD hypervisor). It's a bit sad that this Lenovo ThinkCentre ain't using ECC. I use and know ZFS is good but I'd prefer to run it on a machine supporting ECC. I never tried FreeBSD but I'm reading more and more about it and it looks like although FreeBSD has always had its regular users, there are now quite some people curious about trying it out. For a variety of reasons. The possibility of having ZFS by default and an hypervisor without systemd is a big one for me (I run Proxmox so I'm halfway there but bhyve looks like it'd allow me to be completely systemd free). I'm running systemd-free VMs and systemd-free containers (long live non-systemd PID ones) so bhyve looks like it could the final piece of the puzzle to be free of Microsoft/Poettering's systemd.
- grayxu 10mo agoother filesystems are just as susceptible to data corruption from memory errors. this is not a weakness unique to ZFS.
- jccx70 10mo ago"I think people would love more posts about FreeBSD" Translate to: "I would love more post..."
- feisty0630 10mo agoYou express a desire for more FreeBSD posts and then immediately wade into all the typical flame-warring that surrounds most BSD/ZFS posts (systemd, ECC RAM), and it's been that way for over a decade at this point.
- zenoprax 10mo agoIs your desktop or laptop using ECC? For data that you are actively modifying the time that it spends on non-ECC RAM on the server is trivial compared to your desktop or laptop. I'll take ZFS without ECC over hardware RAID with ECC any day.
- throw0101a 10mo agoWhen setting up root-on-ZFS on FreeBSD, it's worth knowing about boot environments (a concept originally from Solaris): * https://klarasystems.com/articles/managing-boot-environments/ https://klarasystems.com/articles/managing-boot-environments... * https://wiki.freebsd.org/BootEnvironments https://wiki.freebsd.org/BootEnvironments * https://man.freebsd.org/cgi/man.cgi?query=bectl https://man.freebsd.org/cgi/man.cgi?query=bectl * https://dan.langille.org/category/open-source/freebsd/bectl/ https://dan.langille.org/category/open-source/freebsd/bectl/ * https://vermaden.wordpress.com/2022/03/14/zfs-boot-environments-revolutions/ https://vermaden.wordpress.com/2022/03/14/zfs-boot-environme... It lets you patch/upgrade an isolated environment without touching the running bits, reboot into that environment, and if things aren't working well boot back into the last known-good one.
- polyduekes 10mo agooh, i didnt knew the concept is taken from Solaris, which version of Solaris? and is there any official source that indicates it is from Solaris?
- throw0101a 10mo ago> bectl and this manual page were derived from beadm(8). * https://man.freebsd.org/cgi/man.cgi?query=bectl#end https://man.freebsd.org/cgi/man.cgi?query=bectl#end > beadm(1M) originally appeared in Solaris. * https://man.freebsd.org/cgi/man.cgi?query=beadm#end https://man.freebsd.org/cgi/man.cgi?query=beadm#end Solaris Live Upgrade BEs worked with (mirrored) UFS root: * https://docs.oracle.com/cd/E18752_01/html/821-1910/chapter-5.html https://docs.oracle.com/cd/E18752_01/html/821-1910/chapter-5... * https://www.filibeto.org/sun/lib/solaris8-docs/_solaris8_2_02_update_collection/806-7933.pdf https://www.filibeto.org/sun/lib/solaris8-docs/_solaris8_2_0... It allowed/s for migration from UFS to ZFS root: * https://docs.oracle.com/cd/E23823_01/html/E23801/ggavn.html https://docs.oracle.com/cd/E23823_01/html/E23801/ggavn.html
- mgerdts 10mo agoThe original idea of boot environments in Solaris came from Live Upgrade, which worked at least as far back as Solaris 8. Live upgrade was not part of Solaris, rather it was an addon that came from the services or enterprise support parts of Sun. Solaris 11 made boot environments a mandatory part of the OS, which was an obvious choice with the transition from UFS to ZFS for the root fs. This came into Solaris development a bit before Solaris 11, so it was present in OpenSolaris and lives on in many forms of illumos.
- toyg 10mo agoIs zfs really worth the hassle, for someone who does not have time to play "home sysadmin" more than once or twice a year? I've just rebuilt my little home server (mostly for samba, plus a little bit of docker for kids to play with). It has a hardware raid1 enclosure, with 2TB formatted as ext4, and the really important stuff is sent to the cloud every night. Should I honestly bother learning zfs...? I see it popping up more and more but I just can't see the benefits for occasional use.
- olavgg 10mo agoThe biggest advantage of ZFS from a operational experience, is that when you have problems, ZFS tells you why. Checksum errors? Something wrong with the hard drive or SATA/SAS cables. Is the disk slow, zfs events will tell you that it spent more than 5 seconds to read sector x from disk /dev/sdf. The zfs cli commands are super-intuitive, and makes fully sense. Compared to ie. virsh, which is just weird for managing vm's. It definitely worth the hassle. But if everything works fine for you now, don't bother. ZFS is not going away and you can learn it later.
- deltarholamda 10mo agoIf you are interested in keeping backups, including the ability to go back in time to recover accidentally deleted/changed files, then ZFS with its reliable snapshot facility is fantastic. Other file systems offer some version of this, e.g. btrfs, but they don't have the same reliability as ZFS. Snapshots on ZFS are extremely cheap, since it works on the block level, so snapshots every hour or even 15 minutes are now doable if you so wish. Combine with weekly or monthly snapshots that can be replicated off-site, and you have a pretty robust storage system. This is all home sysadmin stuff to be sure, but even if you just use it as a plain filesystem, the checksum integrity guarantees are worth the price of admission IMO. FWIW, software RAID like ZFS mirrors or mdm is often superior to hardware raid especially for home use. If your raid controller goes blooey, which does happen, unless you have the exact same controller to replace it, you run a chance of not being able to mount your drives. Even very basic computers are fast enough to saturate the drives in software these days.
- rabf 10mo agoI found thst ZFS to be very simple to understand, everything is controlled by just two commands. Datasets are huge win over partitions which seem like such a weird relic of the past once you have tried datasets. Fairly confident you can grasp ZFS in a hour or 2, you can even make a zfs pool from files to mess around with.
- srean 10mo agoAnyone knows how to search HN comments using Algolia for "RAID". Is there some secret support for case sensitive search ?
- ComputerGuru 10mo agoI’m primarily a ZFS-on-FreeBSD kind of guy but I repeatedly had need of doing ZFS-on-Linux recently and after a couple of times wrote it up for others. There are a lot of these guides, the difference is that this one tries to be idiomatic, using “native” tooling (eg systemd, love it or hate it) to do the job as “correctly” on Linux as possible: https://neosmart.net/blog/zfs-on-linux-quickstart-cheat-sheet/ https://neosmart.net/blog/zfs-on-linux-quickstart-cheat-shee...
- cramcgrab 10mo agoYou always want to boot from simple. Zfs is great for additional volumes. Great work by the author.
- grigio 10mo agoTrueNAS is Linux Debian nowdays
- okigan 10mo agoWith all respect to FreeBSD. It seems weird in 2025/2026 we are still discussing the baseline of getting a storage working. Feels we’re spending too much time discussing the trees and not enough time getting the forest going: * we need reliable local storage * integrated backup * apps installation / management * remote access and account management * app isolation, reliable updates
- bhouston 10mo agoI've run my own Home NAS on ZFS for 4 years or so. In the end I ended up with majority NVMe setup with long-term archival storage on HDDs. This made my NAS much more useful / ergonomic since I can search, move files at 10Gbps speeds. I really hated the pause when opening up directories, etc. Details here: https://benhouston3d.com/blog/home-network-lessons https://benhouston3d.com/blog/home-network-lessons
- gigatexal 10mo agoWith the metadata stuff they added you could put metadata on nvme and keep the spinning rust. All flash is nice though but not as economical as this.
- rolymath 10mo agoZero mentions of btrfs? For anyone reading in the future: ZFS is better for multi-disk setups. Btrfs for e.g laptop etc. Fedora and Arch use btrfs by default now if I remember correctly.