[Vserver] Unexpected behaviour with bind mounts

From: Jim Wight <j.k.wight_at_ncl.ac.uk>
Date: Fri 07 Oct 2005 - 15:12:24 BST
Message-Id: <1128694344.23173.511.camel@beadnell.ncl.ac.uk>

I am seeing odd behaviour with bind mounts. For example, if I specify

  mount --bind /tmp /vservers/tkt/opt

in pre-start, and

  umount /vservers/tkt/opt

in post-stop (or postpost-stop), I get this when I stop vserver tkt:

Shutting down system logger: [ OK ]
Starting killall: [ OK ]
umount: /tmp: not mounted
umount: /tmp: not mounted

/tmp is not mounted when the vserver has been stopped. I don't believe I
am attempting umounts from anywhere else: I have /etc/rc.d/init.d/halt
linked to /bin/true, and if I comment out the umount in
post-stop, /tmp/does not get unmounted. However, if I then attempt it
manually I get the error message as above - as well as the unmount
taking place.

While the vserver is running there isn't an entry on the host for the
mount in /proc/mounts - should there be? - but there is in /etc/mtab.

Also, while the vserver is running, df on the host shows this:

# df /tmp /vservers/tkt/opt
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 5124508 1563176 3561332 31% /
/tmp 5242716 3033028 2209688 58% /vservers/tkt/opt

Note that the numbers in the /tmp line are different from when I perform
the same mount directly on the host, where df shows:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda5 5124508 1563176 3561332 31% /
/tmp 5124508 1563176 3561332 31% /vservers/tkt/opt

In this case there is an entry in /proc/mounts. The numbers in the /tmp
line in the first case are those for the /vservers partition.

How much of the above relating to the vserver is normal, and how much
abnormal? Within the vserver, the contents of /opt are those of the
host's /tmp, so none of this is actually stopping me from doing
anything. It just doesn't seem right.

I'm using kernel with patch- and
util-server-0.30.208. Both the host and the vserver are based on Fedora
Core 4.


Vserver mailing list
Received on Fri Oct 7 15:12:47 2005

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Fri 07 Oct 2005 - 15:12:50 BST by hypermail 2.1.8