Hierarchical File System is a file system for computers running Mac OS which is originally designed for floppy and hard disk. It can also be found on read-only media such as CD-ROMs. HFS is also referred to as Mac OS Standard (or, erroneously, "HFS Standard"), where its successor, HFS Plus, is also called Mac OS Extended (or, erroneously, "HFS Extended"). With the introduction of OS X 10.6, Apple has dropped support to format or write HFS disks and images, which are only supported as read-only volumes.
The Hierarchical File System divides a volume into logical blocks of 512 bytes. These logical blocks are then grouped together into allocation blocks which can contain one or more logical blocks depending on the total size of the volume. HFS uses a 16 bit value to address allocation blocks, limiting the number of allocation blocks to 65,535.
There are five structures that make up an HFS volume:
Logical blocks 0 and 1 of the volume are the Boot Blocks, which contain system startup information.
Logical block 2 contains the Master Directory Block (aka MDB). This defines a wide variety of data about the volume itself, for example date & time stamps for when the volume was created, the location of the other volume structures such as the Volume Bitmap or the size of logical structures such as allocation blocks. There is also a duplicate of the MDB called the Alternate Master Directory Block (aka Alternate MDB) located at the opposite end of the volume in the second to last logical block. This is intended mainly for use by disk utilities and is only updated when either the Catalog File or Extents Overflow File grow in size.
Logical block 3 is the starting block of the Volume Bitmap, which keeps track of which allocation blocks are in use and which are free. Each allocation block on the volume is represented by a bit in the map: if the bit is set then the block is in use; if it is clear then the block is free to be used. Since the Volume Bitmap must have a bit to represent each allocation block, its size is determined by the size of the volume itself.
The Extent Overflow File is a B-tree that contains extra extents that record which allocation blocks are allocated to which files, once the initial three extents in the Catalog File are used up. Later versions also added the ability for the Extent Overflow File to store extents that record bad blocks, to prevent the file system from trying to allocate a bad block to a file.
The Catalog File is another B-tree that contains records for all the files and directories stored in the volume. It stores four types of records. Each file consists of a File Thread Record and a File Record while each directory consists of a Directory Thread Record and a Directory Record. Files and directories in the Catalog File are located by their unique Catalog Node ID (or CNID).
Mac data recovery software - EaseUS Mac data recovery software supports data recovery on Mac OS X 10.7 (Lion) & 10.6 (Snow Leopard) & 10.5 (Leopard), compatible with HFS, HFS+, HFSX, HFS Wrapper and FAT file system volumes. It can recover all your lost/deleted/formatted data such as documents, images, files, videos, etc. from your Mac hard drive.
Copyright © 2005-2013 CHENGDU Yiwo® Tech Development Co., Ltd. ALL RIGHTS RESERVED.