Mac OS 8.1 and HFS Plus

© 1998 Lawrence I. Charters

Washington Apple Pi Journal, Vol. 20, no. 2, March-April 1998, pp. 36-39.

Apple released an update to Mac OS 8 in January, creating a blizzard of commentary and speculation in magazines, news groups, bulletin boards and Web sites. Mac OS 8.1 (the official name for Mac OS 8 once the update is applied) offers many fixes and improvements to the operating system, but the most revolutionary change is HFS Plus.

HFS: The Old Way

Since roughly 1986 or so, the Macintosh has stored data on disks (hard disks, floppy disks) using a scheme called HFS, or Hierarchical Filing System. Under HFS, the space on a volume is divided into equal-sized segments called “allocation blocks,” and the smallest size of an allocation block is 512 bytes. Additionally, any volume must have fewer than 65,535 allocation blocks. In 1986, when a floppy diskette held 800,000 bytes and a hard disk was possibly 5 megabytes, 65,535 blocks seemed almost limitless. But some quick math reveals that 65,000 times 512 bytes is 33 million bytes — a tiny amount of space by the standards of 1998.

If an HFS volume can have no more than 65,000 blocks, what happens when you start using larger and larger drives? The answer is — the allocation block size increases. To ridiculous extremes:

Size of drive — Allocation block size
32 megabytes — 512 bytes
64 megabytes — 1024 bytes
128 megabytes — 2048 bytes
256 megabytes — 4096 bytes
512 megabytes — 8192 bytes
1024 megabytes — 16,384 bytes
4 billion bytes — 65,536 bytes

On a four billion byte drive (about average in 1998), saving a document consisting of a single character, say the letter “a,” will consume just one byte. But the hard drive must allocate a block capable of holding 65,536 bytes to hold that one byte — a huge waste. Many Macintosh files actually come in two parts, a “data fork” and a “resource fork.” Without going into detail as to what these terms mean, in practice it is possible to store a single file (from the user’s point of view) that is, say, 200 bytes in size, but with a data fork and a resource fork. Since the forks must be stored separately, this means that this 200-byte file could actually end up using 131,072 bytes of disk space. If the user also wanted to give the file a spiffy custom color icon, this must be stored separately, too, meaning there would be three blocks consumed, for a total of 196,608 bytes of disk space — all to store this 200-byte file.

HFS Plus: The New Way

All of this was somewhat academic until the price of hard drive space started to plummet, and even “low end” computers started shipping with hard drives in the 2, 3, 4, and 5-gigabyte range. Owners of new Macs were alarmed to see very small files taking up colossal amounts of disk space. Various Internet hoaxes about disk-space consuming viruses that infected your computer after reading “infected” E-mail messages started to seem plausible. The real culprit — the 1986-vintage Hierarchical Filing System — seemed so esoteric that it was actually less credible, in the eyes of novice users.

So Apple, after years of research work and testing, released HFS Plus with Mac OS 8.1. There are a number of new features in HFS+ (some of which won’t be fully supported until future Mac OS updates), but the most obvious one is a more efficient use of storage space. Instead of a maximum of 65,000 blocks, HFS+ allows for slightly less than 4.3 billion blocks. Instead of the allocation block size increasing as the capacity of a volume increases, HFS+ permits some control over block size. The default is a 4K (4096) byte block size for volumes over one billion bytes. If you take this to extremes, it means that one volume could hold up to 4 billion blocks of data of 4096 bytes, which is 17,592 megabytes. Or a whole lot of data. Or possibly the size of next year’s version of Microsoft Office.

Rather than talk about HFS+ in terms of dry numbers, especially really big dry numbers, take a “real world” example. A brand-new Quantum three gigabyte (three billion byte) drive was formatted, first with HFS, then with HFS+. In both cases, a single software package, Claris Home Page 3.0, was then installed on the drive. Claris Home Page 3.0 is an excellent, extremely popular package for designing Web pages, with one somewhat frightening characteristic: it installs, literally, thousands of files on your hard drive. But it seems far less frightening on an HFS+ drive, as the screen shots show: it takes up only 18% as much drive space.

A three billion byte hard drive, formatted with Mac OS 8, shows that Claris Home Page 3.0 requires 277.3 million bytes of space to hold just 37.2 million bytes of data.
A three billion byte hard drive, formatted with Mac OS 8, shows that Claris Home Page 3.0 requires 277.3 million bytes of space to hold just 37.2 million bytes of data.
The same three billion byte drive, formatted with Mac OS 8.1 as an HFS Plus volume, shows that Claris Home Page 3.0 requires 50.3 million bytes of space to hold 37.2 million bytes of data — a huge improvement.
The same three billion byte drive, formatted with Mac OS 8.1 as an HFS Plus volume, shows that Claris Home Page 3.0 requires 50.3 million bytes of space to hold 37.2 million bytes of data — a huge improvement.

HFS Plus: How To

When the Mac OS 8.1 Update was first posted on Apple’s Web site (creating a huge international Internet traffic jam as the entire planet tried to download the 16 megabyte file), little mention was made of how to create HFS+ volumes. Apple and various other vendors did make it clear, however, that no existing disk formatting or recovery utilities supported HFS+, beyond Apple’s own Disk First Aid 8.1 and Drive Setup 1.4 (both included with Mac OS 8.1). So Mac OS 8.1 users were given a new technology, but no means to use it, right?

Not quite. If you have more than one volume (either two hard drives or one large hard drive divided up into multiple partitions), you can easily format an existing volume with HFS+ using the Finder:

  • Select the volume you want to format as an HFS+ volume. Make sure there is nothing on it you ever expect to see again, as the formatting erases the drive.
  • Go to the Special menu in the Finder, and select Erase Disk.
  • A dialog box will pop up, and under Format it now offers a new option: Mac OS Extended. Select this option and press the Erase button.
  • Presto! You have now created an HFS+ volume!
