Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1406505

Re: Mount namespace "dominant peer group"?

From "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Newsgroups linux.kernel
Subject Re: Mount namespace "dominant peer group"?
Date 2016-05-25 01:00 +0200
Message-ID <rCtsR-Yb-3@gated-at.bofh.it> (permalink)
References <rB09z-2IX-1@gated-at.bofh.it> <rB1S2-3Ye-9@gated-at.bofh.it> <rBeFA-3BG-5@gated-at.bofh.it> <rBSWm-34x-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 05/23/2016 02:55 AM, Miklos Szeredi wrote:
> C is slave of B is slave of A.  If a process can see (i.e. has under
> its root) A and C but not B then for C it will show
> master:B,propagate_from:A.  This piece of information is shown because
> it can't see the immediate master (B) and so cannot determine the
> chain of propagation between the mounts it can see.

Thanks, Miklos!

> Concrete example:

Yep, that does it. Thanks for the walk through!

One piece missing below though, in case anyone else tries to walk
through.

> # mount --bind / /mnt
> # mount --bind /proc /mnt/proc
> # mount --make-private /mnt
> # mount --make-shared /mnt
> # mkdir /tmp/etc
> # mount --bind /mnt/etc /tmp/etc
> # mount --make-slave /tmp/etc
> # mount --make-shared /tmp/etc

# mkdir /mnt/tmp/etc

> # mount --bind /tmp/etc /mnt/tmp/etc
> # mount --make-slave /mnt/tmp/etc
> # cat /proc/self/mountinfo | grep /tmp/etc
> 164 40 253:1 /etc /tmp/etc rw,relatime shared:100 master:97 - ...
> # chroot /mnt
> # cat /proc/self/mountinfo
> 129 62 253:1 / / rw,relatime shared:97 - ...
> 168 129 253:1 /etc /tmp/etc rw,relatime master:100 propagate_from:97 - ...

Cheers,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-20 23:30 +0200
  Re: Mount namespace "dominant peer group"? Ram Pai <linuxram@us.ibm.com> - 2016-05-21 01:20 +0200
    Re: Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-21 15:00 +0200
      Re: Mount namespace "dominant peer group"? Miklos Szeredi <mszeredi@redhat.com> - 2016-05-23 10:00 +0200
        Re: Mount namespace "dominant peer group"? "Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com> - 2016-05-25 01:00 +0200

csiph-web