From: Karel Zak Date: Mon, 6 Dec 2010 10:17:10 +0000 (+0100) Subject: mount: be more explicit about --move in mount.8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bfa39d5d5bd35ec4b42a374f2f72dd8d7d4dd94;p=util-linux mount: be more explicit about --move in mount.8 Signed-off-by: Karel Zak --- diff --git a/mount/mount.8 b/mount/mount.8 index 19e22e51..0dd75aa0 100644 --- a/mount/mount.8 +++ b/mount/mount.8 @@ -337,17 +337,28 @@ or fstab entry is: .RE After this call the same contents is accessible in two places. -One can also remount a single file (on a single file). +One can also remount a single file (on a single file). It's also +possible to use the bind mount to create a mountpoint from a regular +directory, for example: -This call attaches only (part of) a single filesystem, not possible +.RS +.br +.B mount --bind +.I foo foo +.RE + +The bind mount call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place using + .RS .br .B mount --rbind .I olddir newdir .RE + or shortoption + .RS .br .B mount -R @@ -388,7 +399,8 @@ command (then mount(8) does not read /etc/mtab), then you have to use bind flag .B The move operation. .RS -Since Linux 2.5.1 it is possible to atomically move a mounted tree +Since Linux 2.5.1 it is possible to atomically move a +.B mounted tree to another place. The call is .RS .br @@ -403,6 +415,9 @@ or shortoption .RE This will cause the contents which previously appeared under olddir to be accessed under newdir. The physical location of the files is not changed. +Note that the +.I olddir +has to be a mountpoint. .RE .B The shared subtrees operations.