Skip to contentSkip to conversation

RFE?: why no 'bind' info in /proc/mounts?

DISCUSSION Linda Walsh 3 participants 4 messages Nov 1, 2013

lore
Share & tools
lore
#0 lore raw

If I only mount 1 file (or a subdir) via "bind", it still shows the entire device being mounted on the "bound" directory.

Is there anyway to get a bit more granularity as to *what* was bound on a name? (subdir/file..?)

#1 lore raw
Quoted 6 lines · On Thu, 31 Oct 2013 18:06:01 -0700 Linda Walsh <[email protected]> wrote:

If I only mount 1 file (or a subdir) via "bind", it still shows the entire device being mounted on the "bound" directory.

Is there anyway to get a bit more granularity as to *what* was bound on a name? (subdir/file..?)

Take a look in /proc/self/mountinfo. It contains more useful stuff about the mount table which couldn't be put in /proc/mounts without breaking compatibility.

NeilBrown

#2 lore raw

Ah... didn't know about the other format file... thanks!

Quoted 6 lines · NeilBrown

Take a look in /proc/self/mountinfo. It contains more useful stuff about the mount table which couldn't be put in /proc/mounts without breaking compatibility.

NeilBrown

#3 lore raw
Quoted 3 lines · Linda Walsh

Ah... didn't know about the other format file... thanks!

Or use more user friendly findmnt(8) command:

 # mount --bind /usr/local/bin /mnt/test
 # findmnt  /mnt/test
 TARGET    SOURCE                    FSTYPE OPTIONS
 /mnt/test /dev/sda4[/usr/local/bin] ext4   rw,relatime,data=ordered

Karel

Quoted 6 lines · NeilBrown
Quoted 5 lines

Take a look in /proc/self/mountinfo. It contains more useful stuff about the mount table which couldn't be put in /proc/mounts without breaking compatibility.

NeilBrown

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com