27

I have an external hard-disk with a single Mac OS Extended partition. This disk stopped working couple of days ago. I tried to repair the partition with disk utility but no luck. The error message is the following:

Error: Disk Utility can’t repair this disk. Back up as many of your files as possible, reformat the disk, and restore your backed-up files.

Any ideas or tools I can try to repair my disk?

  • Can you be sure the drive is working properly? You should check several things if you haven't already: Is your CRC error count at 0? Is your Pending/Removed/Reallocated Bad Sectors at 0? Have you run random read/write block tests on the drive? Look into a shareware program called SMART Utility if you haven't run any of these checks already. I highly recommend it for basic drive health checks. – Fyrefly Jul 3 '14 at 16:30

14 Answers 14

18

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.
  • @ Buscar - this is the better answer... but fsck is what Disk Utility is actually failing to do. It is likely more effective to apply fsck manually, but I thought maybe you'd be interested in that fact. Nice answer, rock on. – chillin May 10 '14 at 17:48
  • 3
    @Buscar My partition is not monted and I am unable to do so. Therefore the df -hl is nt reporting it. Is there any way to apply the fsck_hfs command? – gyurisc May 12 '14 at 4:08
  • @gyurisc you do not have to run the df -hl, it is only used to show you your disk partition status. – Ruskes Feb 2 '15 at 23:10
  • 3
    I don't get it. What does the second invocation of df -hl accomplish? – Slipp D. Thompson Apr 18 '15 at 3:23
  • 1
    @gyurisc If your disk doesn't mount, use diskutil list to get the id of your external disk: apple.stackexchange.com/questions/107953/… – pcv Sep 21 '15 at 0:06
9

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.

  • 4
    clicking repair repeatedly has helped me more than once – jensph Jun 19 '15 at 1:48
  • specially if keeps throwing differents results.. – H_7 Feb 3 '16 at 2:50
3

One thing to try that is perhaps extreme is to place the drive in a few layers of freezer bags and cool it in the freezer, and then try to get it to mount, and copy off what data you can until it fails again, and then repeat this process. Its absurd, but it has worked for me and there is a lot of anacdotal evidence that this can help recover data, regardless of the myth-dispelling posts that started to appear on the internet once the idea was picked up by major tech news outlets.

  • 20
    Appropriate username :P – NReilingh May 11 '14 at 0:17
  • 2
    +1 for the username. the drive works, it is just the partition is not mountable – gyurisc May 12 '14 at 4:05
3

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.

  • 2
    After running your command all the data on my hard drive got erased, so THANK YOU!! – Wazery Mar 26 '16 at 5:31
3

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.

  • saved me from a lot of trouble with this comment... sometimes its not that the disk is corrupted.. – Mamonu Mar 4 '17 at 16:33
2

I had this issue with an external disk in ExFAT, nothing worked. I was just about to use recovery software but boot into Windows, Windows read it fine. Booted back into OS X and now everything is as it should be. Weird.

1

Honestly, Apple is rather conservative when it comes to reporting errors. Sometimes (some people would say) to a fault. So when they do indicate an issue like this. It MIGHT be fixable with a third party program but honestly the first thing you should do is Backup Your Data. As it is likely that even if the drive is not toast there is a distinct likelihood of data loss.

On rare occasions booting from external media or the recovery partition (COMMAND-R) and running Disk Utility from that, could repair it. Worth a try as it only costs you a little time.

Personally I use DiskWarrior and have recovered drives that Disk Utility can't touch, including that exact error message. No guarantee it will do the trick but it's cheaper than a new HD.

If you own no other commercial software, that is the one you want. And keep it updated and on bootable media that works on all your currently owned Macs. I do.

  • I backed up the most important folders fortunately with crashplan. The annoying thing is that not all folders are backed up and that it happened the second time now. Thanks for the suggestion, I will give it a try. – gyurisc May 12 '14 at 4:04
1

I had a similar problem with my external Toshiba HD- my macbook wouldn't recognize the HD until after unplugging it and then prompted for a password (which hasn't been applicable for months). I tried all possibilities of a previous password, received the same error message in disk utility when trying to repair the HD, and finally was able to correct this error by utilizing the free OS upgrade to Yosemite. Hope it helps!!

  • i am still fighting with this from time to time – gyurisc Oct 23 '14 at 6:44
1

You first need to determine whether the problem is with the disk hardware or the filesystem. To learn whether the hardware is failing, you can use a utility that will evaluate the SMART data. Apple's Disk Utility does a limited form of this, but it's not nearly as reliable as a dedicated tool. I use SMART Utility -- the free trial will provide all the info you need for a one-time diagnosis.

If the hardware is bad, you should not try to repair the filesystem. You are in a data recovery situation.

If the drive is OK according to SMART Utility, you should try repairing the filesystem with Alsoft DiskWarrior. DiskWarrior is developed by a team with intimate knowledge of the HFS filesystem, and it's able to fix problems that Disk Utility cannot.

0

If Disk Utility can't repair the volume, it means that its directory structure is damaged to point where it can't find all catalogued files any more.

While you can now try copying all files to another disk, this may result in lots of errors, and you may also not get all files that are still theoretically recoverable.

Therefore, I recommend that you use the product Data Rescue for this recovery job. It scans the entire disk (takes a while), searching for "lost fragments" of the catalog, trying its best to recover as much as possible.

With a disk that's marked unrepairable, you should not try to keep writing to it (in fact, it should be made read-only, which is, sadly not as simple any more as it used to be long ago), because any further writes may overwrite valid data, due to the damaged catalog.

So, get a large enough second disk and start rescuing. Do not attempt to fix this volume unless you do not care for more losses.

0

I've had good experience fixing volumes (even when disk utility says it can't fix it) using Diskwarrior and/or TechTool Pro. Both of them are shareware, there might be freeware alternatives but I don't have experience with any.

0

Short Story: Use DiskWarrior

My computer crashed and damaged directory files on my external hard drive. So it wouldn't mount but I could see it in Disk Utility (altho it wouldn't repair). Paid the $120 for the diskwarrior, went thru everything and it was fine. Gives you a preview to grab files too before they go in and fix the bug. Worth the money.

0

Read somewhere about trying to click Repair several times until it worked. It took a while until it took it and I was able to recover the disk , backed it up and format it.

-1

For me, Disk Utility on Snow Leopard works at repairing permissions for drives but not on Mavericks. Strange.

You must log in to answer this question.

protected by Community Nov 5 '15 at 4:36

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .