Live data from Hacker News

ZFS: Apple's new filesystem that wasn't (2016)

ahl.dtrace.org

171–180 of 209 posts

Re: ZFS: Apple's new filesystem that wasn't (2016)

#171

As a desktop user, I am content with APFS. The only feature from ZFS that I would like, is the corruption detection. I honestly don't know how robust the image and video formats are to bit corruption. On the one hand, potentially, "very" robust. But on the other, I would think that there are some very special bits that if toggled can potentially "ruin" the entire file. But I don't know. However, I can say, every time…

Back in 2011, Apple paid $500 million for Anobit, a company producing enterprise grade SSD controllers.

Since Apple was already integrating custom SSD controllers onto their A series SOCs, presumably the purchase was about Anobit patents.

> Anobit appears to be applying a lot of signal processing techniques in addition to ECC to address the issue of NAND reliability and data retention... promising significant improvements in NAND longevity and reliability. At the high end Anobit promises 50,000 p/e cycles out of consumer grade MLC NAND

https://www.anandtech.com/show/5258/apple-acquires-anobit-br...

Apple has said in the past that they are addressing improved data stability at the hardware level, presumably using those acquired patents.

> Explicitly not checksumming user data is a little more interesting. The APFS engineers I talked to cited strong ECC protection within Apple storage devices... The devices have a bit error rate that's low enough to expect no errors over the device's lifetime.

https://arstechnica.com/gadgets/2016/06/a-zfs-developers-ana...

Re: ZFS: Apple's new filesystem that wasn't (2016)

#172
post #27
post #20

Earlier quoted context omitted.

> ZFS is notorious for corrupting itself when bit flips hit it and break the checksum on disk. What's a bit flip?

Basically it's that memory changes out from under you. As we know, computers use Binary, so everything boils down to it being a 0 or a 1. A bit flip is changing what was say a 0 into a 1. Usually attributed to "cosmic rays", but really can happen for any number of less exciting sounding reasons. Basically, there is zero double checking in your computer for almost everything except stuff that goes across the network.…

"Basically, there is zero double checking in your computer for almost everything except stuff that goes across the network."

This is so not true.

All the high speed busses (QPI, UPI, DMI, PCIe, etc.) have "bit flip" protection in multiple layers: differential pair signaling, 8b/10b (or higher) encoding, and packet CRCs.

Hard drives (the old spinning rust kind) store data along with a CRC.

SSD/NVMe drives use strong ECC because raw flash memory flips so many bits that it is unusable without it.

If most filesystems don't do integrity checks it's probably because there's not much need to.

Re: ZFS: Apple's new filesystem that wasn't (2016)

#173

As a desktop user, I am content with APFS. The only feature from ZFS that I would like, is the corruption detection. I honestly don't know how robust the image and video formats are to bit corruption. On the one hand, potentially, "very" robust. But on the other, I would think that there are some very special bits that if toggled can potentially "ruin" the entire file. But I don't know. However, I can say, every time…

Yeah, of course ZFS on macOS is a disaster, the people trying to make it work are what? Two people? One heroic dude?

But I agree with you about the most important feature that Apple failed on.

I lament Apple's failure to secure ZFS as much as the next Mac user, but I understood that ship to have sailed when it did, around a decade ago.

But as a desktop user, I almost threw up in my mouth when APFS came out with no checksums for user data. I'd assumed if they were going to pass on ZFS they would reimplement the most critical feature. But they didn't. I know I've lost data because of it, and if you have a few TB of data, I suspect you have, too.

Not lost permanently, because I had manually-checksummed backups. But lost in the sense that the copies of the data made on macOS were corrupted and different, and the OS/filesystem simply didn't notice. Oops!

Once you've used ZFS, that's unforgivable. I mean, ZFS has had some bugs, over the years (well mainly just last year lol), and a small number of users have lost data due to that. But to silently lose data by design? Fuck all the way off. It's 2025, not 1985.

So while APFS has some cool modern features (or at least two), it's an embarassment. (And all my non-ephemeral storage is now on Linux.)

Re: ZFS: Apple's new filesystem that wasn't (2016)

#174
post #149

