<div dir="ltr">Stéphane,<div><br></div><div>for the use case I have in mind it might actually be ok, I'm just trying to avoid installing and running some stuff on the root box, but I have no problems with the entire zfs pool being exposed to this specific container. How would I go about doing that?</div><div><br></div><div>thanks,</div><div><br></div><div>Spike</div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Apr 2, 2017 at 11:56 AM Stéphane Graber <<a href="mailto:stgraber@ubuntu.com">stgraber@ubuntu.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sun, Apr 02, 2017 at 06:51:30PM +0000, Spike wrote:<br class="gmail_msg">
> Hi,<br class="gmail_msg">
><br class="gmail_msg">
> I'm playing with various combinations of virtualization and backends to<br class="gmail_msg">
> find the best way to manage some samba and nfs exports and one of the<br class="gmail_msg">
> options I'm considering is the following:<br class="gmail_msg">
><br class="gmail_msg">
> - run a lxd container backed up by zfs<br class="gmail_msg">
> - create a ZVOL on zfs<br class="gmail_msg">
> - export the VZOL to the container as a block device<br class="gmail_msg">
> - create a zpool from that device inside the container<br class="gmail_msg">
> - export that<br class="gmail_msg">
><br class="gmail_msg">
> however I can't seem to be able to make the container see and manage zfs<br class="gmail_msg">
> stuff. firs off it seems that the container needs to be privileged, which<br class="gmail_msg">
> is ok, it's not hosting anything or providing any public services. Second,<br class="gmail_msg">
> I got the impression that I need to expose the /dev/zfs from the host to<br class="gmail_msg">
> the container? is that the case? is there no way to create a second one<br class="gmail_msg">
> with access just to the ZVOL?<br class="gmail_msg">
><br class="gmail_msg">
> thanks for any help,<br class="gmail_msg">
><br class="gmail_msg">
> Spike<br class="gmail_msg">
<br class="gmail_msg">
ZFS unfortunately doesn't work in containers.<br class="gmail_msg">
<br class="gmail_msg">
All ZFS configuration goes through /dev/zfs and that device isn't<br class="gmail_msg">
namespace aware, so granting access to it in the container would let the<br class="gmail_msg">
container see and manage the host zpool.<br class="gmail_msg">
<br class="gmail_msg">
I've been told a couple of years ago by the ZFS on Linux maintainer that<br class="gmail_msg">
they were looking at making ZFS on Linux container aware (in a way<br class="gmail_msg">
similar to Solaris' implementation) but I don't believe this has<br class="gmail_msg">
resulted to any code being merged at this point.<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Stéphane Graber<br class="gmail_msg">
Ubuntu developer<br class="gmail_msg">
<a href="http://www.ubuntu.com" rel="noreferrer" class="gmail_msg" target="_blank">http://www.ubuntu.com</a><br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
lxc-users mailing list<br class="gmail_msg">
<a href="mailto:lxc-users@lists.linuxcontainers.org" class="gmail_msg" target="_blank">lxc-users@lists.linuxcontainers.org</a><br class="gmail_msg">
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div>