News for hackers. Stuff that matters.
Re:ZFS 2.3.0 released with ZFS raidz expansion by endorphine on Tuesday January 14, 2025 @03:55AM (#42695153)
Can someone describe why they would use ZFS (or similar) for home usage?
Re:ZFS 2.3.0 released with ZFS raidz expansion by vedranm on Tuesday January 14, 2025 @04:02AM (#42695195)
Several reasons, but major ones (for me) are reliability (checksums and self-healing) and portability (no other modern filesystem can be read and written on Linux, FreeBSD, Windows, and macOS).

Snapshots ("boot environments") are also supported by Btrfs (my Linux installations use that so I don't have to worry about having the 3rd party kernel module to read my rootfs). Performance isn't that great either and, assuming Linux, XFS is a better choice if that is your main concern.

Re:ZFS 2.3.0 released with ZFS raidz expansion by Mashimo on Tuesday January 14, 2025 @04:10AM (#42695246)
It's relatively easy, and yet powerful. Before that I had MDADM + LVM + dm-crypt + ext4, which also worked but all the layers got me into a headache.

Automated snapshots are super easy and fast. Also easy to access if you deleted a file, you don't have to restore the whole snapshot, you can just cp from the hidden .zfs/ folder.

I run it on 6x 8TB disk for a couple of years now. I run it in a raidz2, which means up to 2 disk can die. Would I use it on a single disk on a Desktop? Probably not.

Re:ZFS 2.3.0 released with ZFS raidz expansion by redundantly on Tuesday January 14, 2025 @04:37AM (#42695428)
> Would I use it on a single disk on a Desktop? Probably not.

I do. Snapshots and replication and checksumming are awesome.

Re:ZFS 2.3.0 released with ZFS raidz expansion by lutorm on Tuesday January 14, 2025 @03:59AM (#42695177)
Apart from just peace of mind from bitrot, I use it for the snapshotting capability which makes it super easy to do backups. You can snapshot and send the snapshots to other storage with e.g zfs-autobackup and it's trivial and you can't screw it up. If the snapshots exist on the other drive, you know you have a backup.
Re:ZFS 2.3.0 released with ZFS raidz expansion by nesarkvechnep on Tuesday January 14, 2025 @04:05AM (#42695217)
I'm trying to find a reason not to use ZFS at home.
Re:ZFS 2.3.0 released with ZFS raidz expansion by dizhn on Tuesday January 14, 2025 @05:53AM (#42695866)
Requirement for enterprise quality disks, huge RAM (1 gig per TB), ECC, at least x5 disks of redundancy. None of these are things, but people will try to educate you anyway. So use it but keep it to yourself. :)
Re:ZFS 2.3.0 released with ZFS raidz expansion by craftkiller on Tuesday January 14, 2025 @07:14AM (#42696313)
No need to keep it to yourself. As you've mentioned, all of these requirements are misinformation so you can ignore people who repeat them (or even better, tell them to stop spreading misinformation).

For those not in the know:

You don't need to use enterprise quality disks. There is nothing in the ZFS design that requires enterprise quality disks any more than any other file system. In fact, ZFS has saved my data through multiple consumer-grade HDD failures over the years thanks to raidz.

The 1 gig per TB figure is ONLY for when using the ZFS dedup feature, which the ZFS dedup feature is widely regarded as a bad idea except in VERY specific use cases. 99.9% of ZFS users should not and will not use dedup and therefore they do not need ridiculous piles of ram.

There is nothing in the design of ZFS any more dangerous to run without ECC than any other filesystem. ECC is a good idea regardless of filesystem but its certainly not a requirement.

And you don't need x5 disks of redundancy. It runs great and has benefits even on single-disk systems like laptops. Naturally, having parity drives is better in case a drive fails but on single disk systems you still benefit from the checksumming, snapshotting, boot environments, transparent compression, incremental zfs send/recv, and cross-platform native encryption.

Re:ZFS 2.3.0 released with ZFS raidz expansion by bbatha on Tuesday January 14, 2025 @12:10PM (#42700224)
> The 1 gig per TB figure is ONLY for when using the ZFS dedup feature, which the ZFS dedup feature is widely regarded as a bad idea except in VERY specific use cases. 99.9% of ZFS users should not and will not use dedup and therefore they do not need ridiculous piles of ram.

You also really don't need a 1GB for RAM unless you have a very high write volume. YMMV but my experience is that its closer to 1GB for 10TB.

Re:ZFS 2.3.0 released with ZFS raidz expansion by JZerf on Wednesday January 15, 2025 @01:54AM (#42708126)
One reason why it might be a good idea to use higher quality drives when using ZFS is because it seems like in some scenarios ZFS can result in more writes being done to the drive than when other file systems are used. This can be a problem for some QLC and TLC drives that have low endurance.

I'm in the process of setting up a server at home and was testing a few different file systems. I was doing a test where I had a program continuously synchronously writing just a single byte every second (like might happen for some programs that are writing logs fairly continuously). For most of my tests I was just using the default settings for each file system. When using ext4 this resulted in 28 KB/s of actual writes being done to the drive which seems reasonable due to 4 KB blocks needing to be written, journaling, writing metadata, etc... BTRFS generated 68 KB/s of actual writes which still isn't too bad. When using ZFS about the best I could get it to do after trying various settings for volblocksize, ashift, logbias, atime, and compression settings still resulted in 312 KB/s of actual writes being done to the drive which I was not pleased with. At the rate ZFS was writing data, over a 10 year span that same program running continuously would result in about 100 TB of writes being done to the drive which is about a quarter of what my SSD is rated for.

Re:ZFS 2.3.0 released with ZFS raidz expansion by craftkiller on Wednesday January 15, 2025 @12:38PM (#42714222)
One knob you could change that should radically alter that is zfs_txg_timeout which is how many seconds ZFS will accumulate writes before flushing them out to disk. The default is 5 seconds, but I usually increase mine to 20. When writing a lot of data, it'll get flushed to disk more often, so this timer is only for when you're writing small amounts of data like the test you just described.

> like might happen for some programs that are writing logs fairly continuously

On Linux, I think journald would be aggregating your logs from multiple services so at least you wouldn't be incurring that cost on a per-program basis. On FreeBSD with syslog we're doomed to separate log files.

> over a 10 year span that same program running continuously would result in about 100 TB of writes being done to the drive which is about a quarter of what my SSD is rated for

I sure hope I've upgraded SSDs by the year 2065.

Re:ZFS 2.3.0 released with ZFS raidz expansion by dizhn on Wednesday January 15, 2025 @04:26PM (#42717277)
>I sure hope I've upgraded SSDs by the year 2065.

My mind jumped at that too when I first read parent's comment. But presumably he's writing other files to disk too. Not just that one file. :)

Re:ZFS 2.3.0 released with ZFS raidz expansion by JZerf on Thursday January 16, 2025 @12:51AM (#42721779)
> But presumably he's writing other files to disk too. Not just that one file.

Yes, there will be much more going on than the simple test I was doing. The server will be hosting several VMs running a mix of OSes and distros and running many types types of services and apps.

Re:ZFS 2.3.0 released with ZFS raidz expansion by JZerf on Thursday January 16, 2025 @12:50AM (#42721772)
> One knob you could change that should radically alter that is zfs_txg_timeout which is how many seconds ZFS will accumulate writes before flushing them out to disk.

I don't believe that zfs_txg_timeout setting would make much of a difference for the test I described where I was doing synchronous writes.

> On Linux, I think journald would be aggregating your logs from multiple services so at least you wouldn't be incurring that cost on a per-program basis.

The server I'm setting up will be hosting several VMs running a mix of OSes and distros and running many types types of services and apps. Some of the logging could be aggregated but there will be multiple types of I/O (various types of databases, app updates, file server, etc...) and I wanted to get an idea of how much file system overhead there might be in a worst case kind of scenario.

> I sure hope I've upgraded SSDs by the year 2065.

Since I'll be running a lot of stuff on the server, I'll probably have quite a bit more writing going on than the test I described so if I used ZFS I believe the SSD could reach its rated endurance in just several years.

Re:ZFS 2.3.0 released with ZFS raidz expansion by tpetry on Tuesday January 14, 2025 @10:15AM (#42698194)
The interesting part about the enterprise quality disk misinformation is how so wrong it is. The core idea of ZFS was to detect issues when those drives or their drivers are faulty. And this was more happening with cheap non-enterprise disks at that time.
Re:ZFS 2.3.0 released with ZFS raidz expansion by chromakode on Tuesday January 14, 2025 @04:28AM (#42695375)
I replicate my entire filesystem to a local NAS every 10 minutes using zrepl. This has already saved my bacon once when a WD_BLACK SN850 suddenly died on me [1]. It's also recovered code from some classic git blunders. It shouldn't be possible any more to lose data to user error or single device failure. We have the technology.

[1]: https://chromakode.com/post/zfs-recovery-with-zrepl/

Re:ZFS 2.3.0 released with ZFS raidz expansion by mrighele on Tuesday January 14, 2025 @05:08AM (#42695624)
Good reasons for me:

Checksums: this is even more important in home usage as the hardware is usually of lower quality. Faulty controllers, crappy cables, hard disks stored in a higher than advised temperature... many reasons for bogus data to be saved, and zfs handles that well and automatically (if you have redundancy)

Snapshots: very useful to make backups and quickly go back to an older version of a file when mistakes are made

Ease of mind: compared to the alternatives, I find that zfs is easier to use and makes it harder to make a mistake that could bring data loss (e.g. remove by mistake the wrong drive when replacing a faulty one, pool becomes unusable, "ops!", put the disk back, pool goes back to work as nothing happened). Maybe it is different now with mdadm, ma when I used it years ago I was always worried to make a destructive mistake.

Re:ZFS 2.3.0 released with ZFS raidz expansion by EvanAnderson on Tuesday January 14, 2025 @01:12PM (#42701331)
> Snapshots: very useful to make backups and quickly go back to an older version of a file when mistakes are made

Piling on here: Sending snapshots to remote machines (or removable drives) is very easy. That makes snapshots viable as a backup mechanism (because they can exist off-site and offline).

Re:ZFS 2.3.0 released with ZFS raidz expansion by ryao on Tuesday January 14, 2025 @05:23AM (#42695702)
To give an answer that nobody else has given, ZFS is great for storing Steam games. Set recordsize=1M and compression=zstd and you can often store about 33% more games in the same space.

A friend uses ZFS to store his Steam games on a couple of hard drives. He gave ZFS a SSD to use as L2ARC. ZFS automatically caches the games he likes to run on the SSD so that they load quickly. If he changes which games he likes to run, ZFS will automatically adapt to cache those on the SSD instead.

Re:ZFS 2.3.0 released with ZFS raidz expansion by chillfox on Tuesday January 14, 2025 @09:24AM (#42697545)
The compression and ARC will make games load much master than they would on NTFS even without having a separate drive for the ARC.
Re:ZFS 2.3.0 released with ZFS raidz expansion by bmicraft on Tuesday January 14, 2025 @05:39PM (#42704927)
As I understand, L2ARC doesn't work across reboots which unfortunately makes it almost useless for systems that get rebooted regularly, like desktops.
Re:ZFS 2.3.0 released with ZFS raidz expansion by olavgg on Tuesday January 14, 2025 @09:57PM (#42706804)
L2ARC has had persistence support for a few years now.
Re:ZFS 2.3.0 released with ZFS raidz expansion by bmicraft on Wednesday January 15, 2025 @03:50PM (#42716757)
Wow thanks for pointing that out, apparently it's been around for four years since with the first 2.0 release without me noticing.
Re:ZFS 2.3.0 released with ZFS raidz expansion by NamTaf on Tuesday January 14, 2025 @06:11AM (#42695965)
I used it on my home NAS (4x3TB drives, holding all of my family's backups, etc.) for the data security / checksumming features. IMO it's performant, robust and well-designed in ways that give me reassurance regarding data integrity and help prevent me shooting myself in the foot.
Re:ZFS 2.3.0 released with ZFS raidz expansion by PaulKeeble on Tuesday January 14, 2025 @07:51AM (#42696581)
I have a home built NAS that uses ZFS for the storage array and the checksumming has been really quite useful in detecting and correcting bit rot. In the past I used MDADM and EXT over the top and that worked but it didn't defend against bit rot. I have considered BTRFS since it would get me the same checksumming without the rest of ZFS but its not considered reliable for systems with parity yet (although now I think it likely is more than reliable enough now).

I do occasionally use snapshots and the compression feature is handy on quite a lot of my data set but I don't use the user and group limitations or remote send and receive etc. ZFS does a lot more than I need but it also works really well and I wouldn't move away from a checksumming filesystem now.

Re:ZFS 2.3.0 released with ZFS raidz expansion by mshroyer on Tuesday January 14, 2025 @08:04AM (#42696681)
I use it on a NAS for:

- Confidence in my long-term storage of some data I care about, as zpool scrub protects against bit rot

- Cheap snapshots that provide both easy checkpoints for work saved to my network share, and resilience against ransomware attacks against my other computers' backups to my NAS

- Easy and efficient (zfs send) replication to external hard drives for storage pool backup

- Built-in and ergonomic encryption

And it's really pretty easy to use. I started with FreeNAS (now TrueNAS), but eventually switched to just running FreeBSD + ZFS + Samba on my file server because it's not that complicated.

Re:ZFS 2.3.0 released with ZFS raidz expansion by zbentley on Tuesday January 14, 2025 @08:37AM (#42697023)
I use ZFS for boot and storage volumes on my main workstation, which is primarily that--a workstation, not a server or NAS. Some benefits:

- Excellent filesystem level backup facility. I can transfer snapshots to a spare drive, or send/receive to a remote (at present a spare computer, but rsync.net looks better every year I have to fix up the spare).

- Unlike other fs-level backup solutions, the flexibility of zvols means I can easily expand or shrink the scope of what's backed up.

- It's incredibly easy to test (and restore) backups. Pointing my to-be-backed-up volume, or my backup volume, to a previous backup snapshot is instant, and provides a complete view of the filesystem at that point in time. No "which files do you want to restore" hassles or any of that, and then I can re-point back to latest and keep stacking backups. Only Time Machine has even approached that level of simplicity in my experience, and I have tried a lot of backup tools. In general, backup tools/workflows that uphold "the test process is the restoration process, so we made the restoration process as easy and reversible as possible" are the best ones.

- Dedup occasionally comes in useful (if e.g. I'm messing around with copies of really large AI training datasets or many terabytes of media file organization work). It's RAM-expensive, yes, but what's often not mentioned is that you can turn it on and off for a volume--if you rewrite data. So if I'm looking ahead to a week of high-volume file wrangling, I can turn dedup on where I need it, start a snapshot-and-immediately-restore of my data (or if it's not that many files, just cp them back and forth), and by the next day or so it'll be ready. Turning it off when I'm done is even simpler. I imagine that the copy cost and unpredictable memory usage mean that this kind of "toggled" approach to dedup isn't that useful for folks driving servers with ZFS, but it's outstanding on a workstation.

- Using ZFSBootMenu outside of my OS means I can be extremely cavalier with my boot volume. Not sure if an experimental kernel upgrade is going to wreck my graphics driver? Take a snapshot and try it! Not sure if a curl | bash invocation from the internet is going to rm -rf /? Take a snapshot and try it! If my boot volume gets ruined, I can roll it back to a snapshot in the bootloader from outside of the OS. For extra paranoia I have a ZFSBootMenu EFI partition on a USB drive if I ever wreck the bootloader as well, but the odds are that if I ever break the system that bad the boot volume is damaged at the block level and can't restore local snapshots. In that case, I'd plug in the USB drive and restore a snapshot from the adjacent data volume, or my backup volume ... all without installing an OS or leaving the bootloader. The benefits of this to mental health are huge; I can tend towards a more "college me" approach to trying random shit from StackOverflow for tweaking my system without having to worry about "adult professional me" being concerned that I don't know what running some random garbage will do to my system. Being able to experiment first, and then learn what's really going on once I find what works, is very relieving and makes tinkering a much less fraught endeavor.

- Being able to per-dataset enable/disable ARC and ZIL means that I can selectively make some actions really fast. My Steam games, for example, are in a high-ARC-bias dataset that starts prewarming (with throttled IO) in the background on boot. Game load times are extremely fast--sometimes at better than single-ext4-SSD levels--and I'm storing all my game installs on spinning rust for $35 (4x 500GB + 2x 32GB cheap SSD for cache)!

Re:ZFS 2.3.0 released with ZFS raidz expansion by E39M5S62 on Tuesday January 14, 2025 @09:48PM (#42706755)
It's great to hear that you're using ZFSBootMenu the way I envisioned it! There's such a sense of relief and freedom having snapshots of your whole OS taken every 15 minutes.

One thing that you might not be aware of is that you can create a zpool checkpoint before doing something 'dangerous' (disk swap, pool version upgrade, etc) and if it goes badly, roll back to that checkpoint in ZFSBootMenu on the Pool tab. Keep in mind though that you can only have one checkpoint at a time, they keep growing and growing, and a rollback is for EVERYTHING on the pool.

Re:ZFS 2.3.0 released with ZFS raidz expansion by zbentley on Tuesday January 14, 2025 @11:44PM (#42707403)
Oh, are you zdykstra? If so, thanks for creating an invaluable tool!

> you can create a zpool checkpoint before doing something 'dangerous' (disk swap, pool version upgrade, etc) and if it goes badly, roll back to that checkpoint in ZFSBootMenu on the Pool tab

Good to know! Snapshots meet most of my needs at present (since my boot volume is a single fast drive, snapshots ~~ checkpoints in this case), but I could see this coming in useful for future scenarios where I need to do complex or risky things with data volumes or SAN layout changes.

Re:ZFS 2.3.0 released with ZFS raidz expansion by tbrownaw on Tuesday January 14, 2025 @09:03AM (#42697306)
> describe why they would use ZFS (or similar) for home usage

Mostly because it's there, but also the snapshots have a `diff` feature that's occasionally useful.

Re:ZFS 2.3.0 released with ZFS raidz expansion by klauserc on Tuesday January 14, 2025 @10:00AM (#42698005)
I use it on my work laptop. Reasons:

- a single solution that covers the entire storage domain (I don't have to learn multiple layers, like logical volume manager vs. ext4 vs. physical partitions) - cheap/free snapshots. I have been glad to have been able to revert individual files or entire file systems to an earlier state. E.g., create a snapshot before doing a major distro update. - easy to configure/well documented

Like others have said, at this point I would need a good reason, NOT to use ZFS on a system.