.br
.B "mount --bind olddir newdir"
.RE
+or shortoption
+.RS
+.br
+.B "mount -B olddir newdir"
+.RE
or fstab entry is:
.RS
.br
.br
.B "mount --rbind olddir newdir"
.RE
+or shortoption
+.RS
+.br
+.B "mount -R olddir newdir"
+.RE
.\" available since Linux 2.4.11.
Note that the filesystem mount options will remain the same as those
.br
.B "mount --move olddir newdir"
.RE
+or shortoption
+.RS
+.br
+.B "mount -M olddir newdir"
+.RE
Since Linux 2.6.15 it is possible to mark a mount and its submounts as shared,
private, slave or unbindable. A shared mount provides ability to create mirrors
.BR selinux (8)
.RE
.TP
-.B \-\-bind
+.B \-B, \-\-bind
Remount a subtree somewhere else (so that its contents are available
in both places). See above.
.TP
-.B \-\-move
+.B \-R, \-\-rbind
+Remount a subtree and all possible submounts somewhere else (so that its
+contents are available in both places). See above.
+.TP
+.B \-M, \-\-move
Move a subtree to some other place. See above.
.SH "FILESYSTEM SPECIFIC MOUNT OPTIONS"
{ "test-opts", 1, 0, 'O' },
{ "pass-fd", 1, 0, 'p' },
{ "types", 1, 0, 't' },
- { "bind", 0, 0, 128 },
- { "move", 0, 0, 133 },
+ { "bind", 0, 0, 'B' },
+ { "move", 0, 0, 'M' },
{ "guess-fstype", 1, 0, 134 },
- { "rbind", 0, 0, 135 },
+ { "rbind", 0, 0, 'R' },
{ "make-shared", 0, 0, 136 },
{ "make-slave", 0, 0, 137 },
{ "make-private", 0, 0, 138 },
initproctitle(argc, argv);
#endif
- while ((c = getopt_long (argc, argv, "afFhilL:no:O:p:rsU:vVwt:",
+ while ((c = getopt_long (argc, argv, "aBfFhilL:Mno:O:p:rRsU:vVwt:",
longopts, NULL)) != -1) {
switch (c) {
case 'a': /* mount everything in fstab */
++mount_all;
break;
+ case 'B': /* bind */
+ mounttype = MS_BIND;
+ break;
case 'f': /* fake: don't actually call mount(2) */
++fake;
break;
case 'L':
label = optarg;
break;
+ case 'M': /* move */
+ mounttype = MS_MOVE;
+ break;
case 'n': /* do not write /etc/mtab */
++nomtab;
break;
readonly = 1;
readwrite = 0;
break;
+ case 'R': /* rbind */
+ mounttype = (MS_BIND | MS_REC);
+ break;
case 's': /* allow sloppy mount options */
sloppy = 1;
break;
case 0:
break;
- case 128: /* bind */
- mounttype = MS_BIND;
- break;
- case 133: /* move */
- mounttype = MS_MOVE;
- break;
case 134:
/* undocumented, may go away again:
call: mount --guess-fstype device
printf("%s\n", fstype ? fstype : "unknown");
exit(fstype ? 0 : EX_FAIL);
}
- case 135:
- mounttype = (MS_BIND | MS_REC);
- break;
case 136:
mounttype = MS_SHARED;