increasing dd disk to disk transfer rate
Dan Nelson
dnelson at allantgroup.com
Thu Jan 12 07:39:28 PST 2006
In the last episode (Jan 12), Christoph Kukulies said:
> My notebooks' hard disk, a Hitachi Travelstar 80 GB starts to develop
> read errors. I have FreeBSD and Win XP on that disk. Although FreeBSD
> ist still working , the errors in the Windows partition are causing
> Windows do ask for a filesystem check nearly everytime I reboot the
> computer. One time the error was in the hibernate.sys file, which
> impedes powering up quickly after a hibernate.
>
> Anyway, I decided to buy a second identical hard disk and tried to
> block by block copy the old disk to the new one using
>
> dd if=/dev/ad2 of=/dev/ad3 conv=noerror
>
> The process is running now since yesterday evening and it is at 53 MB
> at a transfer rate of about 1.1 MB/s.
Everybody has mentioned the first obvious fix: raise your blocksize
from the default 512 bytes. The second fix addresses the problem that
with a single dd, you are either reading or writing. If you pipe the
first dd into a second one, it'll let you run at the max speed of the
slowest device.
dd if=/dev/ad2 conv=noerror,sync bs=64k | dd of=/dev/ad3 bs=64k
--
Dan Nelson
dnelson at allantgroup.com
More information about the freebsd-hackers
mailing list