[Lxc-users] bind (re)mount possible?

Serge Hallyn serge.hallyn at ubuntu.com
Fri Oct 25 05:35:04 UTC 2013


Quoting Ulli Horlacher (framstag at rus.uni-stuttgart.de):
> On Thu 2013-10-24 (15:11), Serge Hallyn wrote:
> 
> > If your kernel is new enough (check whether /proc/self/ns/mnt exists)
> > you could lxc-attach into the container with the -e flag to keep
> > elevated privileges, and do the remount.
> 
> Ubuntu 12.04:
> 
> root at vms3:~# l /proc/self/ns/mnt
> l: /proc/self/ns/mnt - No such file or directory
> 
> root at vms3:~# uname -a
> Linux vms3 3.2.0-55-generic #85-Ubuntu SMP Wed Oct 2 12:29:27 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
> 
> What is "new enough"?
> 
> So, from the host system, a remount is not possible?

Correct.  The container is in a private mount namespace,
and you cannot enter it.  You can view it somewhat through
/proc/$pid/root, but you can't mount under that because
you'd be trying to mix two vfsmounts belonging to different
mount namespaces.

-serge




More information about the lxc-users mailing list