[lxc-users] lxc 1.0.6 / lvm / snapshot and clone

Marco foobar.angus at gmail.com
Sun Feb 15 15:09:42 UTC 2015


Hi,

On 12 febbraio 2015 16:08, Serge Hallyn <serge.hallyn at ubuntu.com> wrote:

> Quoting Marco (foobar.angus at gmail.com):
> > Hi,
> > I've some questions for which I couldn't find good answers online and I'd
> > like your suggestions.
> >
> > OS: Linux/Debian 8 Jessie
> > LXC: 1.0.6-6
> > Backing store: LVM
> >
> > It seems that snapshot clones cannot be done online :
> > "lxc-clone -s"  require the original container to be stopped!
>
> Yes.  If you want a live snapshot you can checkpoint with criu.  If you
> snapshot disk while userspace is running you can get inconsistent files
> in the clone.  (Which will then be reported as bugs against lxc.)
>

Ok, I was looking for something more like saving memory and disk, in fact.
Thanks for the clarification.

[snip]


> > ==>What is the difference between "lxc-clone -s" and "lxc-snapshot" ?
>
> lxc-clone creates a new container with the name you specify.
> lxc-snapshot uses lxc-clone, but stashes the clone under the
> container's directory.
>
>
I'd then expect  that "lxc-snapshot" works if "lxc-clone -s" is working,
ok?
On my LVM backed containers, I can make snapshots with "lxc-clone -s" and
they work just fine:
root at deb:~# lxc-clone -s lxdeb8 clone-lxdeb8
  Logical volume "clone-lxdeb8" created
Created container clone-lxdeb8 as snapshot of lxdeb8

Then I can start the container and the clone and they work just fine.
So lxc-clone -s on LVM seems to be working right.


> !commit cdd01be26ea320a8b5be313a864cb553df90c33e
> !Author: Serge Hallyn <serge.hallyn at ubuntu.com>
> !Date:   Fri Aug 8 15:00:18 2014 +0000
> !
> !  Do not allow snapshots of LVM backed containers
> !
> !  They don't work right now, so until we fix that, don't allow it.
>
>
This puzzle me a little bit because "lxc-clone -s" is making snapshots of
my LVM container, as previously stated.
Being used under the hood "lxc-clone -s", as you said, It's not clear at
all what's going wrong:
root at deb:~# lxc-snapshot -n lxdeb8
lxc_container: lxdeb8's backing store cannot be backed up.
lxc_container: Your container must use another backing store type.
lxc_container: Error creating a snapshot

>From the commit comment you provided it's said they don't work right now:
but lxc-clone -s seems to be working on LVM! Why does lxc-snapshot is
complaining about backing store?

Thanks for any clarification or pointers to documentation you would like to
provide :)
Regards,
-- Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150215/014589bd/attachment.html>


More information about the lxc-users mailing list