Thursday, March 1, 2012

Dealing with Catalog B-Tree Corruption in Mac OS X to Perform Successful Data Recovery

I recently got Mac OS X and was still a newbie to its file system organization. In the beginning, everything looked fine and I was very happy to use my Mac machine. I copied all the important stuff (i.e. Word files, presentations, and other data) to the new hard drive.

I was using PowerMac G4. But one thing that I noticed lately was horrible. My system had been locking up frequently. I decided to repair permissions and then verify the disk. But the verification process ended up abruptly giving me these errors:

"Invalid extent entry"
"Invalid catalog record type"
"underlying task reported failure on exit"

On rebooting the system, I was greeted with another one stating:

“Reserved fields in the catalog record have incorrect data”

I was screwed up and uncertain whether my problem was disk related or data related. I read something about the catalog records and their role in HFS file system.

As any other storage device, Mac drives are divided into one or more volumes. These volumes consist of files, directories, directory threads and file threads. Mac OS maintains a catalog record for each item stored on the volume This catalog record contains information about the respective item and is placed in the on-disk catalog B-tree. The Finder application searches the catalog B-tree to locate files in the directory.

There is an identification number for each file and directory that very much resembles an inode number in the Unix file system. Each file or directory is recognized by its parent and thus named using the parent’s identification number. This name is used as a search key to the catalog B-tree of the volume.

If the catalog records get corrupt due to some reasons like software application malfunctioning, system crash, etc., all files stored on the Mac hard drive would become inaccessible. I realized that I could be facing a similar issue. Since I was desperate to quickly recover all the lost data, I downloaded and tried the demo versions of various Mac data recovery tools.

This Mac Data Recovery Software was exceptional, It recovered all of my lost or deleted data within minutes, if not seconds. The software also supports recovery from removable media, such as USB drives, memory cards, iPods, etc. Moreover, it is compatible with all Intel based Mac and Power PC.