"Still another version I’ve heard calls into question the veracity of their purported friendship, and has Steve instead suggesting that Larry go f*ck himself. Normally the iconoclast, that would, if true, represent Steve’s most mainstream opinion." LOL!! I really hope they weren't friends, that really shatters my internal narrative (mainly because I can't actually picture either of them having actual friends).

Embarrassed to say I had forgotten writing that and LOLed myself… no more reliable audience for your sense of humor than yourself!

Re: ZFS: Apple's new filesystem that wasn't (2016)

#175
Not to pointlessly nitpick, but:

> HFS improved upon the Macintosh File System by adding—wait for it—hierarchy! No longer would files accumulate in a single pile; you could organize them in folders.

MFS did allow you to organize your files into folders, but on-disk they were represented as a single list of files with unique filenames - meaning you could have 'resume.txt' in a folder called 'Jan's Docs' but you couldn't also have 'resume.txt' in a folder called 'Jake's Docs' - every file on the disk needed to have a unique filename.

Not so much an issue in the days of 400KB floppy drives, but once people started getting 20 MB hard drives that was going to be an unacceptable limitation.

The other major benefit of HFS was that it stored file data in a B-tree, which allowed directory information to be stored effectively hierarchically, meaning you could find a directory's contents very quickly. With MFS, every file being stored in a single list meant that any time you wanted to get a directory's contents you had to read through that list of every file on the disk to see which ones were stored in that directory, so every listing of any directory was O(n) for the total number of files on the disk.

Re: ZFS: Apple's new filesystem that wasn't (2016)

#176
post #98

Earlier quoted context omitted.

>I find that most BSD users don't really care about such legalese and most people I know that run FreeBSD are running ZFS on root. What a weird take. BSD's license is compatible with ZFS, that's why. "Don't really care?" Really? Come on.

I just mean that GPL is a bit of a religion. There are very strong opinions and principles behind it. Whereas the BSD license is more like "do whatever you want". It makes sense that the followers of the former care more deeply about it, right? Personally I don't care about or obey any software licenses, as a user. But this is kinda the vibe I get from other BSD users if a license discussion comes up. Maybe it's my b…

I have to strongly disagree with you that GPL is a religion. While there Are certainly people who sound religious in nature when they talk about the GPL, The real reason it is important is because of what it forces developers to do on behalf of the users. It balances somewhat the power between the developer and the user.

Under other licensing, developers wield an extraordinary amount of power over the users. Yes, The user could opt not to run that code, but realistically that isn't an option in the modern day. Developers can and will abuse their access to your machine to serve their ends regardless of whether it adds value to you or not. For example, how much data collection is in nearly all modern software?

Perhaps you would argue that what I've said above only applies to a very tiny minority of users who have the technical skills to actually utilize the code, and everyone else It's just a religious argument. I don't fully disagree with that. There is another clear benefit That even those untechnical users received from the GPL, and that is the essentially forced contribution back from companies who want to build on top of it. I don't think there's any better example than the Linux kernel, which has gotten lots of contributions from companies that are otherwise very proprietary in nature and would never have open sourced things. This has benefited everyone and has acted as a rising tide lifting All boats. Without the requirements in the GPL, this most certainly would not happen.

My response to it however, is that those users still get a good amount of protection because The code is out there

Re: ZFS: Apple's new filesystem that wasn't (2016)

#177

Earlier quoted context omitted.

Internet connections of the day didn't yet offer enough speed for cloud storage. Apple was already working to integrate ZFS when Oracle bought Sun. From TFA: > ZFS was featured in the keynotes, it was on the developer disc handed out to attendees, and it was even mentioned on the Mac OS X Server website. Apple had been working on its port since 2006 and now it was functional enough to be put on full display. However,…

Was it not open source at that point?

Sure, but what sane person would not expect Oracle to continue to be litigious?

I imagine the situation would have been different if Apple's ZFS integration had completed and shipped before Sun's demise.

They didn't rip out DTrace, after all.

Re: ZFS: Apple's new filesystem that wasn't (2016)

#178
post #151

Earlier quoted context omitted.

