/etc/mtab and per-process namespaces

From: David Leimbach (leimy2k_at_gmail.com)
Date: 10/03/05

  • Next message: Pete Zaitcev: "Re: PATCH] incrase usbdevfs bulk buffer size"
    Date:	Sun, 2 Oct 2005 15:08:49 -0700
    To: Linux Kernel <linux-kernel@vger.kernel.org>
    
    

    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.

    I have a directory ("slash") and bind it to "/" in a new namespace
    created with a clone call. /etc/mtab then has a line appended to it
    for this bind.

    / /home/dave/slash none rw,bind 0 0

    Then in the "global default" namespace I do the same thing. This adds
    yet another line to my /etc/mtab with exactly the same contents.

    I then exited both shells and /etc/mtab is left with both lines:

    / /home/dave/slash none rw,bind 0 0
    / /home/dave/slash none rw,bind 0 0

    Did I just "leak" a namespace or is mtab just way off from reality now?

    Also, if I check the procfs it seems to have no record of either of
    these binds ever occurring. [/proc/mounts]

    Also, does it make sense to even think about adding a pid column
    number for the "private" namespaces or perhaps just to mark it as
    "priv" or something to that effect.

    It's not clear to me what the best way to deal with this would be.
    Right now it appears to be broken or at least very inconsistent.

    I can think of a lot of ways to use private namespaces to avoid
    conflicts with software installations... much like the DragonFlyBSD
    folks use variant symlinks to have two-level data about what version
    of libx libx.so links to. I just think private namespaces make this a
    bit more elegant to handle, especially in the context of Xen and
    upcoming virtualization hardware from Intel and AMD. As such I find
    this feature of linux [and Plan 9/Inferno - where it came from] to be
    pretty important.

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


  • Next message: Pete Zaitcev: "Re: PATCH] incrase usbdevfs bulk buffer size"

    Relevant Pages

    • Re: [patch 0/8] unprivileged mount syscall
      ... All we need is a comment from Andrew, and the replies come flooding in;) ... user mounts to private namespaces. ... to get a shell in a new mounts namespace. ...
      (Linux-Kernel)
    • Re: [patch 0/8] unprivileged mount syscall
      ... user mounts to private namespaces. ... to get a shell in a new mounts namespace. ... that shared subtree functionality was making its way up into mount. ...
      (Linux-Kernel)
    • Re: [patch 0/8] unprivileged mount syscall
      ... user mounts to private namespaces. ... to get a shell in a new mounts namespace. ... Or rather, what's the reason, that cloneis privileged ...
      (Linux-Kernel)
    • Re: [patch 0/8] unprivileged mount syscall
      ... All we need is a comment from Andrew, and the replies come flooding in;) ... user mounts to private namespaces. ... they better show me some working and simple-to-use userspace ...
      (Linux-Kernel)
    • Re: Updated git HOWTO for kernel hackers
      ... > I think there should simply be two namespaces - public tags and private ... I guess that public tags would also probably be in a different ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)