Monday, July 26, 2010

external harddisk access error in macosx

I have a 1TB external harddisk connected to my MacMini via USB port.  I used it for:
  • Back up with Apple's TimeMachine
  • Back up other data
  • Store movies and softwares
Just today when I turned my machine on there was no disk icon shown in either Finder or Desktop.  I went to Disk Utility (a gui disk management for MacOSX) where I could still see my external harddisk listed.  I was so sure something really went wrong.

In Disk Utility, I tried clicking both Verify Disk button and Repair Disk button.  None of them worked as you can see from the screenshot:


This is frightening.  I then went to shell in Terminal and tried fsck like this:

$ fsck_hfs  /dev/disk1s2

And here is what I got:

** /dev/rdisk1s2 
** Checking Journaled HFS Plus volume.
** Detected a case-sensitive catalog.
   Invalid node structure
(4, 0)
   Invalid B-tree node size
(4, 0)
   Invalid node structure
(4, 0)
   Invalid B-tree node size
(4, 0)
** Volume check failed.

(Note that I knew it was /dev/disk1s2 from the command "diskutil list".)

The error message looks the same as what I got from Disk Utility.  I found later that Disk Utility's Repair Disk button made use of fsck which is why it yielded the same result.

I also tried attaching the harddisk with my Grml Linux laptop and mounted it as hfsplus.  I could see all the files there (and of course, I can access all files and even copy them to anywhere else so my ass is still safe).  Though, fsck.hfsplus in Linux did not work either.

After spending time researching about this issue, I can conclude that:
  • This is a rare case (assuming my harddisk is still in a good condition as I just recently bought it).
  • fsck is not the right tool to fix this special case.
  • All lead me to use Disk Warrior to fix the problem in my harddisk.  People claim it knows hfsplus file system more than fsck_hfs.
And it just worked!  Here are the steps it took:
  1. Open Disk Warrior
  2. Under Directory tab, choose your external harddisk device in a drop down list
  3. Click Rebuild and wait for a long while depends on how much damage and how large your harddisk is
  4. Once it's done, it will popup a report telling us what kinds of damages it detects and etc.  All we have to do is to click Replace button and wait for another while
  5. And that's it!
Good luck, everyone : )

1 comments:

Post a Comment