The bind mounts.
Since Linux 2.4.0 it is possible to remount part of the file
hierarchy somewhere else. The call is
mount --bind olddir newdir
or fstab entry is:
/olddir /newdir none bind
After this call the same contents is accessible in two places.
One can also remount a single file (on a single file).
This call attaches only (part of) a single filesystem, not pos‐
sible submounts. The entire file hierarchy including submounts
is attached a second place using
mount --rbind olddir newdir
Note that the filesystem mount options will remain the same as
those on the original mount point, and cannot be changed by
passing the -o option along with --bind/--rbind.
The move operation.
Since Linux 2.5.1 it is possible to atomically move a mounted
tree to another place. The call is
mount --move olddir newdir
The shared subtrees operations.
Since Linux 2.6.15 it is possible to mark a mount and its sub‐
mounts as shared, private, slave or unbindable. A shared mount
provides ability to create mirrors of that mount such that
mounts and umounts within any of the mirrors propagate to the
other mirror. A slave mount receives propagation from its mas‐
ter, but any not vice-versa. A private mount carries no propa‐
gation abilities. A unbindable mount is a private mount which
cannot cloned through a bind operation. Detailed semantics is
documented in Documentation/sharedsubtree.txt file in the kernel
mount --make-shared mountpoint
mount --make-slave mountpoint
mount --make-private mountpoint
mount --make-unbindable mountpoint
The following commands allows one to recursively change the type
of all the mounts under a given mountpoint.
mount --make-rshared mountpoint
mount --make-rslave mountpoint
mount --make-rprivate mountpoint
mount --make-runbindable mountpoint