Re: bash script: move large LV to another machine
Ed Heron <[email protected]> Fri, 16 Sep 2011 14:09:17 -0600
| Newsgroups | gmane.org.user-groups.nmlug |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 2011-09-16 at 13:53 -0600, Geoff Chesshire wrote: > On Fri, 16 Sep 2011 13:28:14 -0600, Ed Heron <Ed-MBvgLuVkLo/[email protected]> wrote: > > > dd if=$src_dev ibs=512 skip=$lcl_blk count=65536 | ssh $dst_addr "dd > > conv=notrunc,fdatasync of=$dst_dev obs=512 seek=$lcl_blk count=65536" > > Note that the "count=65536" on the receiving side assumes ibs=512, but you > don't strictly need to specify this count. You could as well use > > dd if=$src_dev ibs=32M obs=1K skip=$src_blk count=1 | ssh $dst_addr "dd > conv=notrunc,fdatasync of=$dst_dev ibs=1K obs=32M seek=$src_blk" > > That way, dd can still read the source device and write the destination > device in 32Mb chunks. Smaller chunks may be better, though, in order to > overlap i/o and communication; it's just a matter of optimization. > > Geoff I guess the gymnastics to change block sizes for the transfer aren't significant and retain script context. I'll try it. If this were the only thing running on the machines, it wouldn't make much difference. As a working virtualization host, I'm not sure which would be nicer to the VMs; 1 big read or lots of little reads. _______________________________________________ NMLUG mailing list [email protected] http://lists.b9.com/cgi-bin/mailman/listinfo/nmlug