Web lists-archives.com

Re: dd to clone a drive

On Tue, Sep 26, 2017 at 09:57:57AM -0400, Jack Dangler wrote:
I have an existing drive near EOL (judging from the sounds). I got a replacement drive for it (same size).

I plugged the replacement into a USB port and started a byte-for-byte copy with

dd if=/dev/sda of=/dev/sdc

The process ran quietly for almost 30 hours with no discernable results so i killed it. Apparently, it had been running the whole time and resulted in approximately 300 of 500Gb copied. Is it 'usual' to have dd take upwards of 2 days to copy a drive ?

The source drive is a 500G 5400rpm WD, and the target is a 500G 7200rpm WD black.

Try adding bs=64k to the command line. Your current version copies 512 bytes at a time, which is painfully slow. If both drives are USB and on the same bus, that's going to be another source of performance issues. With USB2 you'll get about 20MByte/s if both are on the same bus, and about 40MByte/s if there's just one. (You can see what bus you're attached to with with "lsusb", and you can use "lsusb -t" to see the speed the device is currently using in megabits per second. If you have other busses available you can try changing ports.)

Also, you can send dd the USR1 signal to get it to show the current progress. (Try something like "pkill -x -USR1 dd")

Mike Stone