mount has an option --make-shared as described here. However, how do I find out if a particular mount point has been made shared?
What's an easy way to see whether a mount point has been made shared?
linux;mount
Linux exposes information about mounted filesystems in /proc/mounts. The sharing options are too recent to show up in that file, but they do show up in /proc/self/mountinfo. The documentation for this file is in filesystems/proc.txt in the kernel documentation. The file is generated by show_mountinfo in fs/namespace.c. A sample line looks like this:42 18 98:0 / /mount_point rw shared:1 - ext3 /dev/sda1 rw,errors=continue                             ^^^^^^^^The format of the first 6 fields is fixed. Then come zero or more tagged fields, such as shared:GROUP, master:GROUP, propagate_from:GROUP or unbindable, indicating the mount's role in a peer group if any. The - introduces the filesystem-specific part, always composed of the filesystem type name, device name and filesystem-specific mount options.Thus:</proc/self/mountinfo awk -vmount_point='/mount/point' '$5 == mount_point {    i = 7;    while ($i != -) {if ($i ~ /^shared:/) exit 0; ++i}    exit 1;}'  On recent enough Linux kernels, each process has its own filesystem namespace and /proc/mounts is a symbolic link to /proc/self/mounts. 