[lxc-users] zfs snapshot point

Serge Hallyn serge.hallyn at ubuntu.com
Tue Jul 8 15:51:44 UTC 2014


Quoting Chris Burroughs (chris.burroughs at gmail.com):
> On 07/07/2014 10:21 AM, Serge Hallyn wrote:
> >Quoting Chris Burroughs (chris.burroughs at gmail.com):
> >>Currently when using lxc-snapshot the snapshot point is the rootfs
> >>dataset. (so something like /lxc/foo/rootfs)  I'm trying to
> >>understand why the dataset doesn't also include the config file (so
> >>/lxc/foo/). Isn't that file also needed to reconstitute a snapshot,
> >>or is that information duplicated somewhere inside the rootfs?
> >
> >It's not duplicated inside the rootfs, and on the one hand what you
> >suggest can make sense.  However, consider that the rootfs of a
> >system container often can be directly used to boot a full virt vm
> >(i.e. kvm) or even bare metal host, and consider things like lvm-,
> >loop-, and qemu-nbd-backed containers.
> >
> >That's not to say we couldn't make btrfs and zfs behave differently,
> >but doing that will complicate things at the higher levels, i.e.
> >toolsets which are using the lxc api to provide containers for
> >something (a build farm, whatever) when they are switched from one
> >backing store type to another.
> >
> 
> Thanks, the take-advantage-of-the-tool vs 'do the same thing as the
> other tool' tradeoff makes sense.
> 
> For ZFS a 3rd option might be making both /lxc/foo and
> /lxc/foo/rootfs a dataset.

Oh is that possible?  With rootfs being a 'sub-dataset' or something
in /lxc/foo?  And both /lxc/foo and /lxc/foo/rootfs can be
snapshotted?  That'd be neat.

> That way ZFS folks can snpapshot at will
> while rootfs being treated more or less the same as everything else.

Would you be able to post a patch to do that? It sounds perfect, and
I'm sure Tamas would love to see it.

-serge


More information about the lxc-users mailing list