[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-lvm
Subject: Re: [linux-lvm] copy lv from lv?
From: Ray Morris <support () bettercgi ! com>
Date: 2011-03-30 18:28:37
Message-ID: 20110330132837.07e8d0ea () bettercgi ! com
[Download RAW message or body]
> 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.
> 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
Some people use snapshots for that purpose. I'm not one of those
people, so I don't know details, other than that it can be done.
If you are creating that template guest, meaning that you can choose
the filesystem layout, etc., the most efficient but less flexible
option may be to decide explicitly what's read only. The liveCD
crowd has documented procedures gained from their experience in
making most of the system read only. As a side benefit, such systems
can't be rooted or screwed up in some ways, so there's a level of
trust knowing the core system is "correct". Then you could mount
the same image for the readonyl portions of many guests, while
mounting "per guest" images for /home, /tmp, etc.
--
Ray Morris
support@bettercgi.com
Strongbox - The next generation in site security:
http://www.bettercgi.com/strongbox/
Throttlebox - Intelligent Bandwidth Control
http://www.bettercgi.com/throttlebox/
Strongbox / Throttlebox affiliate program:
http://www.bettercgi.com/affiliates/user/register.php
On Wed, 30 Mar 2011 21:49:21 +0800 (CST)
yue <ooolinux@163.com> wrote:
> 1..how to pipe two copy together
> 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
>
>
>
>
> At 2011-03-30 01:48:14,"Ray Morris" <support@bettercgi.com> wrote:
>
> >> if lvm do not support lv copy? it is better copy on write.
> >> dd takes long time.
> >
> >For a complete copy the only thing faster than "dd" is two
> >copies of "dd" piped together. dd is basically limited by
> >the speed of the physical disks, assuming proper arguments
> >to dd. For a copy on write, that's called a snapshot. LVM
> >COULD beused to copy, by making and splitting a mirror, but
> >that's going to be a lot slower than dd. (Though a mirror and
> >split can be used on a live filesystem, wth it unmounted only
> >for an instant during the split).
> >--
> >Ray Morris
> >support@bettercgi.com
> >
> >Strongbox - The next generation in site security:
> >http://www.bettercgi.com/strongbox/
> >
> >Throttlebox - Intelligent Bandwidth Control
> >http://www.bettercgi.com/throttlebox/
> >
> >Strongbox / Throttlebox affiliate program:
> >http://www.bettercgi.com/affiliates/user/register.php
> >
> >
> >
> >
> >On Tue, 29 Mar 2011 20:53:37 +0800 (CST)
> >yue <ooolinux@163.com> wrote:
> >
> >> if lvm do not support lv copy? it is better copy on write.
> >> dd takes long time.
> >>
> >> thanks
> >
> >_______________________________________________
> >linux-lvm mailing list
> >linux-lvm@redhat.com
> >https://www.redhat.com/mailman/listinfo/linux-lvm
> >read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic