[Lxc-users] lxc-clone
Serge Hallyn
serge.hallyn at canonical.com
Mon Aug 29 13:19:51 UTC 2011
Quoting Ramez Hanna (rhanna at informatiq.org):
> Hi,
>
> I have started using lxc to setup a pre-production system instead of KVM
> at first glance clone seemd to me that it would copy everything to a new roots
> but turns out that in case of LVM it will snapshot
> AFAIK snapshots are meant more for backup or testing some changes and
> discarding them later
> do you think it makes sense if I modify the script in this way
> if user doesn't specify -s, then a new lv is created and copy all
> comtents to it, rather than snapshot which would work if user uses the
> -s option?
Yes, I guess I didn't implement that bit yet, but not specifying -s was
meant to do a simple copy. You'll probably want to check whether the
original was a simple directory tree or an lvm, and only lvcreate if the
original was an lvm. (then lxc-convert can offer conversion from one to
the other.)
-serge
More information about the lxc-users
mailing list