Selecting Erase Disk under the Finder's Special menu in Mac OS 8.1 offers you a new formatting option: Mac OS Extended. Select this option if you want to try out the new features of HFS+.
Selecting Erase Disk under the Finder’s Special menu in Mac OS 8.1 offers you a new formatting option: Mac OS Extended. Select this option if you want to try out the new features of HFS+.

Creating a startup volume formatted with HFS+ isn’t quite so easy. First, this trick is only allowed on Power Macs; while Mac OS 8.1 works on Centris, Quadra, and other 68040 machines, these machines support HFS+ on non-startup volumes only. Second, Apple (and everyone else with an ounce of caution) strongly recommends that startup volumes be left as regular HFS volumes, as this makes recovery, repair, and routine diagnostics much easier. Third, you need the full, bootable CD-ROM version of Mac OS 8.1 (not the free update) to create a startup HFS+ volume. Fourth, go back to the second point and read it again: this isn’t a good idea, so why even talk about it?

Protection Racket

One of the great advantages of the Macintosh is the ease and simplicity of adding, moving, removing, and generally experimenting with disk drives. This simplicity, of course, also offers the opportunity for doing Bad Things, and one Bad Thing would be trying to use an HFS+ volume with a machine running something earlier than Mac OS 8.1: it doesn’t work. So what happens when you try and view an HFS+ volume on a computer that doesn’t support it?

Things don’t work, of course. But, in typical Macintosh fashion, nothing bad happens, either, and the Mac goes out of its way to protect your data. If you try and open an HFS+ volume on a machine running something earlier than Mac OS 8.1, you get a window showing what appears to be a SimpleText file titled “Where_have_all_my_files_gone?” (Too bad Apple didn’t include a small music clip of “Where have all the flowers gone?” for all those Sixties children.) Double-clicking the file reveals a message which reads, in part:

Why can't you see your files?

This hard disk is formatted with the Mac OS Extended format. Your files and information are still on the hard disk, but you cannot access them with the version of system software you are using.

To access your files you must mount this hard disk on a computer that has Mac OS 8.1 or later installed…

The text file then goes on to explain how to purchase Mac OS 8.1, or how to update a Mac OS 8 computer to 8.1, complete with Apple’s Web site address.

Opening an HFS+ volume on a computer that doesn't support it (any Mac running something earlier than Mac OS 8.1) reveals this SimpleText file, with a title that begs you to read it. If you do, you'll discover all your files are still on the volume, just not available on machines running earlier versions of Mac OS.
Opening an HFS+ volume on a computer that doesn’t support it (any Mac running something earlier than Mac OS 8.1) reveals this SimpleText file, with a title that begs you to read it. If you do, you’ll discover all your files are still on the volume, just not available on machines running earlier versions of Mac OS.

This isn’t the only protection built in to HFS+, of course. What would happen if someone, frustrated at being unable to read the HFS+ volume, decided to simply erase it and start over? They can try &emdash; but their Macintosh won’t let them: as far as their Mac is concerned, the drive is “locked” (just like a floppy diskette with an open write-protect tab), preventing accidental erasure. Or malevolent erasure. Or confused and frustrated erasure.

If you attempt to erase an HFS+ volume on a Macintosh running something earlier than Mac OS 8.1, the Mac will cheerfully inform you that you can't: the disk is locked. This will prove to be an excellent safeguard in offices where external drives seem to migrate from one machine to another, or on machines with multiple startup volumes, some using Mac OS 8.1 and some using something earlier.
If you attempt to erase an HFS+ volume on a Macintosh running something earlier than Mac OS 8.1, the Mac will cheerfully inform you that you can’t: the disk is locked. This will prove to be an excellent safeguard in offices where external drives seem to migrate from one machine to another, or on machines with multiple startup volumes, some using Mac OS 8.1 and some using something earlier.

Is It A Good Thing?

While it is a major feature of Mac OS 8.1, HFS+ is not necessarily for everyone. If you don’t have drives in the gigabyte or larger range, you really don’t need the more space-efficient filing system. If you tend to create just a few really large files (such as QuickTime clips or large database files or massive Quark documents), the older HFS filing system is potentially faster and more efficient (since the Mac needs to access fewer, larger blocks to load these large files).

The lack of drive maintenance and recovery software is also a concern. At the time Mac OS 8.1 was released in January 1998, the “current” version of Symantec’s Norton Utilities, 3.5.1, did not support HFS+, so it could not be used to recover files, optimize fragmented disks, or do anything else. While Norton Utilities might be the most popular disk maintenance package, it isn’t the only one &emdash; but none of the others understand HFS+, either. Symantec released an estimate in January 1998 that it would take at least three months to write (from scratch), test and certify a new version of Norton Utilities capable of handing HFS+, and other vendors have given similar estimates.

On the other hand, HFS+ will be immediately adopted by most Macintosh programmers, all of whom suffer from trying to manage thousands of itty bitty code files that, under the older HFS, waste staggering amounts of disk space. Network managers will be tempted to create HFS+ volumes for their AppleShare 5.0.2 servers, greatly increasing the storage efficiency of the servers. Jane and Joe User, seduced by the lure of Something New, will try it, curious to see how well an HFS+ partition works on their new Power Mac G3 machine.

Most of these Early Adopters will have good experiences, and be quietly happy. Some will have bad experiences, and complain loudly. The vast majority will sit back and wait, gradually adopting HFS+ over time. In a year or two everyone will accept it, and possibly not even remember The Old Days of HFS.

R.I.P.