]> git.proxmox.com Git - mirror_lxc.git/commit - src/lxc/lxccontainer.h
snapshots: move snapshot directory
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 27 May 2014 21:24:06 +0000 (16:24 -0500)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Wed, 18 Jun 2014 21:28:39 +0000 (16:28 -0500)
commit18aa217bb187b551206fe66075229ba382a1dbe4
treec668635b7412180432546db434802daf68a79a61
parent3dbcf8b27bf3886d362564cf7d5eb3fcbd48329f
snapshots: move snapshot directory

Originally we kept snapshots under /var/lib/lxcsnaps.  If a
separate btrfs is mounted at /var/lib/lxc, then we can't
make btrfs snapshots under /var/lib/lxcsnaps.

This patch moves the default directory to /var/lib/lxc/c/snaps.
If /var/lib/lxcsnaps already exists, then we continue to use that.

add c->destroy_with_snapshots() and c->snapshot_destroy_all()
API methods.  c->snashot_destroy_all() can be triggered from
lxc-snapshot using '-d ALL'.  There is no command to call
c->destroy_with_snapshots(c) as of yet.

lxclock: use ".$lxcname" for container lock files
that way we can use /run/lock/lxc/$lxcpath/$lxcname/snaps as a
directory when locking snapshots without having to worry about
/run/lock//lxc/$lxcpath/$lxcname being a file.

destroy: split off a container_destroy
container_destroy() doesn't check for snapshots, so snapshot_rename can
use it.  api_destroy() now does check for snapshots (previously it only
checked for fs - i.e. overlayfs/aufs - snapshots).

Add destroy to the manpage, as it was previously undocumented.

Update snapshot testcase accordingly.

[ rebased in the face of commits 840f05df and 7e36f87e. ]

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: S.Çağlar Onur <caglar@10ur.org>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
doc/lxc-snapshot.sgml.in
src/lxc/bdev.c
src/lxc/lxc_snapshot.c
src/lxc/lxccontainer.c
src/lxc/lxccontainer.h
src/lxc/lxclock.c
src/lxc/utils.c
src/lxc/utils.h
src/tests/snapshot.c