Steve won't be happy about that slip...

Jun 7, 2007 11:30 GMT  ·  By

With the grapevine so focused on the upcoming iPhone and the still due for update Macs, there has been little word on Leopard. Considering that Apple has so far managed to keep details about the upcoming operating system under wraps and with WWDC just a matter of days away, simply waiting for the keynote seemed best. However, information can come from the most unexpected sources at the most unexpected times. During the Sun event in Washington D.C. Jonathan Schwartz let a rather significant piece of information slip. It seems that Apple will be adopting ZFS as ?the file system? in Leopard.

Rumors connecting Apple and ZFS started popping up back in early 2006, when it became known that Apple had contacted Sun regarding porting ZFS to OS X. Later on, developers noticed that ZFS was offered as a file system option in the Leopard preview builds. Despite this not being totally out of the blue, nobody was expecting Apple to actually adopt ZFS as the file system in Leopard, instead of the current Journaled HFS+. Though unexpected, the move is definitely welcome as ZFS offers a host of improvements over other file systems. If this is a hint of what we can expect from the Top Secret features in Leopard, then the delay was definitely worth the wait.

Here is some information on ZFS: ZFS is a new kind of filesystem that provides simple administration, transactional semantics, end-to-end data integrity, and immense scalability. ZFS is not an incremental improvement to existing technology; it is a fundamentally new approach to data management. We've blown away 20 years of obsolete assumptions, eliminated complexity at the source, and created a storage system that's actually a pleasure to use.

ZFS presents a pooled storage model that completely eliminates the concept of volumes and the associated problems of partitions, provisioning, wasted bandwidth and stranded storage. Thousands of filesystems can draw from a common storage pool, each one consuming only as much space as it actually needs. The combined I/O bandwidth of all devices in the pool is available to all filesystems at all times.

All operations are copy-on-write transactions, so the on-disk state is always valid. There is no need to fsck(1M) a ZFS filesystem, ever. Every block is checksummed to prevent silent data corruption, and the data is self-healing in replicated (mirrored or RAID) configurations. If one copy is damaged, ZFS will detect it and use another copy to repair it.

ZFS introduces a new data replication model called RAID-Z. It is similar to RAID-5 but uses variable stripe width to eliminate the RAID-5 write hole (stripe corruption due to loss of power between data and parity updates). All RAID-Z writes are full-stripe writes. There's no read-modify-write tax, no write hole, and ? the best part ? no need for NVRAM in hardware. ZFS loves cheap disks.

But cheap disks can fail, so ZFS provides disk scrubbing. Like ECC memory scrubbing, the idea is to read all data to detect latent errors while they're still correctable. A scrub traverses the entire storage pool to read every copy of every block, validate it against its 256-bit checksum, and repair it if necessary. All this happens while the storage pool is live and in use.

ZFS has a pipelined I/O engine, similar in concept to CPU pipelines. The pipeline operates on I/O dependency graphs and provides scoreboarding, priority, deadline scheduling, out-of-order issue and I/O aggregation. I/O loads that bring other filesystems to their knees are handled with ease by the ZFS I/O pipeline.