Skip to Content

TUAW Tip: What to do when a disk goes bad

We've all been there. The external disk you bought three or four years ago, which has been working great so far, starts to click. And it's not a good click ... it's the kind of click that gives you the spinning beach ball of death.

Poopie.

Sounds like it's time to get the data off that disk, and toot sweet, if you pardon my French. You buy a new disk, and you start copying. But then what happens? The Finder throws up an error saying it can't copy a certain file or folder, and it's 20 folders deep in an old archive of client data. The Finder stops the copy, and you have to figure out where the problem is buried, fix it, and try copying again. Meanwhile, seasons pass, civilizations rise and fall, and your fingernails start to grow into your keyboard.

Double poopie.

So what do you do? Believe it or not, the Terminal can be your friend to quickly copy damaged data, and power through disk errors. The data may still be damaged, but heck if it won't try to copy it somewhere safe.

After the jump, find out how to recover your data, and fast.

The first thing to do is don't panic. There are always ways to recover data, and chances are your data is safe. What we'll do is try the simplest options first, and go from there.

Step 1: Do you have a good backup?

No? Well, I'll save my tut-tuts for the end of the article, and you can move on to step 2. If you do, sometimes the easiest option is to restore data from your backup, rather than trying to recover a damaged disk. Of course, replace the damaged disk as soon as you can, and restore your backup to the replacement.

Step 2: Get the disk to mount

First, we have to connect the disk to the computer to do anything to it. If the disk won't mount, the first thing to do is turn it off, disconnect it, and let it cool off. If it's warm to the touch, be patient. Go get a coffee or make a sandwich. Then try again.

If the disk still won't mount, then you may have a different kind of problem. If it's an external disk (like a USB or FireWire disk), then you may have trouble with the enclosure and not the disk itself. For example, one of the ports might be bad, or the power supply could be shot. If you don't mind voiding your warranty, you can crack open the enclosure and see if you can get the disk itself to mount by installing it directly in a computer (like a Mac Pro or G5 tower), or in another enclosure.

If the disk is inside a Mac, and not external, you can try booting the bad Mac into FireWire Target Disk Mode (TDM). To do that, connect a FireWire cable from the bad Mac to a known good Mac. Then, shut the bad Mac down, and start it up with the T key held down. The bad Mac's damaged disk should (hopefully) show up just like an external disk in the good Mac's Finder.

If it still won't mount, see Dire Circumstances below.

Step 3: Buy or find a replacement disk

You will need a spare disk to copy your data onto, so you'll either want to buy or find a disk that is at least the size of the damaged disk. With external disks, it's good to find a replacement disk that's the same connectivity type as the damaged disk: that is, buy another FireWire drive to replace a damaged FireWire drive. Typically, file copying is a faster when the disks connect to the computer the same way.

You'll want to format the replacement disk the same as your damaged disk. So, for example, if your damaged disk is formatted as HFS+ (Journaled), you'll want to erase your replacement disk with the same format. You can use Disk Utility (located in your /Applications/Utilities folder) to do this.

Step 4: Get yourself some Terminal love

