[Lxc-users] zfs support
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Apr 4 15:52:44 UTC 2013
Quoting Papp Tamas (tompos at martos.bme.hu):
> On 04/04/2013 03:54 PM, Serge Hallyn wrote:
> >
> >If you want to go ahead and send a full patch against the current
> >lxc-clone.in script, that should help me reproduce what you want in
> >the api version.
>
> I have limited scripting skills, but I do my best.
>
> >Will the path used as rootfs always be a zfs mountpoint? (I.e. not a
> >subdir?) If so that'll make it easier to detect zfs mounts
> >automatically.
>
> Right now -B btrfs creates a subvolume for $lxc_path/$lxc_name/rootfs.
> And earlier in this thread we agreed, that $lxc_path/$lxc_name would be better.
>
> Of course the same for zfs.
>
>
> So not the rootfs, but the path used as $lxc_name. Yes, you can always assume it's a mountpoint.
> If not, it's just ot -B zfs, but something else.. -B dir or whatever is the default.
>
>
> Cheers,
> tamas
>
> ps. Be aware, there can be mountpoints under rootfs, eg.:
>
>
> zfs create -o mountpoint=/var/lib/lxc/CONTAINER tank/lxc/CONTAINER
> zfs create -o mountpoint=/var/lib/lxc/CONTAINER/rootfs/var/mail tank/lxc/CONTAINER/mail
>
>
> Do you plan to support this case?
I was thinking about that last night, and I think the sanest thing I
can do is to go over all of the lxc.mounts and copy or snapshot any
which src from under $lxc_path/$lxc_name/. So if you have
/some/other/path being mounted in, it will not be copied/snapshotted.
The alternative (which also has its merits) would be that anything
which is not a pseudofs (i.e. not proc or sys) or a bind mount
(especially for '-b user' homedir bindmounting) would be copied...
Once the basic bdev support is there, switching between one and the
other shouldn't be a big deal, so deciding which to do isn't crucial
right now. We just want to make sure that we have something which
will always work for us before the final patch goes into lxc 1.0.
-serge
More information about the lxc-users
mailing list