How can I tell if my iMac's hard drive is dying? A couple of days ago, my three-year-old iMac locked up.  When I rebooted it, it only displayed a folder icon with a flashing question mark.  After a couple more reboot attempts, it booted. I ran Disk Utility, which told me that the file system was corrupted and needed repair.

I booted with my Snow Leopard DVD, did a repair with Disk Utility, and now everything seems fine.

My questions: Should I be worried about my drive?  Should I go ahead and replace it now, or wait to see whether there are any more problems?

(FWIW, I've already purchased a replacement drive, and plan to replace it at some point. I'm really wondering whether I should do it as soon as possible, or whether it can wait until I have nothing better to do on a weekend.)
Short answers to your questions:


Some concern over the drive is good, noticing there may be an issue and proactively thinking about what could happen is a good place to start. If you don't already, I would make a backup/clone of the entire drive or at least a backup of all the files important to you. Think if the HD goes bad tomorrow and you could get nothing recovered from it, what would you say "I wish I had a copy of..."
If you have a backup and see no performance degradation I'd say use the drive until it dies. Unless the new drive is bigger and faster. Then, you are killing two birds with one stone. Getting rid of a potentially bad drive and upgrading. 


Some background:   

The folder with a question mark means that upon booting the iMac can't find an operating system. This can happen because the hard drive is going bad, is bad or it can't find a startup disc (HD or other). This can be related to physical hardware or software issues.  

Had you done any recent system updates prior to the machine freezing up? Sometimes after an update, example 10.6.7>10.6.8 some corruption can occur. If not, it still does not 100% rule out some sort of OS/software issue.   

Did you recently boot from an external HD, netboot or optical disk? Sometimes the OS cannot find the last disk it was booting from and you will quickly see the folder with question mark flash on the screen, but then the machine sees an operating system and boots from it. I would look in System Preferences>Startup Disk and make sure you select the drive you want to boot from. Most likely, Macintosh HD, unless you renamed your HD. Press the restart button and now it knows for sure to use that drive to start from.

Disk Utility is usually pretty good and seeing errors and then correcting them. This could be a simple directory issue that is now fixed and it won't happen again or it could be the early stages of a failing drive. You could purchase any one of many software disc checking tools to see if the drive is having hardware malfunctions or has bad blocks. Disk Warrior is excellent and so is Drive Genius. Unless you plan on using these utilities a lot, it may not make $ense to buy them and rather just use the replacement HD you purchased.