From: Sam Vilain (sam_at_vilain.net)
Date: Fri 29 Oct 2004 - 00:10:04 BST
Found that tricky can't-remove-the-mount-point bug.
clunker:/vservers# mkdir compileit
clunker:/vservers# grep compileit /etc/fstab
/dev/clunker/compileit /vservers/compileit ext3 defaults 1 2
clunker:/vservers# mount compileit/
kclunker:/vservers# journald starting. Commit interval 5 seconds
EXT3 FS on dm-1, internal journal
EXT3-fs: mounted filesystem with ordered data mode.
vserver bind start
Mounting shadow filesystems for bind
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting domain name service: named.
clunker:/vservers# vserver bind exec grep comp /proc/mounts
clunker:/vservers# grep comp /proc/mounts
/dev/clunker/compileit /vservers/compileit ext3 rw 0 0
clunker:/vservers# vserver bind exec cat /proc/mounts
clunker:/vservers# umount compileit
clunker:/vservers# rmdir compileit
rmdir: `compileit': Device or resource busy
clunker:/vservers# vserver bind stop
Sending all processes the TERM signal...done.
Sending all processes the KILL signal...done.
clunker:/vservers# rmdir compileit/
clunker:/vservers#
Look! It works with tmpfs, too!
clunker:/vservers# mkdir foo
clunker:/vservers# mount -t tmpfs none foo
clunker:/vservers# vserver bind start
Mounting shadow filesystems for bind
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting domain name service: named.
clunker:/vservers# umount foo
clunker:/vservers# rmdir foo
rmdir: `foo': Device or resource busy
clunker:/vservers# vserver bind stop
Sending all processes the TERM signal...done.
Sending all processes the KILL signal...done.
clunker:/vservers# rmdir foo
clunker:/vservers#
This really shouldn't happen for mount points which are entirely outside
the chroot of the new namespace, but I think this may be another point
of our `chroot/pivot_root/vnamespace/mount --rbind/chcontext' chicken,
egg, rooster, barn and farmer problem.
For mount points which are *inside* the chroot, is this a bug or a
feature? Is it possible to have a filesystem mounted on a path in one
namespace, then remove the underlying directory?
Versions:
Kernel: 2.6.9-final-vs1.9.3-rc3
VS-API: 0x00010022
util-vserver: 0.30.195; Oct 10 2004, 16:55:15
-- Sam Vilain, sam /\T vilain |><>T net, PGP key ID: 0x05B52F13 (include my PGP key ID in personal replies to avoid spam filtering) _______________________________________________ Vserver mailing list Vserver_at_list.linux-vserver.org http://list.linux-vserver.org/mailman/listinfo/vserver