Live data from Hacker News

FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

rtfm.co.ua

21–30 of 54 posts

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#21
post #11

Is 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…

I'd avoid hardware RAID controllers when using ZFS, unless you can put it into "IT" mode or equivalent.

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#22
post #15
post #11

Is 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…

I 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.

I never found a good non-tutorial introduction into ZFS concepts. Do you know any? By non-tutorial, I mean something that doesn’t focus on teaching you the command-line tooling. Like you can explain to someone how Git works conceptually in detail, without having to mention any Git commands and having them exercise some Git workflow hands-on.

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#23
post #19
post #11

Is 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…

IMHO, there's not much hassle anymore, unless you seek it out. The FreeBSD installer will install to zfs just as well as ufs. This article seems to not take the least hassle path. Backups using zfs snapshots are pretty nice; you can pretty easily do incremental updates. zfs scrub is great to have. FreeBSD UFS also has snapshots, but doesn't have a mechanism to check data integrity: fsck checks for well formed metadat…

> you only really need a large amount of ram if you run with deduplication enabled, but very few use cases benefit from deduplication, so the better advice is to ensure you don't enable dedup

a lot of people parrot this, but you can always just check for yourself. the in-memory size of the dedupe tables scales with total writes to datasets with deduplication enabled, so for lots of usecases it makes sense to enable it for smaller datasets where you know it'll be of use. i use it to deduplicate fediverse media storage for several instances (and have for years) and it doesn't come at a noticeable ram cost.

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#25
I’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-shee...

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#26
post #19
post #11

Is 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…

IMHO, there's not much hassle anymore, unless you seek it out. The FreeBSD installer will install to zfs just as well as ufs. This article seems to not take the least hassle path. Backups using zfs snapshots are pretty nice; you can pretty easily do incremental updates. zfs scrub is great to have. FreeBSD UFS also has snapshots, but doesn't have a mechanism to check data integrity: fsck checks for well formed metadat…

The difference is zfs does a lot of work and makes a lot of promises that it proved the data is good at every step of the way while it's being handled, that other filesystems do not do.

So: "I copied the data and didn't really look at it much." and it ended up being corrupt,

is different from: "I promise I proved this is solid with math and logic." and it ended up being corrupt, complete with valid checksum that "proves" it's not corrupt.

A zfs scrub will actually destroy good data thanks to untrustworthy ram.

https://tadeubento.com/2024/aarons-zfs-guide-appendix-why-yo... "So roughly, from what Google was seeing in their datacenters, 5 bit errors in 8 GB of RAM per hour in 8% of their installed RAM."

It's not true to say that "Well all filesystem code has to rely on ram so it's all the same."

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#27
post #11

Is 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…

> Is zfs really worth the hassle, for someone who does not have time to play "home sysadmin" more than once or twice a year?

I'd argue that it's better for minimizing sysadmin work than the alternatives. Running a scrub, replacing a disk, taking a snapshot, restoring a snapshot, sending a snapshot somewhere (read: trivial incremental backups), etc. are all one command, and it's easy to work with.

> 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.

The reason I personally would prefer it in that situation is that I don't really trust the layers under the filesystem to protect data from corruption or even to notice when it's corrupted. If you're sufficiently confident that your hardware RAID1 will always store data correctly and never mess it up, then it's close enough. (I wouldn't trust it, but that's me.) At that point, the only benefit I see to ZFS would be snapshots; an incremental `zfs send` is more efficient than however else you're syncing to the cloud.

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#28

When 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://wiki.freebsd.org/BootEnvironments * https://man.freebsd.org/cgi/man.cgi?query=bectl * https://dan.langille.org/category/open-source/freebsd/bectl/ * https://vermaden.wordpress.com/2022/03/14/zfs-boot-environme... It lets you…

Boot environments saved my ass many a time in the last few years. One of my favorite features!

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#29
post #19

Earlier quoted context omitted.

IMHO, there's not much hassle anymore, unless you seek it out. The FreeBSD installer will install to zfs just as well as ufs. This article seems to not take the least hassle path. Backups using zfs snapshots are pretty nice; you can pretty easily do incremental updates. zfs scrub is great to have. FreeBSD UFS also has snapshots, but doesn't have a mechanism to check data integrity: fsck checks for well formed metadat…

> you only really need a large amount of ram if you run with deduplication enabled, but very few use cases benefit from deduplication, so the better advice is to ensure you don't enable dedup a lot of people parrot this, but you can always just check for yourself. the in-memory size of the dedupe tables scales with total writes to datasets with deduplication enabled, so for lots of usecases it makes sense to enable i…

> i use it to deduplicate fediverse media storage for several instances (and have for years) and it doesn't come at a noticeable ram cost.

Nice usecase. What kind of overhead and what kind of benefits do you see?

Re: FreeBSD: Home NAS, part 1 – configuring ZFS mirror (RAID1)

#30
post #22
post #15

Earlier quoted context omitted.

I 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.

I never found a good non-tutorial introduction into ZFS concepts. Do you know any? By non-tutorial, I mean something that doesn’t focus on teaching you the command-line tooling. Like you can explain to someone how Git works conceptually in detail, without having to mention any Git commands and having them exercise some Git workflow hands-on.

Did you read the fine manual?

https://openzfs.github.io/openzfs-docs/man/master/7/zpoolcon...

https://openzfs.github.io/openzfs-docs/man/master/8/zpool.8....

https://openzfs.github.io/openzfs-docs/man/master/8/zfs.8.ht...

Post reply on HN