Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

  • Perhaps Disk Warrior will be of some help. It's the best for recoverying the volume: http://www.alsoft.com/DiskWarrior/

  • Stellar Phoenix Macintosh - Mac data recovery software, recovers data from damaged, deleted, or corrupted volumes and even from initialized disks. They have a trial version, so I guess you can see if your data can be recovered...

  • Data Rescue II is the best data recovery software on the market for recovering files from a problem hard drive. Data Rescue II works when other tools fail. Data Rescue II is also completely safe to use since it does not attempt any risky repairs to the drive while its scanning.

  • FileSalvage is an extremely powerful Macintosh application for exploring and recovering deleted files from a drive or volume. FileSalvage is designed to restore files that have:

    • been accidentally deleted.
    • become unreadable due to media faults.
    • been stored on a drive before it was re-initialized/formatted.

Entering:

mac data recovery

into Google will list some firms who specialize in recovering data. Data recovery isn't cheap.

share|improve this answer
    
In one sense this is not critical. It's used for time machine, and I can just reformat it. This is an opportunity to learn how to fix things myself, hence the request for other command line tools. –  Sherwood Botsford Mar 19 '13 at 10:37
    
However you get points for having a good description of commercial solutions. –  Sherwood Botsford Mar 19 '13 at 10:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.