149 points · by zdw · 6y ago · 120 comments
It allows programs to be run in response to sysevents, some of which are generated by ZFS and some of which are generated by other parts of the system (e.g., device hotplug).
http://manpages.ubuntu.com/manpages/bionic/man5/zfs-events.5...
If you are on Linux I can highly recommend ZFS and Minio for S3 like storage. ZFS for local storage.
Minio is barely documented. I had to ask in Slack to interpret what it meant when minio said "your cluster is 5 red and 7 yellow" as the colours aren't event documented.
Every minio cluster I hosted had dataloss. Each one has lead to a reported issue on their GitHub that hasn't been closed to date. Nothing about recovery is documented. Documentation is slim in general. Really confused why you're naming it next to ZFS which is sublimely documented and withstood the test of time.
I'd advise something battletested through time like Ceph for object storage instead.
Even Ceph has its warts for distributed object storage as does basically... anything in existence worth considering that's OSS-ish (GlusterFS, HDFS, Lustre) but comparing Minio to ZFS is confusing given how drastically different in purpose, functionality, and engineering hardening has happened between the two projects. With that said, the AWS S3 team really is impressive in what they've built out and deserves more shout-outs from people outside Amazon.
However, I'm slightly concerned that we haven't tested it enough, and that doc and support may prove to be lacking (like in your case) when we hit edge cases and failure scenarios.
No LTS version. Bugs will be fixed in a new version, which may include new bugs. Some upgrades need full cluster restart. If you ask too many question you may get "it's better start a subscription".
ZFS is fine, but it is overkill for most home applications and it has a pitfall related to extensibility.
https://louwrentius.com/what-home-nas-builders-should-unders...
https://louwrentius.com/the-hidden-cost-of-using-zfs-for-you...
So it really depends on your needs. Statements as "ZFS is the best filesystem" are so meaningless.
P.S. SSD caching often has no tangible practical benefit for most applications. More RAM is often the better investment. As is with any filesystem.
This is because ZFS is cached by the ARC, not the normal page cache. ARC is weird, and operates in 8K blocks (like sparc page size), rather than 4K pages. Zero-copy things like sendfile depend on referencing pages in the page cache, and have never been adapted to deal with ARC. So making sendfile zero-copy with ZFS is a hard project that would involve either teaching ARC to "loan" pages to sendfile, or ripping out ARC caching from ZFS and making it use the same page cache that all other filesystems use.
It all depends on the circumstances and requirements: (small) business application or some home-build NAS?
In your case, how much does it matter that some node experiences bitrot, and how big are those risks?
I started doing that because I saw corruptions on magnetic disks at home. Some files were silently corrupted. I had no redundancy. I didn't know which files were "good" either.
So now I have one multi disk machine running FreeBSD with zfs. Works well. Hardware isn't especially fancy. In the time since I have seen it catch hardware failures. I have seen it call out specific files as corrupt. This is a huge improvement over how I saw bad disks surface in the past.
Almost none of them have even ECC memory.
If you are building a home NAS from quality rackmounted server parts, then maybe you are fine. But this was not an option for me, as I did not have dedicated server space and needed something quiet. And once you have to start with to mess with desktop cases full of hard drives, it is very easy to get corrupted data.
I run ZFS on my home NAS. Yes, it (probably) eats too much RAM, and it (probably) not the fastest thing, but at least my data is intact. I had to piece together my photo collection from multiple backups, it was not fun at all.
A plain statement like this doesn't prove anything.
Yeah, not having silent data corruption is "overkill", sure. /s Why not use ZFS? It takes 15 seconds to install, and its CLI is fairly intuitive. Works fine. Costs $0. Why not, even for "home" applications?
I could see how it could be unsuitable for "entreprise" applications where there are strict performance requirements etc, but for home, I wish I could use ZFS everywhere.
It’s way at the far end of the “must RTFM to use safely, and then probably brush up on it again before actually doing anything unless you use it daily” spectrum of intuitiveness.
I like my ZFS mass storage volumes for my home server. I worry I’ll screw them up and/or burn an hour googling and reading the manual every time I have to touch them, though.
Even if it has a gui it's probably a non starter unless there are literally 2 options
You can check the status of each feature here: https://btrfs.wiki.kernel.org/index.php/Status
The legal position is that ZFS is open source under a copyleft license but that many people think that it's illegal to bundle it with the Linux kernel because of some (I think unintended) incompatibilities between its license and the Linux kernel's license. Canonical (and some others) disagree, and think that it's legal. It's only the bundling that's at issue - everyone agrees that it's legal to use with Linux once you have both.
See https://ubuntu.com/blog/zfs-licensing-and-linux for Canonical's opinion.
Here is some more info on the subject: https://sfconservancy.org/blog/2016/feb/25/zfs-and-linux/
"This means a module covered by the GPL and a module covered by the CDDL cannot legally be linked together."
I don't think the incompatibilities are really unintended. If anyone has enough lawyers and money to relicense something correctly, it's Oracle.
ZFS on Linux does not break the intention and spirit of the kernel licence.
Unless you're ok with data loss in the case of power-outage, you'll want to use a mirror for SLOG at the very least. You can do that by making a mirror from two partitions on separate SSDs and then adding that as the SLOG. The partitions do not have to be very large, just enough to handle a minute or so of writes, so 10GB or so should is often plenty.
Also keep in mind that ZFS does a lot of shuffling for the L2ARC. I had <1% L2ARC hits on my pool with a 128GB L2ARC partition, but almost a TB of writes per day to the L2ARC due to ZFS rotating data in and out of it.
Of course it isn't. There can't be a single best filesystem. For the use case of zfs, yes it is the best filesystem.
It's been that way for years throughout various ZFS versions, and it's driving me crazy.
Are there any simple to use tools that automatically compare same files from different source and tell if they are different. I have multiple copies of Data but not knowing which file is corrupted and working through it is a pain in the bottom.
I did briefly try ZFS on my laptop a year or so ago, and it ate up half of my RAM permanently. Since it was already fairly limited, that wasn't a sacrifice I wasn't willing to make either when I have plenty of backups anyway.
On your home desktop, you don't have to run dedup. You will get still the bitrot protection.
I hate the cargoculting on this fucking site.
On a desktop?
Chances are, that you don't have many users saving the same or slightly modified version of a file on the same storage. For a single person, it doesn't make much sense.
> "You can use ZFS just fine, just turn off one of its most useful features."
ZFS has many useful features. They come with a price though, because there's no free computation (see also laws of thermodynamics). It is then a matter of deciding, which features you want or need, and are willing to pay the price for.
You obviously are not willing the pay the price for dedup (lvmvdo asks for similar price, so it is not ZFS-specific), so why are you complaining that you cannot use it? ZFS still has many more useful features.
You also have another option: add RAM to your desktop. It is cheap. Then you will be able to use that one feature.
> I hate the cargoculting on this fucking site.
Sigh. I'm actually btrfs fan, all my data are on a btrfs volume (at work, we do use ZFS though, so I do have the experience). But that doesn't mean I won't point out something that the other club does well.
Please explain where this number comes from. I run ZFS on boxes with as little as 4GB of RAM, which are also doing all sorts of other things in addition to ZFS.
As with all filesystems on Linux, more RAM means more cache, and if you have free RAM you will benefit from a dynamically resized filesystem cache. That RAM is however not required and the cache can be evicted under memory pressure.
ZFS will use all available RAM for caching, unless you tell it otherwise (zfs_arc_max[1] or similar[2]), but it should release it when the system requires it[3].
[1]: https://docs.oracle.com/cd/E19253-01/817-0404/gjhec/index.ht...
(if you don't have any files) Doesn't do me much good with my 10TB's of data.