Sex, files, and Disk Utility

‘Sexy’ is another of those sadly debased words, applied willy-nilly to almost anything however remotely erogenous.

Given man’s courtship with and in cars and aircraft, it might be appropriately used of something that shoots past in the twinkling of an eye. However, even when served on the tongues of geeks, it is hardly justifiable of system software internals.

File systems, like system kernels, are a specialist discipline, guaranteed to glaze the eyes of the average Mac user.

But when they are not right, or insufficiently friendly, they strike us all where it hurts most. Fifteen years ago, when Mac OS X was starting to boost our expectations of Apple, the Mac Extended (HFS+) file system was close to being state of the art. Today it has been eclipsed by newer competitors that lack its backward compatibility, but make life far easier and more productive.

Like popular Windows file systems, HFS+ is so primitive in its design concepts as to hark back to the days of floppy disks. Each physical storage device, such as a hard disk, is formatted into one or more volumes, and each volume contains a load of indexes and other information that are used to identify where on that volume the data making up each file are located.

If you want to spread a logical volume across two or more physical devices, as in a RAID system, this has to be handled by additional software, or hardware in the storage device.

Periodically the data stored in the indexes and other information stored on a volume may become corrupted, in which case the user has to detect the problem, often by losing time or data, and run a utility to try to repair the error(s). In the worst case, it may be impossible to recover the volume, and its entire contents have to be destroyed by re-initialisation.

Journalling provides a degree of protection and recovery from from minor errors, but is not robust in the face of more substantial problems. In short, storage devices require manual maintenance, and remain unreliable.

The leader among the competitors to HFS+ is ZFS, originally from Sun, and dubbed as being deeply ‘sexy’ by software engineers and system administrators alike.

Not too long ago, Apple seemed to be about to embrace it as the way ahead, at least for its server systems. But as so often happens, early tantalising glimpses of a brighter future never materialised. Although some have speculated why this reversal occurred, Apple’s corporate visage never blinked, and ZFS seemed to be forgotten again – at least until ex-Apple software engineer Don Brady announced that he intended offering it commercially.

ZFS is thoroughly modern, in that all the tedium of managing disks and volumes, running RAID sets, trying to preserve the integrity of your data, and wielding repair tools like Disk Utility (or fsck), all are dispensed with.

Checksums are used throughout the file system and data transfers to ensure that slow data degradation and corruption cannot occur; for example, if a checksum fails when retrieving data from a mirrored source, ZFS automatically fetches pristine data from the unspoilt copy, and writes it back to the corrupt location.

Physical storage devices are assembled into storage pools, then managed by the file system; ZFS abounds with other neat features such as simple and quick creation of compact snapshots of a storage pool.

In short, ZFS is the only file system that has a future, rather than just a glorious past. It may not be Woody Allen’s Orgasmotron, but is almost sexy.

Updated from the original, which was first published in MacUser volume 27 issue 10, 2011.

The bizarre thing is that ZFS has all but disappeared since: Don Brady’s efforts resulted in a free community edition of ZFS which had to be driven from the command line. No cool tool to configure and maintain a ZFS system was ever released, and despite the release of OpenZFS, MacZFS, and Zevo, there is currently no practical implementation available for OS X.

Even worse, Zevo was swallowed up by Oracle. If only Apple was to spend a few of its vast cash dollars on an engineering team with the likes of Don Brady. ZFS looks like being one of the biggest missed opportunities in computing. But it is still almost sexy.