5

Under Linux, the shared subtree flags control how a mountpoint is shared with parent and child mount namespaces. These flags include MS_SHARED, MS_PRIVATE, and MS_SLAVE. How can one see which of these flags are set on a particular mountpoint?

These flags don't show up in the output of mount or in /proc/mounts.

1 Answer 1

2

Check /proc/self/mountinfo. For instance, in one of my systemd-based Ubuntu VMs / is shared (systemd enforces it at boot time):

$ cat /proc/self/mountinfo | grep ' / / '
22 0 8:1 / / rw,relatime shared:1 - ext4 /dev/disk/by-uuid/e176bae0-84a5-4bd2-b968-e809e902488c rw,data=ordered

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .