Re: /etc/mtab and per-process namespaces

From: Rob Landley
Date: Sat Oct 22 2005 - 12:02:00 EST


On Sunday 02 October 2005 17:08, David Leimbach wrote:
> I've been just playing around with the v9fs work and private
> namespaces from yesterday's [October 1, 2005] top of tree from Linus'
> git archive and I was looking at /etc/mtab's reaction to having
> multiple namespaces with bind mounts.

Oh you don't need namespaces to hork mtab. Do a mount from a chroot
environment. Or try to use --bind or --move mounts (at all) and watch it beg
for mercy. (I accidentally ran UserMode Linux as root once, using a hostfs
root filesystem to borrow the existing Linux's root filesystem, and its'
mounts edited the parent system's /etc/mtab. Yeah, that was user error on my
part, but it's also the _only_ gotcha I've found when doing that.)

/etc/mtab is simply brittle. Personally, on systems I build, I ln
-s /proc/mounts /etc/mtab

Rob
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/