Update: Sadly, it appears I’m wrong. See the update at the bottom of this post and the comments. It was fun while it lasted. And my congrats to the Apple Time Machine UI team still stand. Brilliant. The original post follows.
Lest The Suspense Kill You: The Answer Is Yes
First of all, congrats to the Leopard Time Machine team for putting a beautiful and intuitive face on recovering data from snapshot copies. It is no accident that Scott Forstall, who introduced Time Machine at Apple’s World Wide Developers Conference, has the title “VP Platform Experience”. The Time Machine interface is brilliant.
ZFS On Leopard
I love competitive analysis, and this is a great example of the process. As I’ve noted before (see ZFS On Leopard: How Cool Is That?, Apple Mojo In High-End Storage and Bring Me The Head Of WinFS ) there is documented interest inside Apple in ZFS (for more info on ZFS see ZFS: Threat or Menace?), the coolest file system cum storage manager out there.
ZFS is open source, so it fits within Apple’s miniscule storage budget, and it has a lot of great features that would kick the Mac’s storage capabilities way beyond the aging NTFS used in Windows Vista.
Some of those great features are reflected in the Time Machine announcement.
- Time Machine “makes a complete backup of all the files on your system” including system files
- Infinite snapshots – the basis for Time Machine’s “time-based browser”
- Totally automatic – you select the drive to backup to, select the items you don’t want backed up – and it goes
Teasing Out The Truth
Now, I’ve been in Apple’s position of wanting to talk about a future product without blabbing about how the magic works. I’ve gone through the announcement video and all the Apple webpages that reference Time Machine. They’ve been carefully scrubbed of any reference to the underlying technology. That is the first clue: the lack of chest-beating about this great new technology says it is not Apple-developed. Even with the DTrace announcement, where they buried mention of DTrace, they did claim some invention.
Clue #2: TM Is Creating Disk Clones
Looking at the list of features above is telling as well. The first feature could be implemented using the Darwin command-line utility ditto. While nowhere does Apple mention creating a bootable copy, if you copy all the system files, including the invisible ones, preserve symbolic links and resource forks – and they do stress the “complete backup of all files” – we can safely assume the backup copy is bootable. So either they are using a Unix/Darwin utility or they are copying the entire filesystem.
Clue #3: TM Is More Than Cloning
The ability to preserve a file system’s state at a particular time is known as a snapshot or point-in-time copy. The Mojo is conceptually simple:
- A snapshot copy is created
- Thereafter, any disk blocks that are changed are first copied
- When returning to the snapshot copy, the copied blocks are substituted for the newly written blocks
This Copy-On-Write (COW) strategy minimizes data bloat – only the changed blocks are copied. Time Machine’s name and interface make snapshot copy management intuitive. TM’s snapshot copy capability is not easily added to Apple’s HFS+, which is why it hasn’t been done to date. Yet it is integral, and cheaper than overwriting existing data, in ZFS.
Clue #4: It Is “Set and Forget”
All backup software is fundamentally a kludge, since it is backing up files rather than blocks. So backups need to be scheduled, the application needs to run, and if the system is turned off or asleep, backup doesn’t happen. None of this applies to TM – so TM is not an application – but a system service. It has to be part of the file system, not some asynchronous agent that checks after the fact.
Clue #5: Remember When Apple Bought That Storage Software Company?
Me neither. Time Machine is non-trivial stuff, way beyond what Apple has done with file systems before. If they don’t claim they invented it, and they didn’t buy it, then they must have gotten it for free. ZFS is most advanced and solid open-source file system out there, so it gets my vote.
Any Caveats?
Well, there was the FireWire drive icon on the desktop of the demo system. ZFS would normally create a storage pool out of additional storage, rather than working with an individual virtual drive. However, if I were Apple, I’d want to reduce the changes users see, and having drives appear on the desktop is expected behavior.
Also, the option to not backup files surprised me – since ZFS works with file systems and manages data blocks. How could ZFS know to not back up a file? My theory is that TM accomplishes this trick using the individual file’s or folder’s Access Control List (ACL). I’m not a software engineer, so there may be a smarter method, but it is certainly plausible.
You Heard It Here First, Folks
So I conclude that Yes, Apple is incorporating ZFS into Leopard. Which is very cool, not only for us backup deprived users, but also for enterprise users of Xserve systems. ZFS offers many more capabilities than Time Machine uses. Over the next 10 months Apple will have a great opportunity to polish those up as well to give OS X users an unparalleled storage and data integrity experience.
w00t!
Comments always welcome!
Update: John C. Randolph says I’m wrong (see comments) and while he doesn’t identify himself further, a moment’s Googling reveals a John C. Randolph, Sr. Cocoa Software Engineer, in Apple Worldwide Developer Relations. Assuming they are one and the same I must reluctantly grant that he would know.
What I would love to hear now is how HFS+ will be re-engineered to actually deliver the data integrity and reliability implied by Time Machine.
And John, thanks for reading StorageMojo.com and commenting.
Sorry, but you’re wrong. Turns out that it’s done with HFS+ journaling.
-jcr
According to a message on the zfs-discuss list, it seems that they may not be doing it:
http://mail.opensolaris.org/pipermail/zfs-discuss/2006-August/004250.html
No way to be 100% sure until you get a copy of Leopard though.
Gosh, I hate it when I’m wrong. But I’m not (yet) convinced I am. As Adam Leventhal of the ZFS team notes – thanks for the link David – Time Machine would have a “. . . sort of dubious back end . . . .”
From a data integrity perspective, HFS+ isn’t that good. I’ve been using it for years, and without regular attention from Disk Warrior – not yet available for Intel-based Macs – it goes south slowly and surely, for all the reasons that ZFS was engineered to avoid.
Yet I did miss Apple’s line: “Time Machine will back up every night at midnight, unless you select a different time from this menu.” That is NOT ZFS-like behavior.
It also invites all the problems that people already have with existing backup solutions, such as the “my Mac was asleep so it didn’t get backed up” issue.
So, *sob,* I could be wrong. Yet if Apple bases Time Machine on journaled HFS+, they are exposing themselves to great customer unhappiness when it doesn’t work as advertised after a year. And they certainly aren’t going to have a competitive advantage over NTFS, with or without WinFS.
Sorry, guys, but no. It works just like Backup 3. It creates a sparse image and then copies the files onto it in stages. It’s not ZFS or using any special filesystem tricks; it’s just copying files incrementally on a schedule.
ZFS is not in the Leopard discussed at WWDC in any capacity.
There was no realistic chance of getting ZFS this quickly. Somebody in Apple expresses interest in a mailing list and then it gets ported and shipped in just a few months? No way. A major piece of functionality like that demands a long period of testing before it goes anywhere near users, let alone being trumpeted as a flagship product feature.
You have a point – and Apple’s use of HFS+ now doesn’t preclude moving to something better later.
Sun’s DTrace was released in late January 2005 under an open-source license. OS X support for DTrace was just announced this week. ZFS was released in mid-November, 2005. If Apple were porting it, would it take 18 months?
I have no idea how the complexity of integrating DTrace into the Darwin kernal compares to porting a file system like ZFS. I thought Unix was designed to allow file systems to be plugged in, yet there could be lots of dependencies in Aqua or ??? that I don’t grok.
Would any of my plugged in readers like to comment?
Another issue with ZFS is that it is currently case-sensitive. While this isn’t necessarily a show-stopper (OS X supports case-sensitive UFS), some developers–and a good portion of users–are not expecting, it so bugs may show up in odd places. Note Mac OS has used insensitive file systems since the beginning (HFS, HFS+).
The FreeBSD people have gotten a preliminary configuration of DTrace up in the 7.x development branch, but no one has gotten ZFS set up yet (on any OS; though I think there’s a port to FUSE). So it seems that DTrace is the easier of the two to port (for a sample size of two projects so far).
And while Unix does have a layer to abstract file systems, the architecture of ZFS is quite different than anything else before it, so just plugging it in isn’t easy. With Unix’s VFS you usually have a block device (e.g., disk) to deal with, so the VFS layer was built with that assumption. Most current volume management (e.g. Linux’s LVM, Veritas) actually present themselves as a block device to the file system.
So you would take a couple of disks, bring them together using LVM, and present them as a ‘disk’ to the file system you wanted to use (ext3, vxfs, Reiser, HFS, UFS). What ZFS does is replace both layers (what LVM and ext3 do), and roll them up into one architecture. Most file systems also assume a fixed size of writing blocks, while ZFS can have dynamic blocks (512B to 128KB), so that may expose assumptions in certain code (it was brought up as a concern by the DragonFly BSD developers).
P.S. Is it possible to have a ‘preview comment’ button? Proof reading stuff in this text area isn’t the greatest, and I like personally like to see how things are going to be rendered before submitted as well.
I would like to point out that this could only currently be a hack on the back end while Apple gets ZFS ready for next spring when Leopard is supposed to ship. It looks too much like the front end was made for ZFS snapshots.
well it seems he definitely WAS right afterall…
and the Apple guy a hoax 😉
afraid its not ZFS filesystem for time machine. Time machine works in developer builds on a HFS+ Drive. Well, HFS+ drive with 2 partitions in my case. But ZFS file support is included in the latest build. You can select it from a drop down list in Disk Utility, though currently it seems to be inactive. Bit of a dead link. It seems though apple have included hooks for support of ZFS for 10.5 though. If you google 10.5 Leopard Build 9A321, you can find screenshots showing ZFS in disk utility.
and now it seems that you are right!!! http://www.macrumors.com/2007/06/06/zfs-to-become-default-file-system-in-leopard/