[lxc-users] [lxd] autofs

Tycho Andersen tycho.andersen at canonical.com
Fri Jul 1 19:57:54 UTC 2016


On Fri, Jul 01, 2016 at 04:15:57PM +0200, Rémy Dernat wrote:
> Hi,
> 
> I tried to install basically autofs in the container and mount directories
> with automount, but as a newbie, everything failed ;)
> 
> automount -f --debug
> automount: test mount forbidden or incorrect kernel protocol version,
> kernel protocol version 5.00 or above required.
> 
> I know that in OpenVZ, you need to mount the filesystem on the host and
> then use simfs on the container through a container "mount" file.
> Then, I saw problems with LXC here:
> http://comments.gmane.org/gmane.linux.kernel.containers.lxc.general/894
> And after reading https://github.com/lxc/lxd/issues/714 , I tried:
> 
> lxc config device add my-container autofs unix-char path=/dev/autofs
> 
> Now on container side:
> #ls -l /dev/autofs
> crw-rw---- 1 root root 10, 235 Jul  1 14:06 /dev/autofs
> 
> 
> However, the issue is still here:
> automount -f --debug
> automount: test mount forbidden or incorrect kernel protocol version,
> kernel protocol version 5.00 or above required.
> 
> "autofs4" module is loaded in the kernel.
> 
> I tried to remove/purge autofs and switch to autofs5 package and I have
> also the same error.

Is the container privileged? Are you in an apparmor mode which allows
mounts? I don't think unprivileged mounting of autofs is allowed, and
our apparmor profiles by default disallow most kinds of mounts.

> The container, like the host are ubuntu16.04.
> 
> Any help would be useful !
> 
> Best regards,
> Remy

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list