Refreshing Hard Drives Revisited

Posted on by Larry

A year or so ago, I wrote about a problem of digital media slowly "evaporating" when a hard drive is powered down and stored on a shelf.

You can read the first article here.

The solution is to refresh the hard drive. You can read that solution here.

Bill Lauer now asks:

A couple of years ago you wrote an article on how to refresh a hard drive using the "sudo cat /dev/rdisk0> /dev/null" or "sudo badblocks -b 4096 -p 1 -c 32768 /dev/rdisk0". I was wondering if there is a better way yet?

I never was able to get the bad block method to work. I tried 10.4, 10.5 and 10.6. Does TECH TOOL PRO’s "scan drive" command do the same thing? I really want a safe way to do this. Fast would be good also.

Larry replies: At the time the article came out a number of developers contacted me saying they were going to work on an easier solution. As of today, I don’t know of any.

However, if any reader does, please let me know and I’ll share the information.

UPDATE – JAN. 2, 2011

Bob Gobeille, who originally provided the terminal script to fix this problem, wrote again in answer to Bill Lauer’s wish.

It’s been quite a while since I’ve used Tech Tool Pro, but anything that reads the entire disk (like drive scanning) should work fine.

I use Terminal windows all the time and forget that the commands I sent you can be intimidating to those that don’t.

Since Bill wanted an easier way, I’ve attached an AppleScript that will refresh a disk with two clicks (one to select the disk, the other to run the scan). Here is a sample screen shot from the script.

Once you select the disk you want to scan, click OK. The only feedback you will get is that your disk drive activity light should go on and stay on until the refresh is done. When it is finished — and it will take a LONG time — another dialog box will come up and let you know. Here’s a sample screenshot:

This is a sample screen shot of the message you get when scanning is complete.

If you aren’t familiar with installing AppleScript, copy this script to your Library > Scripts directory. Then when you click on the script icon in the OSX menu bar, you should see it. Like this:

If the script icon is not in your menu bar, add it by running: Applications > Utilities > AppleScript Editor.app

Then open the AppleScript preferences and click Show Script menu in menu bar.

BOB’S NOTES
I’ve never tried this on RAIDed drives (I don’t have any). This reads at almost 60 MB/s on my internal MacPro drives, which works out to about 200 GB / hour. This means a scan of a 500GB disk will take roughly 2.5 hours. Different computers will scan at different speeds.

My script will only scan one drive at a time at this point.

I was tempted to have this script also check for other types of disk errors (and attempt to fix them), but you can use Disk Utility to do the same thing, using the Verify Disk and Repair Disk buttons.

As with all software, test this on a drive you have backed up first. We believe this to be reliable, but do not guarantee it.

Larry replies: Bob, this is GREAT! Thanks for taking the time to create, explain, and share it with us.

Here’s the link to the AppleScript file. This is stored as a Zip file, double-click it to decompress it, then install it as Bob outlined above.

Larry


2 Responses to Refreshing Hard Drives Revisited

  1. Steve Stone says:

    I appreciate Bob Gobeille’s “REFRESH” script but I’ve run into an issue that I’ve come to understand is not uncommon:

    On some of my drives I’m running Bob’s script and getting the error “AppleEvent timed out.” number -1712.”

    Not sure what causes this, but a cursory google search reveals that developers only need to add a simple line of code to keep a script running despite this issue. But I don’t want to monkey with Bob or someone who understands Apple script can post an amended version.

    • Larry says:

      Steve:

      A good point. I don’t know Apple Scripts well enough to suggest a change – and I certainly don’t want to provide you with bad advice.

      Perhaps Bob is still tracking this thread and will have a suggestion.

      Larry

Leave a Reply

Your email address will not be published. Required fields are marked *

Larry Recommends:

FCPX 10.5 Complete

NEW & Updated!

Edit smarter with Larry’s latest training, all available in our store.

Access over 1,900 on-demand video editing courses. Become a member of our Video Training Library today!

JOIN NOW

Subscribe to Larry's FREE weekly newsletter and save 10%
on your first purchase.