[plug] dd speed estimates and /dev/hdx grepping

Cameron Patrick cameron at patrick.wattle.id.au
Wed Oct 22 19:32:17 WST 2003


On Wed, Oct 22, 2003 at 07:03:07PM +0800, Ryan wrote:
| Does anyone have *any* idea how long a dd might take in the following
| situation assuming everything is hunky-dory?
| 
| Celeron 300 - 128MB RAM, two identical 40GB 7200RPM drives, booted with
| Debian 3.0 CD, dropped to console and:
| 
| dd if=/dev/hdd of=/dev/hda 
| 
| I of course could have written it to a file and watched it slowly grow, but
| circumstances and lack of spare hard drives didn't permit that at the time.

At 10MB/s that would take just over an hour.  A lot of 7200 rpm drives
will manage 2--3 times that speed.  My own experience is that imaging a
40G 5400 rpm drive onto a 120G 7200 rpm drive took somewhere between 15
minutes and half an hour.  (That was on a machine somewhat faster than a
Celery 300, but CPU speed shouldn't affect things if DMA is enabled and
the IDE controller is non-broken.)

| It has been going for 5 hours so far with no errors - when I switch back to
| the install console the screen redraw is VERY slow - indicating the machine
| is doing some thinking.

Is DMA turned on?  hdparm -d /dev/hda will tell you, hdparm -d1 /dev/hda
will enable it if it isn't already. (Where hda = {hda,hdd} as appropriate.)
It is possible that the woody kernel doesn't support DMA on your chipset
in which case the copy could easily take 12--24 hours.

| 'grep -b blah /dev/hda' or similar is not doable

Could you elaborate on 'not doable'?

# grep -b blah /dev/hda
Binary file /dev/hda matches

Admittedly it isn't terribly /useful/ but fiddling with the grep options
may get you somewhere...

Cheers,

Cameron.

_______________________________________________
plug mailing list
plug at plug.linux.org.au
http://mail.plug.linux.org.au/cgi-bin/mailman/listinfo/plug


More information about the plug mailing list