On Thu, 31 Dec 2009 09:03 -0500, "Scott McEachern" <sc...@erratic.ca> wrote:
> I've been using dd to test some of my hard drives and just ran into the 
> oddest of coincidences.
> 
> I used this command (or variation without the time command)
> 
> # time dd if=/dev/rwd0c of=/dev/null
> 
> on three machines with three HDD's of sizes 40GB SATA, 40GB IDE and 30GB 
> IDE, one of those 40GB (SATA) drives was in my workstation.  The result 
> is basically the same: x number of bytes transferred, etc. with no 
> problems.  They are all a few years old.  I bought a brand-new Seagate 
> Barracuda SATA/1.5TB/7200/32MB, installed it into my workstation and ran 
> the same test to get this:
> 
> # dd if=/dev/rwd0c of=/dev/null        
> dd: /dev/rwd0c: Input/output error
> 268435455+0 records in
> 268435455+0 records out
> 137438952960 bytes transferred in 23763.827 secs (5783536 bytes/sec)
> 
> What got me doing that in the first place was my workstation locking up 
> hard 3 times in the past few weeks.  I have no idea why, nothing in the 
> system logs, etc, and the only change was the HDD.  I figured the drive 
> was defective, ran the above test, and returned it for a replacement.  
> While there, I also picked up a WD 500GB SATA drive and installed that 
> in my workstation (to be pre-built and installed in another PC), which 
> gave this result:
> 
> # time dd if=/dev/rwd0c of=/dev/null
> 976773168+0 records in
> 976773168+0 records out
> 500107862016 bytes transferred in 93283.067 secs (5361186 bytes/sec)
>  1554m43.06s real (etc)
> 
> No I/O error, so it should be good.  That's 2 drives ok (40 and 500 GB) 
> and 1 drive bad in the same PC, now for the 2nd new 1.5TB drive:
> 
> dd: /dev/rwd0c: Input/output error
> 268435455+0 records in
> 268435455+0 records out
> 137438952960 bytes transferred in 23740.766 secs (5789154 bytes/sec)
>  395m40.76s real (etc)
> 
> Oh, another crappy drive, I guess I have bad luck.  Probably from a bad 
> batch or something.  But wait...
> 
> Look at the amounts transferred.  Exactly the same for both of the 1.5TB 
> drives, and I assure you it's not accidentally the same drive, just the 
> exact same make / model.  The cables / connections are good on known 
> good hardware, plus two other different drives were fine.  It can't be 
> some odd variable limit (or similar thing) because the 500GB values went 
> well beyond where the 1.5TB drives crapped out.
> 
> I don't believe it's the hardware (other than the drive), nor the 
> software, but seeing those numbers being identical down to the byte is 
> either incredibly coincidental or .. ?  I'm going to run the test again, 
> but as you can see from the time it won't be done for another 6.5 
> hours.  Betcha it'll be the same.
> 
> Can anyone think of a plausible explanation for this, other than maybe a 
> bad batch where the drives are all equally defective at the exact same 
> spot?  While I'm here, can anyone recommend another tool than dd for 
> testing drives?  Seems to me with those numbers, to finish a 1.5TB drive 
> it'll take around 76 hours.  I don't mind the time, I need 
> thoroughness.  It's better than having a workstation (or server) 
> mysteriously lock up after the 30-day return/exchange is over.

You can speed dd up considerably by setting bs to a larger size, by default 
it's 512 bytes. Although this may interfere with the accuracy of your testing. 
Here's an example:

# time dd if=/dev/rsd1c of=/dev/null
494079+0 records in
494079+0 records out
252968448 bytes transferred in 371.001 secs (681852 bytes/sec)
    6m11.00s real     0m0.11s user     0m6.36s system

# time dd if=/dev/rsd1c of=/dev/null bs=4m
60+1 records in
60+1 records out
252968448 bytes transferred in 23.160 secs (10922468 bytes/sec)
    0m23.16s real     0m0.00s user     0m0.00s system

Reply via email to