Tech —

ZFS: The other new Apple file system that almost was—until it wasn’t

In file systems as in all else, Steve Jobs' favor was a fickle thing.

A premature announcement by Sun's then-CEO Jonathan Schwartz might have doomed ZFS on OS X.
Enlarge / A premature announcement by Sun's then-CEO Jonathan Schwartz might have doomed ZFS on OS X.
Photo by Justin Sullivan / Getty — Edited by Aurich Lawson
This article was originally published on Adam Leventhal's blog and is reprinted here with his permission.

I attended my first WWDC in 2006 to participate in Apple's launch of its DTrace port to the next version of Mac OS X (Leopard). Apple completed all but the fiddliest finishing touches without help from the DTrace team. Even when Apple did meet with us, we had no idea that it was mere weeks away from the finished product being announced to the world. DTrace was a testament both to Apple's engineering acumen as well as its storied secrecy.

At that same WWDC, Apple announced Time Machine, a product that would record file system versions through time for backup and recovery. How was it doing this? We were energized by the idea that there might be another piece of adopted Solaris technology. When we launched Solaris 10, DTrace shared the marquee with ZFS, a new filesystem that was to become the standard against which other filesystems are compared. Key among the many features of ZFS were snapshots that made it simple to capture the state of a filesystem, send the changes around, recover data, etc. Time Machine looked for all the world like a GUI on ZFS (indeed, the GUI that we had imagined but knew to be well beyond the capabilities of Sun).

Time Machine! Not quite as magic as it seemed at first blush.
Time Machine! Not quite as magic as it seemed at first blush.

Of course, Time Machine had nothing to do with ZFS. After the keynote we rushed to an Apple engineer we knew. With shame in his voice he admitted that it was really just a bunch of hard links to directories. For those who don't know a symlink from a symtab, this is the equivalent of using newspaper as insulation: it's fine until the completely anticipated calamity destroys everything you hold dear.

So there was no ZFS in Mac OS X, at least not yet.

2007: Not so fast

A few weeks before WWDC 2007, nerds like me started to lose their minds. Apple really was going to port ZFS to Mac OS X. It was actually going to happen! Beyond the snapshots that would make backups a cinch, ZFS would dramatically advance the state of data storage for Apple users. HFS was introduced in System 2.1 ("System" being what we called "Mac OS" in the days before operating systems gained their broad and ubiquitous sex appeal). 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. Not that there were many to organize on those 400K floppies, but progress is progress.

Only one person at Steve Jobs' company announces new products:
Steve Jobs.

That filesystem has limped along for more than 30 years—nudging forward, being rewritten to avoid in-kernel Pascal code (though retaining Pascal-style, length-prefixed strings) but never fully reimagined or reinvented. Even in its most modern form, HFS+ lacks basic functionality around data integrity. Bugs, power failures, and expected and inevitable media failures all mean that data is silently altered. Pray that your old photos are still intact. When's the last time you backed up your Mac? I'm backing up right now, just like I do every time I think about the neglectful stewardship of HFS+.

ZFS was to bring to Mac OS X data integrity, compression, checksums, redundancy, snapshots, and more. But while energizing Mac/ZFS fans, Sun CEO Jonathan Schwartz clumsily disrupted the momentum ZFS had been gathering in Apple's walled garden. Apple had been working on a port of ZFS to Mac OS X. It was planning on mentioning it at the upcoming WWDC. Schwartz, brought into the loop either out of courtesy or legal necessity, violated the cardinal rule of the Steve Jobs-era Apple. Only one person at Steve Jobs' company announces new products: Steve Jobs.

"In fact, this week you'll see that Apple is announcing at [its] Worldwide Developer Conference that ZFS has become the file system in Mac OS 10," mused Jonathan at a press event, apparently in an attempt to bolster Sun's own credibility.

Less than a week later, Apple spoke about ZFS only when it became clear that a port was indeed present in a developer version of Leopard, albeit in a nascent form. Yes, ZFS would be there, sort of, but it would be read-only, and no one should get their hopes up.

2008: Ray of hope

By the next WWDC, it seemed that Sun had been forgiven. 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. I took it for a spin myself; it was really real. The feature that everyone wanted (but most couldn't say why) was coming!

Channel Ars Technica