Repairing a broken disk volume on a Mac



One of my Lacie firewire drives would not mount, and disk utility failed to repair it. I am running Mac OS X 1.2.8. Googling gives some pointers to commercial programs like Disk Warrier and Disk Rescue, but this thread gives a fast solution.

Running

sudo fsck_hfs -rfd /dev/rdisk1s9

gives as output:


** /dev/rdisk1s9
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Rebuilding Catalog B-tree.
** Rechecking volume.
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
   Missing thread record (id = 37172)
** Checking Catalog hierarchy.
   Missing thread record (id = 37155)
   Invalid directory item count
   (It should be 0 instead of 1)
   Invalid directory item count
   (It should be 23 instead of 25)
   Missing thread record (id = 37141)
   Invalid directory item count
   (It should be 0 instead of 13)
   Missing thread record (id = 37157)
   Invalid directory item count
   (It should be 0 instead of 11)
   Missing thread record (id = 37170)
   Invalid directory item count
   (It should be 0 instead of 1)
   Missing thread record (id = 37172)
** Checking volume bitmap.
   Volume Bit Map needs minor repair
** Checking volume information.
   Invalid volume free block count
   (It should be 26883555 instead of 26839050)
   Verify Status: VIStat = 0xa000, ABTStat = 0x0000 EBTStat = 0x0000
                  CBTStat = 0x0800 CatStat = 0x4200
** Repairing volume.
** The volume Media2 was repaired successfully.
        volume type is embedded HFS+
        primary MDB is at block 2 0x02
        alternate MDB is at block 320171222 0x13156cd6
        primary VHB is at block 24466 0x5f92
        alternate VHB is at block 320168910 0x131563ce
        sector size = 512 0x200
        VolumeObject flags = 0x1F
        total sectors for volume = 320171224 0x13156cd8
        total sectors for embedded volume = 320144448 0x13150440

and the volume can be mounted again. The device name can be found in /var/log/system.log, but can also be found using the command diskutil list.

Leave a Reply