Exactly this. The business case for providing a robust desktop filesystem simply doesn’t exist anymore. 20 years ago, (regular) people stored their data on computers and those needed to be dependable. Phones existed, but not to the extent they do today. Fast forward 20 years, and many people don’t even own a computer (in the traditional sense, many have consoles). People now have their entire life on their phones, ba…

You do realise that in your use cases you still need reliable filesystems both in the cloud and on devices. Because any corruption at any point will get synced as a change, or worse can cause failure.

Not with any proper erasure coded distributed filesystem, you just trash and replace the entire drive and let ceph or whatever distributed storage solution you use rebalance the shards from other nodes. You don't need the filesystem to be reliable on a device level, you just need basic checksums for integrity checking and enough parity on the cluster level to replace bad drives.

Re: ZFS: Apple's new filesystem that wasn't (2016)

#179
post #169
post #155

Earlier quoted context omitted.

Seems specious. Patents don't preclude one from overtly trying to compete; they protect specific mechanisms. In this case either ZFS didn't use the same mechanisms or the mechanisms themselves were found to have prior art.

Whether the claims were valid or not I guess we'll never know given Oracle and NetApp decided to settle. What I DO knows is that if the non-infringement were as open and shut as you and Bryan are suggesting, Apple probably wouldn't have scrapped years of effort and likely millions in R&D for no reason. It's not like they couldn't afford some lawyers to defend a frivelous lawsuit...

There was lots of prior art from the 80s for "write anywhere", which is a generally a consequence of copy-on-write on-disk formats. The write-anywhere thing is not really what's interesting, but, rather, not having to commit to some number of inodes at newfs time. Sun talking about NetApp makes sense given that they were the competition.

We don't know exactly what happened with Apple and Sun, but there were lots of indicia that Apple wanted indemnification and Sun was unwilling to go there. Why Apple really insisted on that, I don't know -- I think they should have been able to do the prior art search and know that NetApp probably wouldn't win their lawsuits, but hey, lawsuits are a somewhat random function and I guess Apple didn't want NetApp holding them by the short ones. DTrace they could remove, but removing ZFS once they were reliant on it would be much much harder.

Re: ZFS: Apple's new filesystem that wasn't (2016)

#180
post #168

Earlier quoted context omitted.

No, the ZFS team did not "literally reference NetApp and WAFL" in their presentations and no, Sun did not "start it" -- NetApp initiated the litigation (though Sun absolutely countersued), and NetApp were well on their way to losing not only their case but also their WAFL patents when Oracle acquired Sun. Despite having inherited a winning case, Oracle chose to allow the suit to be dismissed[0]; terms of the settleme…

We can agree to disagree. Your own link states that Sun approached NetApp about patents 18 months prior to the lawsuit being filed (to be clear that was Storagetek before Sun acquired them): >The suit was filed in September 2007, in Texas, three years ago, but the spat between the two started 18 months before that, according to NetApp, when Sun's lawyers contacted NetApp saying its products violated Sun patents, and…

> The file system that has come closest to our design principles, other than ZFS itself,is WAFL[8],the file system used internally by Network Appliance’s NFS server appliances.

That was unnecessary, but that does not betray even the slightest risk of violating NetApp's patents. It just brings attention.

Also, it's not true! The BSD 4.4 log-structured filesystem is such a close analog to ZFS that I think it's clear that it "has come closest to our design principles". I guess Bonwick et. al. were not really aware of LFS. Sad.

LFS had:

  - "write anywhere"
  - "inode file"
  - copy on write
LFS did not have:

  - checksumming
  - snapshots and cloning
  - volume management
And the free space management story on LFS was incomplete.

So ZFS can be seen as adding to LFS these things:

  - checksumming
  - birth transaction IDs
  - snapshots, cloning, and later dedup
  - proper free space management
  - volume management, vdevs, raidz
I'm not familiar enough with WAFL to say how much overlap there is with WAFL, but I know that LFS long predates WAFL and ZFS. LFS was prior art! Plus there was lots of literature on copy-on-write b-trees and such in the 80s, so there was lots of prior art in that space.

Even content-addressed storage (CAS) (which ZFS isn't quite) had prior art.

Post reply on HN