LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   how to copy drive using dd and tee command parallely? source code of dd command (https://www.linuxquestions.org/questions/linux-software-2/how-to-copy-drive-using-dd-and-tee-command-parallely-source-code-of-dd-command-788277/)

mdfakkeer 02-10-2010 12:24 PM

how to copy drive using dd and tee command parallely? source code of dd command
 
i want to copy one harddisk to one or more harddsik simultaneously. i found from forum to use dd with tee command. i used the following command.

dd if=/dev/sda | tee >(dd of=/dev/sdb) >(dd of=/dev/sdc)|dd of=/dev/sdd

it copy all the files from the source sda to sdb,sdc,sdd. But it take the source file from sda and copied first on sdb then sdc then sdd on squential manner. After it copied the first file, it takes the second file to copy to all drives.But i want to copy the file parallely all the drive simultaneously. i come to know tee is the squential file copying utility. Any body know about the parallel copy to all drive simultaneously.

rweaver 02-10-2010 01:31 PM

Start one and background it, repeat.

Although you're quickly going to max out your drive's io like that.

eg:
Code:

dd if=/dev/sda of=/dev/sdb &
dd if=/dev/sda of=/dev/sdc &
dd if=/dev/sda of=/dev/sdd &

edit: likely to the point of becoming slower than a sequential copy.


All times are GMT -5. The time now is 03:43 PM.