Now for something completely different, I guess. You may wonder how someone can be excited about a file system. After all, that’s as boring as it gets, isn’t it? Fortunately, it isn’t, and I’ve been a huge fan of ZFS from the moment it got announced until today. Today, I’ll try to get you excited about it as well! Or rather, the OpenZFS flavor, as ZFS only works on Sun Solaris whereas OpenZFS is the variant that is actively maintained and available across a variety of operating systems.
ZFS is at its core a file system designed for file servers. That’s where it originated, and you can clearly see that heritage in two features:
- All the data is stored with checksums. Nothing can rot over time.
- It’s a copy-on-write file system which makes it ridiculously simple to create snapshots.
Combined with the ability to add read and write caching, various forms of redundancy, easy hot-plugging, the ability to incrementally backup, and support for files and block storage, it truly is a Swiss army knife in the storage space. The combination of being copy-on-write and check-summed means that I don’t have to worry about my data silently getting corrupted. I can also jump back in time in case I accidentally delete or overwrite a file (which is easy to script – if you’re curious, you can look at my ZFS snapshot script). There’s really no alternative either – BTRFS comes close but is nowhere nearly as mature as ZFS, and that’s about it in terms of competition.
I’ve been using it on my home servers and professionally for nearly a decade now, and I continue to be impressed by the stability and feature set. It’s also under constant development and new things like a persistent cache have been added recently. For me, the persistent cache was a big deal, as I tend to turn off my home server regularly over night and previously the cache was always discarded, rendering it useless for me. Another recently added feature to OpenZFS is Zstd compression which is great as I have lots of easily compressible data – like all my emails from the past 20 years. If file systems are of any interest to you at all, do give ZFS a try!