HFS Plus is a volume format for the Mac operating system. It was first introduces with MAC OS 8.1. The structure of the older HFS and the new HFS Plus are very similar, although there are several changed and improvements. First the old file system used 16 bit block allocations and the new file system utilizes 32 but. The old file system was limited to only 31 characters per file name. We can now use up to 255 characters. Among other things this significantly improves cross platform compatibility.
The file name encoding has changed from the proprietary MacRoman to the universal Unicode format. The actual node size per catalog entry has increased significantly from 512 bytes to 4 KB (Kilobytes).
The fundamental goals which had been planned and achieved with the development of the new HPS Plus file system have been:
- Efficient use of disk space
- International-friendly file names
- Ease booting and cross platform compatibility
- Future support for named forks
HFS+ divides the total space on a volume into equal chunks called allocation blocks. These allocation blocks are 32 bit in size. All of the volume’s structures, including the volume header, are part of one or more allocation blocks. Every volume must have a volume header, it contains the volume creation date and time as well the amount of files stored on the volume and a pointer to the other key structures on the volume. The volume header is always located at 1024 bytes from the start of the volume. An alternative volume header also exists. It is a copy of the actual volume header and is stored on the last 1024 bytes at the end of the volume.
There are 5 specific metadata files in an HFS Plus volume:
- The Catalog file
- The extents overflow file
- The allocation file
- The attribute file
- The startup file
The catalog file:
The Catalog file contains the file and folder hierarchy on a volume. This information is stored in a B-tree.
The attribute file:
Contains additional data for the file and folders such as access control lists. It is also stored in a B-tree format.
The extents overflow file:
An extend is a continuous range of allocation blocks allocated to some fork. The first 8 extents are stored in the catalog file any additional extents after that are stored in the extents overflow file. The extents overflow file is also stored in a B-tree format. This is somewhat similar to how some small file allocation references are stored in the MFT when we examine an NTFS file system, but any large files references are stored in data runs.
The allocation file:
Is a file that specifies if an allocation block is freely available, or if it has been used. It performs the same function as the HFS volume bitmap, but since it is a file, it has more flexibility to work with. This would be equivalent to a bitmap on an NTFS file system.
The startup file:
It has been designed for non-Mac OS systems that don not have HFS or HFS Plus support. It is similar to the Boot Block of an HFS volume.