On Tue, Aug 11, 2009 at 10:25:25AM +0100, Wayne Stallwood wrote:
Chris G wrote:
Are there any disk exercising/testing programs for Linux? Well, I'm sure there are, so does anyone have any recommendations?
I want to stick a couple of old (as in I have used them in systems now defunct) IDE disk drives into my Linux box and make sure that there is nothing radically wrong with them. They're not *that* old, 160Gb and 200Gb respectively. Destructive (of data) teting is fine, I don't even know at the moment whether they're ex-Windows or ex_linux.
Well badblocks will do a destructive test writing and reading to every block, but you are going about it the wrong way.
What you should do is install smartmontools and then use smartctl to run an extended offline test.
as root do a smartctl -a /dev/sda (or whatever the correct path is for the drive)
If Current pending sector, offline uncorrectable or reallocated sector count's raw value is something other than 0 then I tend to reject that drive right away.
Also under the smart variables it will log any drive errors. That said I have seen healthy drives log errors here when something funny has happened to the interface they are on.
Then start a test with smartctl -t long /dev/sda, the drive will report back a time when the test will be complete, after that time run smartctl -a once again and somewhere in the output you should see the test results (it only reports passed, failed and what sector it failed at) Remember that because the drive is running the test and not the controller the drive access light won't be doing anything but for the long test it will be very busy (they are called offline tests but they don't actually make the drive go offline, it's just impractical to use it for anything else while the test is running)
Yes, as recommended by the other reply, I have installed smartmontools and will be doing tests as above.
Thanks all.