With the damaged disk and the replacement disk connected to your computer, start the Terminal. (It's located inside your /Applications/Utilities folder.)

Let's talk a little UNIX first. As far as the Terminal is concerned, external disks connected to your computer are "folders" inside the /Volumes folder on your computer. Crazy, I know! But we'll have to play its little game to get your data safely copied.

So, for our example, let's say your damaged disk's name is Bad Disk and your fresh, formatted, empty replacement disk is named Good Disk. You also must be an administrator on the computer. Cool? Then we're ready to go.

In the terminal, type:

sudo cp -r "/Volumes/Bad Disk/" "/Volumes/Good Disk"

and press enter. When asked, enter your administrator password.

Make sure to add a trailing slash after the name of the source disk, and omit the slash after the name of the target disk.

For those wondering, typing cp -r "old/" "new" will copy the contents of the folder "old" into the folder "new." cp -r "old" "new" will copy the folder "old" inside the folder "new." Also, using the quote marks around the folder names helps if you have spaces in the names of your disks or folders. You can just as easily omit the quote marks, and put a backslash ( \ ) in front of every space in your path to make sure it works.

Or, you can try the excellent Carbon Copy Cloner, which puts a nice user interface on this process. The only downside is that you have to babysit the computer as it copies files. Carbon Copy Cloner will present a dialog when it encounters a disk problem, giving you the option to proceed, or cancel the copy. Using the Terminal method just assumes you want to proceed, so you can go on about your business.

Now, it's just time to sit back and wait. Depending on how much data you have on the disk, it could be minutes or hours until your data is finished copying. If there are errors during the copy, the Terminal will display the errors and the files they occur in, but will continue copying until everything is transferred over. You'll know it's finished when the Terminal presents you with a new command prompt.

Take heart! The hardest part is over. The files it mentions may be damaged and unusable, but at least the rest of your data is safe. At this point, with a good copy of (hopefully) everything, you can try and run a disk utility to try and recover the damaged files.

Step 5: Run a disk repair utility

Running disk repair utilities always comes with the risk of data loss. (It may be slim, but still -- this is your important data we're talking about.)

Your Mac comes with a fair-to-middling disk repair utility, called (strangely enough) Disk Utility. Try selecting the offending disk in Disk Utility and clicking Verify to see if it can find any problems. You can try clicking Repair to see if it can fix any damage found. Chances are, though, if you're hearing clicking from your disk (or other strange noises), it's a physical problem (rather than a logical problem) that a disk repair utility can't fix.

You can also try running other utilities like DiskWarrior, TechTool Pro, or DriveGenius to repair the disk. I know people who swear by each of these utilities, and DiskWarrior has gotten me out of several sticky situations. With a safe copy of your data already in hand, however, you can feel safer about risking data loss to recover any remaining damaged files on the disk.

Step 6: Profit

Hopefully, you've recovered everything you can, and what you can't recover you can live without. Congratulations! If that's not the case, however, we have what we like to call a dire circumstance.

Dire Circumstances

If the disk won't mount, or you still need to recover a file that cannot be copied thus far, you'll probably need to contact a professional. Data recovery professionals can sometimes come to your location for an hourly fee, and perform much the same tasks we just performed in steps 1 through 6. Alternatively, you can send the disk to a data recovery laboratory, like DriveSavers or Iomega Data Recovery.

These options are all very, very expensive. Professionals can charge hundreds of dollars an hour to visit your location. Data recovery labs can charge upwards of a cool grand in recovery fees, replacement disk costs, and shipping. I had to have a 750GB disk recovered in February, and it cost me nearly $1,600.

Even so, your data is recoverable. It's just a question of how much that's worth to you.

The Moral of the Story

If there is a moral to this story, it's that good backups will not only save you time, but possibly large sums of money. Mac OS X Leopard makes this ridiculously easy with Time Machine, so long as you can connect your computer regularly to an external disk. There's no excuse anymore for not having a good backup.

Unfortunately, it frequently takes people a significant data loss experience to learn that lesson. Take it from me, kids, I had a long list of better things to spend that $1,600 on.

Full Disclosure: Iomega, a manufacturer of external hard drives, was a client of mine from 2002 to 2007. Many thanks also to , an Apple Authorized Repair Specialist, for his expert help with this article.



Categories

TUAW Tips

We've all been there. The external disk you bought three or four years ago, which has been working great so far, starts to click. And it's...
 

Add a Comment

*0 / 3000 Character Maximum Comment Moderation Enabled. Your comment will appear after it is cleared by an editor.

51 Comments

Filter by:
Justin

Very cool tips.. I have recently lost my data from my hard drive. I have used Stellar Phoenix file recovery software. It recovers mostly of my data. This software provides free demo in which you can see the preview of your recoverable file. So it will be helpful to check weather your data is recoverable or not before buying the software.
Download demo version from
http://www.stellarinfo.com/download.htm

September 04 2008 at 5:00 AM Report abuse rate up rate down Reply
Greg

Hey are there any developer/product management folk out there who would be willing to talk to me?

July 02 2008 at 2:52 PM Report abuse rate up rate down Reply
Mark M

Another command that I've found very useful is the ditto command. Very similar to the cp command, but with some added variations. If you type ditto -V -rsrc "old hd" "new hd" instead of the cp command, the terminal will show you each and every file it is attempting to copy and you can keep an eye on how the copy is progressing.

Other than that, a very informative and useful article for those in need of data recovery

June 29 2008 at 3:20 PM Report abuse rate up rate down Reply
Aaron Davies

Where did you find recovery services for only $1600? Was this full-blown clean-room work, or the sort of "non-destructive" thing that TekServe does? The people I've talked to want at least double that for a 500GB drive.

June 26 2008 at 9:34 AM Report abuse rate up rate down Reply
1 reply to Aaron Davies's comment
Robert Palmer

I went with Iomega Data Recovery, because the disk was from Iomega, and I'd worked with them before. They did a great job, and were super professional about everything.

Since the problem with the disk was logical and not physical damage (but EXTENSIVE logical damage) they didn't have to pull it apart.

You can read the whole thrilling tale at my own blog, written months before I started working here. http://xrl.us/gjbqf

June 26 2008 at 9:47 AM Report abuse rate up rate down Reply
Aaron Davies

BTW, you should note that if there's any old pre-OSX stuff around, using standard unix cp to copy it may well destroy it (especially apps). Install the developer tools and use /Developer/Tools/CpMac, which is resource-fork aware.

June 26 2008 at 9:33 AM Report abuse rate up rate down Reply
1 reply to Aaron Davies's comment
Michael Rose

Actually, Aaron, while that was good advice in past versions of Mac OS X, both Tiger and Leopard ship with resource-fork aware versions of the basic file manipulation BSD tools (cp, mv, etc.).

http://systemsboy.blogspot.com/2005/12/command-line-smackdown-cp-vs-ditto.html

June 26 2008 at 10:56 AM Report abuse rate up rate down Reply
Lee

I have a 1TB MyBook set up as a 500GB RAID on my network. On that I keep copies of my movies, music, installed software images, etc. I also have a 320GB AirDisk that I use for daily backups, and as soon as MobileMe comes along with it's 20GB iDisk, I will be backing up all of my photos off-site (since they are the only things that are TRULY irreplaceable) Yeah, the AirDisk will fail someday, the RAID will corrupt, but is all of that going to happen at the same time my Mac dies? Not likely, and if it does, I can sleep knowing I did my best to protect my data.

June 26 2008 at 8:29 AM Report abuse rate up rate down Reply
Slobi

Let's not forget the Excellent PC-based (yes, PC) utility called SpinRite. It is perfectly capable of recovering almost all but the most screwed-up drives with hardware failure. It works, as they like to say "intimately" with the drive hardware and can not be run from an Intel Mac machine since it uses the BIOS very intimately. However, it WILL (if temporarily connected into the PC box) work with a mac disc (REGARDLESS of formatting) and recover anything that has even a slightest hardware chance. It runs an advanced, statistically-based, recovery routines which can take days to finish! But, in 96-98% of the cases, it recovers disks which otherwise would only have been recoverable for a $12,000 fee. See it (and I'm not associated with these guys, I was just lucky to hear about them when my HD needed a friend) at http://www.grc.com/sr/spinrite.htm

June 26 2008 at 8:12 AM Report abuse rate up rate down Reply
John M.

asr

June 26 2008 at 6:00 AM Report abuse rate up rate down Reply
George

This post is exactly what I am after as my PowerBook is starting to play-up a little. (Internal drive makes noises and the machine has frozen, where the screen shows lots of vertical lines and a 'gray' bleed starts to spread across the screen).

Out of interest which of the 3 diagnostic / disk utility apps is the best? They are all about the same price, so which should I go for?

Disk Warrior

TechTool Pro

Drive Genius 2


Thanks

June 26 2008 at 3:57 AM Report abuse rate up rate down Reply
1 reply to George's comment
George

Does any one have an opinion on which is best?

June 26 2008 at 7:21 PM Report abuse rate up rate down Reply
rexrexroth

So, you access data on your hard drives less than hourly in most cases? Why not stop assigning blame to Time Machine and instead chalk it up to the reality that hard drives all die eventually. That 1 million hour mean time before failure just means that half will still be alive a million hours into it, but the half that died will have been kicking the bucket one by one along the way. You should thank Time Machine for trying to save your ass and curse yourself for not acting faster when the backup drive failed.

June 26 2008 at 3:20 AM Report abuse rate up rate down Reply
Buy an ad here

Tweets

© 2012 AOL Inc. All Rights Reserved.