IDE drive soak test

Posted by: andy

IDE drive soak test - 07/06/2004 11:04

Probably a question for Mark mainly.

It looks like the old (8GB) IDE drive in my main Linux box is failing (it was reporting IDE errors the other day, effectively stopping the box dead until I rebooted it). There have been no errors since, but I've decided to play safe and replace the disk.

I've got a new 40GB drive ready to use, but I thought it might be an idea to do some soak testing for a day or so.

Are there any good tools for doing this ? Either Linux or Windows based would be fine.

Supplementary question on the replacement. I was planning on creating a partition on the new disk the same size as my existing partition (I don't bother with multiple partitions) and then dding the whole partition across. Can I then later resize the 8GB ext3 partition, or would I be better off creating a new 30+GB data partition with the remaing space ?
Posted by: wfaulk

Re: IDE drive soak test - 07/06/2004 11:09

I was just checking out a defunct WD drive the other day and their util has such a feature, IIRC. (I didn't get that far before it was marked as failed, so I'm not sure.)

WinDLG
Posted by: tman

Re: IDE drive soak test - 07/06/2004 11:17

IBM/Hitachi have their DFT tool as well.
Posted by: peter

Re: IDE drive soak test - 07/06/2004 11:22

I thought it might be an idea to do some soak testing for a day or so. Are there any good tools for doing this?
badblocks

I was planning on creating a partition on the new disk the same size as my existing partition (I don't bother with multiple partitions) and then dding the whole partition across. Can I then later resize the 8GB ext3 partition, or would I be better off creating a new 30+GB data partition with the remaing space?
I think dd'ing the partition will only work if your new drive has similar geometry to the old one (i.e. same heads and sectors). IMO you're better off partitioning it the way you want and moving your files with tar instead of dd.

Peter
Posted by: wfaulk

Re: IDE drive soak test - 07/06/2004 11:51

dd works only on a byte-by-byte basis. It'll copy a filesystem fine as long as the destination partition is big enough. It will not provide more space, though. That is, if you start with a 3GB filesystem and dd it to a 5GB partition, you still have a 3GB filesystem after the copy. Linux filesystems may or may not have the ability to expand. I don't know. (Edit: resize2fs, part of e2fsprogs, should work on both ext2 and ext3 filesystems.)

tar is still probably a better solution, though. Personally I use dump and restore, as many tars have bugs, but GNU tar is probably fine. Make sure to use the p option to preserve owners and permissions. It should be the default if you do it as root, but just to make sure.
Posted by: peter

Re: IDE drive soak test - 07/06/2004 13:01

dd works only on a byte-by-byte basis. It'll copy a filesystem fine as long as the destination partition is big enough.
True. I guess what I meant to say, is that it's hard to make the new partition exactly the same size as the old one unless the drives have similar geometry. (Having partitions not aligned to cylinder boundaries is technically possible but breaks dual-booting to Windows.) But yes, Linux is perfectly happy with a filesystem that's smaller than its partition. Just make sure it's not the other way round!

Peter
Posted by: mlord

Re: IDE drive soak test - 07/06/2004 13:02

I usually just do this:

cat /dev/zero >/dev/hdc (or whatever)
cat /dev/hdc >/dev/null

If the drive HAD some bad sectors, the first line above will repair them. You could do that with the "failing" drive.

Cheers
Posted by: wfaulk

Re: IDE drive soak test - 07/06/2004 14:24

How would that repair them? Is the drive firmware smart enough to mark sectors bad in that case?
Posted by: mlord

Re: IDE drive soak test - 07/06/2004 18:23

Yes, the drive's defect management code will either (1) remap the bad sectors as they are rewritten, or repair them when rewriting the entire physical track.

Cheers