[linux-lvm] copy lv from lv?

Stuart D. Gathman stuart at bmsi.com
Thu Mar 31 00:27:52 UTC 2011


On Wed, 30 Mar 2011, Ray Morris wrote:

>> 1..how to pipe two copy  together
>
> This is what I use after some experimenting.  I've found
> it's often far faster than the more obvious use of dd:
>
> nice -5 dd if=/dev/clones/from bs=64M iflag=direct |
>        dd of=/dev/scratch/to bs=64M oflag=direct
>
> I use 64 MB extents. For smaller extents, a matching dd
> block size might be good.

Thanks for that recipe.  It ought to be in lvm2 as an lvcopy utility
(dynamically determining extent size, etc).

>> 2.i take lv as xen-guestOS's  disk. usually many  guestOS created
>> from one lv(called template), maybe many data is readonly, so  if  so
>> many lvs share readonly part ,and have its private data? COW save
>> disk space, and take less time. i do not think snapshot is sutable
>> for this case. thanks

As long as the origin is not often modified, having many snapshots
is efficient.  Each write to the origin will of course entail a write
to each snapshot.  (And as I discovered recently, if write barriers are
disabled or buggy at any hardware or software layer, a power failure during
heavy writes to the origin is particularly vulnerable to write reordering 
corrupting a snapshot.  So make sure UPS is working before updating the
origin.)

--
 	      Stuart D. Gathman <stuart at bmsi.com>
     Business Management Systems Inc.  Phone: 703 591-0911 Fax: 703 591-6154
"Confutatis maledictis, flammis acribus addictis" - background song for
a Microsoft sponsored "Where do you want to go from here?" commercial.




More information about the linux-lvm mailing list