If I run fsck_hfs -y -d /dev/rdisk2s10 it putters along, rebuilds the catalog B-tree then fails when writing the new catalog to disk.
bash-3.2# fsck_hfs -d -y /dev/rdisk2s10 ** /dev/rdisk2s10 Using cacheBlockSize=32K cacheTotalBlock=16384 cacheSize=524288K. Executing fsck_hfs (version diskdev_cmds-491.6~3). ** Checking Journaled HFS Plus volume. ** Checking extents overflow file. ** Checking catalog file. Invalid node structure (4, 19740) ** Rebuilding catalog B-tree. BlockFindAll: 1060209 blocks free, but need 2314620; ignoring for now BlockFindAll: found 1938640 blocks but needed 2314620 Disk full error ** The volume MongoDisk could not be repaired. volume type is pure HFS+ primary MDB is at block 0 0x00 alternate MDB is at block 0 0x00 primary VHB is at block 2 0x02 alternate VHB is at block 1953261182 0x746c667e sector size = 512 0x200 VolumeObject flags = 0x07 total sectors for volume = 1953261184 0x746c6680 total sectors for embedded volume = 0 0x00
Diskutil reports the following for this partition:
Device Identifier: disk2s10 Device Node: /dev/disk2s10 Part Of Whole: disk2 Device / Media Name: Apple_HFS_Untitled_1 Volume Name: MongoDisk Escaped with Unicode: MongoDisk Mounted: Yes Mount Point: /Volumes/MongoDisk 1 Escaped with Unicode: /Volumes/MongoDisk%FF%FE%20%001 File System: HFS+ Type: hfs Name: Mac OS Extended Owners: Enabled Partition Type: Apple_HFS Bootable: Not bootable Media Type: Generic Protocol: FireWire SMART Status: Not Supported Volume UUID: 4758CE30-CA9C-3DF1-90D6-0436772E622D Total Size: 1.0 TB (1000069726208 Bytes) (exactly 1953261184 512-Byte-Blocks) Volume Free Space: 146.8 GB (146791854080 Bytes) (exactly 286702840 512-Byte-Blocks) Read-Only Media: No Read-Only Volume: Yes Ejectable: Yes Whole: No Internal: No
My suspicion is that the extents tree indicates a full volume, so that diskutil can't find a place to write it.
The man page for fsck_hfs claims that you can rebuild the btrees individually with the R flag. Doesn't work on Snow Leopard.
Is there a way to fix this short of reformating the drive?
Any recommendations to other commandline utilities to beat up on HFS file systems?