Not sure if this helps ... the proc "mountinfo" of any pid seems to have
the relative path of the bind source.

      # mount --bind /srv dir1
      # mount --bind /mnt dir2
      #
      # mount | grep dasdc
      /dev/dasdc1 on / type ext4
      (rw,relatime,errors=remount-ro,data=ordered)
      /dev/dasdc1 on /root/dir1 type ext4
      (rw,relatime,errors=remount-ro,data=ordered)
      /dev/dasdc1 on /root/dir2 type ext4
      (rw,relatime,errors=remount-ro,data=ordered)
      #
      # cat /proc/$$/mountinfo | grep dasdc
      23 0 94:9 / / rw,relatime shared:1 - ext4 /dev/dasdc1
      rw,errors=remount-ro,data=ordered
      558 23 94:9 /srv /root/dir1 rw,relatime shared:1 - ext4 /dev/dasdc1
      rw,errors=remount-ro,data=ordered
      596 23 94:9 /mnt /root/dir2 rw,relatime shared:1 - ext4 /dev/dasdc1
      rw,errors=remount-ro,data=ordered
      #

So checking the fourth column for a relative source of "/" may help
identify just the pure disk mounts, ex:

      # cat /proc/1/mountinfo | awk '$4 == "/" {print $0}' | grep dasdc
      23 0 94:9 / / rw,relatime shared:1 - ext4 /dev/dasdc1
      rw,errors=remount-ro,data=ordered
      #


- Mark Ver

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to lists...@vm.marist.edu with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
  • Bind mounts van Sleeuwen, Berry
    • Re: Bind mounts Mark Ver

Reply via email to