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

Fajar A. Nugraha list at fajar.net
Fri Feb 13 03:31:40 UTC 2015


On Thu, Feb 12, 2015 at 12:26 AM, Marco <foobar.angus at gmail.com> wrote:
> 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!
> i.e. : << lxc_container: error: Original container (lxc1) is running >>
> It actually works when I lxc-stop the container.
> ==>This means I cannot do a snapshot of a live container.
> Does this depends on LVM or the same apply for btrfs and zfs?
> BTW, all the online examples I've found regarding "lxc-clone -s" seems to
> assume online clone snapshotting !
>

Can you explain what you're trying to achieve?

On zfs backend, lxc-snapshot pretty much does zfs snapshot-clone, and
then modifies the necessary lxc config files. If you're ONLY looking
for somekind of ONLINE snapshot of the STORAGE, and don't really care
about running state, then doing storage-level snapshot directly should
be more appropriate for you.

You will get the same level of consistency that you'd get when there's
a power loss: some apps (e.g. database with journaling) should be able
to recover cleanly. If your container can restart cleanly when there's
a power loss, it should be able to use the storage-level snapshot for
backup/recovery purposes.

If you're looking for vmware/virtualbox-like snapshot where the
in-memory state is also preserved, then this is not for you.

-- 
Fajar


More information about the lxc-users mailing list