Swapping HDD....

Maciek Borzęcki maciek.borzecki at gmail.com
Sat Dec 29 18:28:02 UTC 2012


On Fri, 2012-12-28 at 00:37 +0100, Reindl Harald wrote:
> dd if=/dev/sd<source> of=/dev/sd<target> bs=16M
> and wait................. there is no progress visible!

Well, not exactly. One can use kill -USR1 <PID of dd> to see the current
progress report.

> 
> dd if=/dev/sda | ssh root at 192.168.196.129 "dd of=/dev/sda bs=16M" &
> dd if=/dev/sdb | ssh root at 192.168.196.129 "dd of=/dev/sdb bs=16M" &
> dd if=/dev/sdc | ssh root at 192.168.196.129 "dd of=/dev/sdc bs=16M" &
> dd if=/dev/sdd | ssh root at 192.168.196.129 "dd of=/dev/sdd bs=16M" &
and if shell pipe is used, pv can be really useful, use it like this:
dd .... | pv | ssh ....

and you'll get a nifty speed report, that corresponds to the rate at
which ssh reads from pv's output (~network throughput).
IMO pv can be used for local dd use as well, just do:
dd if=/dev/sd<source> bs=16M | pv | dd of=/dev/sd<target> bs=16M



-- 
Maciek Borzecki




More information about the users mailing list