Section 12.3. The Structure of an HFS Volume


12.3. The Structure of an HFS+ Volume

Figure 126 shows the structure of a representative HFS+ volume. Besides regular files and directories, an HFS+ volume contains (or may contain, since some are optional) the following entities.

  • Reserved areas appear at the beginning and end of the volume.

  • The volume header contains a variety of information about the volume, including the locations of the volume's other key data structures.

  • The alternate volume header is a copy of the volume header. It is located near the end of the volume.

  • The Catalog B-Tree stores the basic metadata for files and directories, including the first extent record (i.e., up to the first eight extents) for each file. The file system's hierarchical structure is also captured in the Catalog B-Tree through records that store parent-child relationships between file system objects.

  • The Extents Overflow B-Tree stores overflow (additional) extent records of files that have more than eight extents.

  • The Attributes B-Tree stores extended attributes for files and directories.

  • The Allocation file is a bitmap containing a bit for each allocation block, indicating whether the block is in use or not.

  • The private metadata folder is used for implementing hard links and for storing files that are deleted while they are open (/\xC0\x80\xC0\x80\ xC0\x80\xC0\x80HFS+ Private Data).

  • The Hot Files B-Tree is used by the built-in Hot File Clustering optimization mechanism for recording information about frequently accessed files (/.hotfiles.btree).

  • The Startup file is meant to contain arbitrary information that an operating system might use to boot from an HFS+ volume.

  • Journal files are used to hold information about the file system journal (/.journal_info_block) and the contents of the journal itself (/.journal).

  • Quota files are used to hold information pertaining to volume-level user quotas (/.quota.user) and group quotas (/.quota.group).

Figure 126. The structure of an HFS+ volume


In the rest of this chapter, we will explore the implementation and working of HFS+ by using hfsdebug to examine various aspects of the file system.




Mac OS X Internals. A Systems Approach
Mac OS X Internals: A Systems Approach
ISBN: 0321278542
EAN: 2147483647
Year: 2006
Pages: 161
Authors: Amit Singh

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net