[lxc-devel] /proc/mounts and bind mounts

Christophe Varoqui christophe.varoqui at free.fr
Thu Nov 12 15:21:30 UTC 2009


On jeu., 2009-11-12 at 10:22 +0100, Daniel Lezcano wrote:
> Christophe Varoqui wrote:
> > Hi Daniel, all,
> >
> > After bind mounting /tmp on /unxtstencap in a container, the
> > corresponding entry in /proc/mounts is displayed as :
> > /dev/mapper/zezette-root /unxdrpencap ext4
> > rw,relatime,errors=remount-ro,barrier=1,data=ordered 0 0
> >
> > /dev/mapper/zezette-root being the device holding /tmp.
> >
> > The source directory information is lost. Is that expected ?
> >   
> Yes and that's already the case without containers. The mount 
> information, done with the mount(1) command, write information in 
> /etc/mtab. You should check this file instead.

In the hosting system:

cvaroqui at zezette:/opt/lxc/rootfs.vm5/service$ sudo mount -t none -o
bind /tmp /mnt
cvaroqui at zezette:/opt/lxc/rootfs.vm5/service$ tail -1 /etc/mtab 
/tmp /mnt none rw,bind 0 0

It seems the information is not discarded. May be that's because the
host is ubuntu and the guest is Centos 5 then ?





More information about the lxc-devel mailing list