|BS||Block size. Leave it 0 to default size 32768.|
|COUNT||Copy only COUNT blocks. Leave it 0 for copy until find EOF.|
|Device to be read.|
|Nth device to be written.|
The origin data is read only once, and is replicated in the destination devices. All working in parallel: all disks working at the same time,almost without interruption.
Thus, the time to copy between devices falls considerably in relation to others existing utilities used to same propose - such as "dd".
This system was developed aiming to reduce the time of the cloning of discs with pre-installed operating systems for multiple machines, but can be used for a big variety of porpouses.
To copy from file "linux-hd1.img" to the devices hdb, hdc, and hdd: # mdcp 0 0 linux-hd1.img hdb hdc hdd To copy from device hda to hdb and hdc, first 1GB of data: # mdcp 32768 32768 /dev/hda /dev/hdb /dev/hdc Note that 32768 * 32768 = 1073741824 = 1GB
To zero-fill the firsts 10GB from devices hdb, hdc and hdd you can do:
# mdcp 0 327680 /dev/zero /dev/hdb /dev/hdc /dev/hdd Note that the name of the devices will can be change acordling to wich OS you are.
At FreeBSD OS, a copy would like as:
# mdcp 0 0 myimg.img /dev/ad1 /dev/ad2 /dev/ad3
Copying 1 gigabyte (1,073,741,824 bytes) between IDE hard disks (UDMA 133)
UTILITY FROM TO TIME(secs) Rate (b/s)
dd 0:0 1:0 29 37,025,580
dd 1:0 1:1 40 26,843,545
mdcp 0:0 1:0 20 53,687,091
mdcp 1:0 1:1 38 28,256,363
mdcp 0:0 0:1, 1:0 32 67,108,864
mdcp 0:0 1:0, 1:1 38 56,512,727
mdcp 0:0 0:1, 1:0, 1:1 40 80,530,636
0:0 = IDE 0 : Master
0:1 = IDE 0 : Slave
1:0 = IDE 1 : Master
1:1 = IDE 1 : Slave
Parameters passed to utilitys: block size = 32768, count = 32768
System: Pentium 4, 1.8GHz, 512MB of RAM
OS: FreeBSD 7
Wiritten by Wagner Monzyne. (MONZYNE, W.) <email@example.com>
Please, send email to <firstname.lastname@example.org> to describe what you has experienced with this utility. Any questions or suggestions will be welcome.
Copyright © 2008 Wagner Monzyne (MONZYNE, W.)
This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. There is NO WARRANTY, to the extent permitted by law.
|by Monzyne, W.||MDCP (1)||April 2008|