-
snapshots: move snapshot directory · 18aa217bSerge Hallyn authored
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>
18aa217b
×