linux-lvm.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Ray Morris <support@bettercgi.com>
To: LVM general discussion and development <linux-lvm@redhat.com>
Cc: ooolinux@163.com
Subject: Re: [linux-lvm] copy lv from  lv?
Date: Wed, 30 Mar 2011 13:28:37 -0500	[thread overview]
Message-ID: <20110330132837.07e8d0ea@bettercgi.com> (raw)
In-Reply-To: <5fe2faea.20827.12f07068fe6.Coremail.ooolinux@163.com>

> 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/

  reply	other threads:[~2011-03-30 18:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-29 12:53 [linux-lvm] copy lv from lv? yue
2011-03-29 17:48 ` Ray Morris
2011-03-30 13:49 ` yue
2011-03-30 18:28   ` Ray Morris [this message]
2011-03-31  0:27     ` Stuart D. Gathman
2011-03-31 12:15       ` Zdenek Kabelac
2011-04-05 16:25         ` Ray Morris
2011-04-05 21:10           ` Zdenek Kabelac
2011-04-05 21:29             ` [linux-lvm] Taking it off list - " Ray Morris
2011-04-01  2:46     ` [linux-lvm] " yue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110330132837.07e8d0ea@bettercgi.com \
    --to=support@bettercgi.com \
    --cc=linux-lvm@redhat.com \
    --cc=ooolinux@163.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).