A Free Utility to Refresh Hard Drives

Posted on by Larry

[ This article was first published in the December, 2010, issue of
Larry’s Monthly Final Cut Studio Newsletter. Click here to subscribe. ]


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.

 

 

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.

 


Bookmark the permalink.

6 Responses to A Free Utility to Refresh Hard Drives

  1. marlowe says:

    are there any concerns about running this script on a RAID drive

  2. Egon Freeman says:

    Yeah, same here – what about RAID? I mean, RAID stores files in a redundant manner, but what about reading? Redundancy info could be lost in time, even if the original material was kept fresh… and that would lead to a false sense of security. I mean, what good is a RAID array that lost its recovery data to bit rot ages ago? This is esp. important, because in certain cases one doesn’t even have access to the disk, so reading it raw isn’t an option (access to rendundant storage space is not available to ‘mere mortals’).

    Do RAID controllers do this sort of maintenance on their own? If so, does every one of ’em do it? Is it an option that can be bought? Is it just a lucky hit if a thoughtful techie at the factory inserts some subroutine for this in their spare time, out of compasion or boredom?

  3. Larry Jordan says:

    This is not a big deal. Redundancy in RAIDs is not static. Each time files are updated both source files and checksums are updated. There are many things I worry about, but losing RAID redundancy due to bit flux in absolutely not one of them.

    Larry

  4. Donn Edwards says:

    There is now a utility available for Windows users to do a drive refresh: It is called DiskFresh from Puran Software.

  5. David Lohner says:

    I know, it’s been a while since this article was new (-:

    The linked script gives me a timeout on 2 and 3 TB Harddrives. Is there another way to refresh HDDs in El Capitan?

    • Tori Hoefke says:

      David:

      To refresh a drive, you need to get it to read all the sectors on a disk. If this script no longer works, try using Tech Tool Pro or another hard disk utility.

      Larry

Leave a Reply

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

Larry Recommends:

FCPX 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.