How can I repair a disk that Disk Utility says it can't repair?

There is a chance to repair it with command line (in Terminal) with the terminal utility as described in Apple's support docs, shown below:

Use the command line and the fsck_hfs -l command.

Start up your computer and log in as an administrator.

Open Terminal (/Applications/Utilities).

At the prompt, type the following command and then press Return to determine your filesytem ID:

df -hl

Look for some lines of text that look like this:

Filesystem Size Used Avail Capacity Mounted on
/dev/disk0s3 37G 20G 17G 55% /
/dev/disk0s5 37G 37G 641M 98% /Volumes/Storage

Make a note of the External Disk "disk" name that appears after /dev/, such as "/dev/disk0s3." This is your filesystem ID for your External volume.

At the prompt, type the following command and then press Return:

df -hl

Then type the following command, where "disk1" is your filesystem ID you noted in step 4, then press Return:

sudo fsck_hfs -l /dev/disk1

When prompted, enter your admin password, then press Return to begin the verification.

You should see messages like these during the disk check:

** /dev/rdisk0s3 (NO WRITE)
** Root file system
** Checking HFS Plus volume.
** Checking Extents Overflow file.
** Checking Catalog file.
** Checking multi-linked files.
** Checking Catalog hierarchy.
** Checking Extended Attributes file.
** Checking volume bitmap.
** Checking volume information.
** The volume Macintosh HD appears to be OK.

When you plugin a damaged Apple_HFS disk into Mavericks/Yosemite it runs fsck_hfs on its own.

You can see the output (in Terminal):

tail -f /var/log/fsck_hfs.log

Wait for it to finish before running repair yourself.

Also repair needs to be run repeatedly to repair some errors. I recently needed to launch it 7 times but it repaired the disk successfully in the end. You can use either fsck_hfs or Disk Utility.


You may not need to repair the disk!

Is this an external drive you're sharing between a Mac and a Windows PC? I've had this issue a few times with a disk formatted FAT32. If you don't unmount your disk properly when you remove it from your Windows PC, the whole volume will be marked as "busy" and you'll be prompted to repair the volume if you look at it in Apple's Disk Utility. However Disk Utility will fail to repair the volume, and report:
Can't open (Resource busy)
File system check exit code is 8.

The fix is easy, just plug that drive back in to a Windows PC, and unmount it properly before plugging it into your Mac.

It's not uncommon for a USB drive to be disconnected by just yanking out the cable, and usually that doesn't cause any trouble, and integrity is verified when you plug it back in. Ideally Macs would recognize this common issue and work around it, but it appears they only trust Microsoft to validate that the filesystem is OK.


I had luck with fsck on the command line using slightly different options from above.

Used df -hl to determine the path of the disk device as above (in my case my first external USB drive, /dev/disk1s1)

Then use

sudo fsck_hfs -r -d /dev/disk1s1

The -r option rebuilds the Catalog B-Tree. Not sure why disk utility doesn't do this automatically. The -d option shows extra debugging information. See Repair disk from single user mode (fsck fails) and the fsck_hfs man page for details.

Before you rebuild the Catalog B-Tree, be sure to run a standard fsck first, as rebuilding the Catalog B-Tree on a corrupted filesystem can lead to further data loss or filesystem corruption.

You can also use sudo fsck_hfs -Race -d /dev/diskid instead of sudo fsck_hfs -r -d /dev/diskid to rebuild the attribute and overflow tree as well.