Nepedia
Back to Discover
Advanced Reader
💻

HFS Plus

technology Maturity 11-13 Next article →

HFS Plus, also known as Mac OS Extended, is a journaling file system. It was created by Apple Inc. to organize data on storage disks. A file system acts as the master organizer for a computer. It manages how files are stored, named, and retrieved. HFS Plus served as the primary system for Apple computers for many years. It replaced the older Hierarchical File System, or HFS. It remained the main system until the Apple File System, or APFS, arrived in 2017.

The system works by dividing a disk into very small pieces called sectors. Most sectors are 512 bytes in size. HFS Plus groups these sectors into larger units called allocation blocks. To find these blocks, the system uses 32-bit addresses. This was a major upgrade from the 16-bit addresses used in HFS. The old HFS system could only track 65,536 blocks. HFS Plus can track 4,294,967,296 blocks. This allows the system to manage much larger disks efficiently.

Without this improved addressing, large disks would waste a lot of space. For example, on a 1 GB disk, HFS used 16 KB allocation blocks. This meant even a tiny 1-byte file would take up 16 KB of space. HFS Plus solves this by using a more precise mapping table. The system also uses B-trees to organize metadata. Metadata is the information that describes the files themselves. This structure helps the computer find data quickly. HFS Plus also supports Unicode for naming files. This allows for much more complex names than the old Mac OS Roman character set.

A typical HFS Plus volume is built from nine distinct structures. The Volume Header is located at sector 2. It stores vital data like the size of allocation blocks and timestamps. The Allocation File tracks which blocks are free or in use. It uses a bit to represent each block. A zero means the block is free, while a one means it is occupied. The Catalog File is a B-tree containing records for every file and folder. In modern macOS, these records are 8 KB in size. The Extents Overflow File records extra data about where files are stored on the disk.

Other important structures include the Attributes File and the Startup File. The Attributes File stores different types of 4 KB records. These include Inline Data, Fork Data, and Extension Attributes. The Startup File helps non-Mac systems interact with the volume. There is also an Alternate Volume Header near the end of the disk. This acts as a backup for the main Volume Header. Finally, the very last sector is reserved for Apple's use during manufacturing.

The history of HFS Plus is marked by many updates. It was first released on January 19, 1998, with Mac OS 8.1. During development, it was known by the codename Sequoia. In 2002, Apple added journaling to the system. Journaling improves data reliability by keeping a log of changes. By Mac OS X 10.3, all volumes were journaled by default. This version also introduced HFSX, a version that supports case-sensitive names. Later, Mac OS X 10.5 added directory hard-linking for the Time Machine backup tool.

Apple also added several specialized features over time. Mac OS X 10.6 introduced HFS+ compression using a method called Deflate. This allows files to take up less space. In Mac OS X 10.7, Apple added logical volume encryption called FileVault 2. This was managed by a tool called Core Storage. HFS Plus is also used by the iPod digital music player. While it is a powerful system, it lacks some modern features. It does not support data checksums or nanosecond timestamps. It also lacks support for sparse files, which are used in other modern systems.

632 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.