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.

One Response to “Repairing a broken disk volume on a Mac”

  1. Kirby says:

    Hello,
    I have same problem for the external drives and after disk utility it show the follow info:
    Verifying volume “disk1s3”
    Checking HFS Plus volume.
    Invalid extent entry
    The volume needs to be repaired.

    Volume check failed.

    Error: The underlying task reported failure on exit (-9972)

    1 volume checked
    0 HFS volumes verified
    1 volume failed verification

    And after typing you command it show:
    ** /dev/rdisk1s3
    ** Checking HFS Plus volume.
    Invalid extent entry
    (3, 0)
    ** Volume check failed.
    volume check failed with error 7
    volume type is pure HFS+
    primary MDB is at block 0 0×00
    alternate MDB is at block 0 0×00
    primary VHB is at block 2 0×02
    alternate VHB is at block 156039262 0×94cf85e
    sector size = 512 0×200
    VolumeObject flags = 0×07
    total sectors for volume = 156039264 0×94cf860
    total sectors for embedded volume = 0 0×00

    And it cannot be mount. Is it need to do other procedures mount the drive?

Leave a Reply