HFS Plus often referred to as HFS+ was developed by Apple Inc. as a replacement for the Hierarchical File System (HFS) serving as the primary file system of OS X and OS X Server systems. HFS+ was introduced on January 19, 1998 with the release of Mac OS 8.1. HFS had served well for early Apple Mac computers, but had many limitations which were overcome with the development of HFS+.
HFS+ Data Volume Features
HFS Plus is able to address 232 allocation blocks, which allows a volume size of 8EB as well as a maximum file size of 8EB. HFS+ uses data forks, similar in form to the Additional Data Streams (ADS) used in NTFS volumes. Resource and data forks were the only additional streams used until 2006.
From the release of Mac OS X v10.3 onwards, journaling has been set by default on all HFS Plus volumes. This allows the possibility of the file system to be recovered from a crash or power failure, when the operating system is booted. The release of Mac OS X Snow Leopard 10.6 saw the addition of compression to HFS+, also referred to as AppleFSCompression. The compressed data is stored as either an extended attribute or in the resource fork.
HFS+ Internal Data Structures
The first two sectors of the file system are blank followed by the HFS Plus Volume Header, with an alternate copy stored in the second to last sector, as a backup. The Volume Header contains all the information required by the operating system to mount the file system, which includes the locations of all the system areas and other important metadata.
Included within the system areas are contained the locations of the Allocation File, Catalog File, Extents Overflows and Attributes File. With the exception of the Allocation File, these system areas are all stored in the form of a B-Tree. Using a B-Tree keeps the information sorted, which allows for fast searching, sequential access, insertions and deletions. The data blocks for file storage are located immediately following the initial Catalog File allocation. Any extents required for each of the system files is stored with the main data block pool.
HFS Plus Volume Recovery
Reformatting an HFS+ volume or a bad sector or corruption of some key sectors may render the data on the volume almost completely unrecoverable. This may leave a data trawl as the only viable option which can recover any usable data. If the header of the Catalog File is damaged many data recovery solutions are unable to handle process the data volume. The DiskEng in-house developed software is however able to overcome this problem, confining any data loss to only that caused by further damage in other areas of the file system.