LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   dd - how long does it take for a 500GB drive (https://www.linuxquestions.org/questions/linux-general-1/dd-how-long-does-it-take-for-a-500gb-drive-895303/)

masontech@compren.com 08-03-2011 08:43 AM

dd - how long does it take for a 500GB drive
 
Doing a complete backkup of one drive to another, creating a duplicate. Using the command dd if=/dev/sda of=/dev/sdb. I have used this before on a 40GB drive. This time I'm doing a 500GB drive - does anyone have an wild guess on how long it should take?

crts 08-03-2011 09:14 AM

Hi,

the exact time will depend on the speed of your harddisks. Are they external USB harddisks? Both internal? SATA?
You can calculate the time with the following formula:
Code:

500*2^10/X
Where X is the average speed. You can determine it by running a test. You can copy 1GB between those two disks and see which average speed you get. E.g., I get for 1GB:
Code:

$ dd if=dummy of=dummy2
2097152+0 records in
2097152+0 records out
1073741824 bytes (1.1 GB) copied, 53.0985 s, 20.2 MB/s

The bold part is the value for X. You do not need to convert the 'MB'. So 500GB would take
Code:

500*2^10/20 = 25600 seconds =~ 425 minutes =~ 7 hours
Note, that I copied the from and to the same disk. If you are using two different disks then you will probably get higher transfer rates.

masontech@compren.com 08-03-2011 09:46 AM

Perfect, thank you. The command prompt has not returned, so it appears to still be copying. Although I have heard that sometimes this happens, even though it has completed. It has been going now for 13 hours, so I will stop it and see if I have a good copy.

crts 08-03-2011 09:54 AM

Quote:

Originally Posted by masontech@compren.com (Post 4432698)
Although I have heard that sometimes this happens, even though it has completed.

Where did you hear that? If you want to see the progress while the dd command is running then issue it in this manner:
Code:

dd if=/path/to/source of=/path/to/target bs=1M & pid=$!
This will start dd in the background. You can check the progress with
Code:

kill -USR1 $pid


All times are GMT -5. The time now is 06:11 AM.