diff options
Diffstat (limited to '')
-rw-r--r-- | man2/mount.2 | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/man2/mount.2 b/man2/mount.2 index 916b68c..f2511c4 100644 --- a/man2/mount.2 +++ b/man2/mount.2 @@ -17,7 +17,7 @@ .\" 2008-10-06, mtk: move umount*() material into separate umount.2 page. .\" 2008-10-06, mtk: Add discussion of namespaces. .\" -.TH mount 2 2023-04-03 "Linux man-pages 6.05.01" +.TH mount 2 2023-10-31 "Linux man-pages 6.7" .SH NAME mount \- mount filesystem .SH LIBRARY @@ -26,7 +26,7 @@ Standard C library .SH SYNOPSIS .nf .B "#include <sys/mount.h>" -.PP +.P .BI "int mount(const char *" source ", const char *" target , .BI " const char *" filesystemtype ", unsigned long " mountflags , .BI " const void *_Nullable " data ); @@ -40,11 +40,11 @@ but can also be the pathname of a directory or file, or a dummy string) to the location (a directory or file) specified by the pathname in .IR target . -.PP +.P Appropriate privilege (Linux: the .B CAP_SYS_ADMIN capability) is required to mount filesystems. -.PP +.P Values for the .I filesystemtype argument supported by the kernel are listed in @@ -53,7 +53,7 @@ argument supported by the kernel are listed in "tmpfs", "cgroup", "proc", "mqueue", "nfs", "cifs", "iso9660"). Further types may become available when the appropriate modules are loaded. -.PP +.P The .I data argument is interpreted by the different filesystems. @@ -63,7 +63,7 @@ See .BR mount (8) for details of the options available for each filesystem type. This argument may be specified as NULL, if there are no options. -.PP +.P A call to .BR mount () performs one of a number of general types of operation, @@ -101,7 +101,7 @@ includes Create a new mount: .I mountflags includes none of the above flags. -.PP +.P Each of these operations is detailed later in this page. Further flags may be specified in .I mountflags @@ -284,13 +284,13 @@ and and .BR realpath (3) all still work properly. -.PP +.P From Linux 2.4 onward, some of the above flags are settable on a per-mount basis, while others apply to the superblock of the mounted filesystem, meaning that all mounts of the same filesystem share those flags. (Previously, all of the flags were per-superblock.) -.PP +.P The per-mount-point flags are as follows: .IP \[bu] 3 Since Linux 2.4: @@ -304,7 +304,7 @@ and .IP \[bu] Additionally, since Linux 2.6.20: .BR MS_RELATIME . -.PP +.P The following flags are per-superblock: .BR MS_DIRSYNC , .BR MS_LAZYTIME , @@ -320,7 +320,7 @@ Subsequently, the settings of the flags can be changed via a remount operation (see below). Such changes will be visible via all mounts associated with the filesystem. -.PP +.P Since Linux 2.6.16, .B MS_RDONLY can be set or cleared on a per-mount-point basis as well as on @@ -342,13 +342,13 @@ of an existing mount without having to unmount and remount the filesystem. should be the same value specified in the initial .BR mount () call. -.PP +.P The .I source and .I filesystemtype arguments are ignored. -.PP +.P The .I mountflags and @@ -356,7 +356,7 @@ and arguments should match the values used in the original .BR mount () call, except for those parameters that are being deliberately changed. -.PP +.P The following .I mountflags can be changed: @@ -398,7 +398,7 @@ flags during a remount are silently ignored. Note that changes to per-superblock flags are visible via all mounts of the associated filesystem (because the per-superblock flags are shared by all mounts). -.PP +.P Since Linux 3.17, .\" commit ffbc6f0ead47fa5a1dc9642b0331cb75c20a640e if none of @@ -412,7 +412,7 @@ is specified in then the remount operation preserves the existing values of these flags (rather than defaulting to .BR MS_RELATIME ). -.PP +.P Since Linux 2.6.26, the .B MS_REMOUNT flag can be used with @@ -424,13 +424,13 @@ flag on a mount without changing the underlying filesystem. Specifying .I mountflags as: -.PP +.P .in +4n .EX MS_REMOUNT | MS_BIND | MS_RDONLY .EE .in -.PP +.P will make access through this mountpoint read-only, without affecting other mounts. .\" @@ -447,13 +447,13 @@ another point within the single directory hierarchy. Bind mounts may cross filesystem boundaries and span .BR chroot (2) jails. -.PP +.P The .I filesystemtype and .I data arguments are ignored. -.PP +.P The remaining bits (other than .BR MS_REC , described below) in the @@ -463,7 +463,7 @@ argument are also ignored. the underlying mount.) However, see the discussion of remounting above, for a method of making an existing bind mount read-only. -.PP +.P By default, when a directory is bind mounted, only that directory is mounted; if there are any submounts under the directory tree, @@ -490,21 +490,21 @@ or (all available since Linux 2.6.15), then the propagation type of an existing mount is changed. If more than one of these flags is specified, an error results. -.PP +.P The only other flags that can be specified while changing the propagation type are .B MS_REC (described below) and .B MS_SILENT (which is ignored). -.PP +.P The .IR source , .IR filesystemtype , and .I data arguments are ignored. -.PP +.P The meanings of the propagation type flags are as follows: .TP .B MS_SHARED @@ -550,7 +550,7 @@ flags) is performed on a directory subtree, any unbindable mounts within the subtree are automatically pruned (i.e., not replicated) when replicating that subtree to produce the target subtree. -.PP +.P By default, changing the propagation type affects only the .I target mount. @@ -561,7 +561,7 @@ flag is also specified in then the propagation type of all mounts under .I target is also changed. -.PP +.P For further details regarding mount propagation types (including the default propagation type assigned to new mounts), see .BR mount_namespaces (7). @@ -578,7 +578,7 @@ specifies an existing mount and .I target specifies the new location to which that mount is to be relocated. The move is atomic: at no point is the subtree unmounted. -.PP +.P The remaining bits in the .I mountflags argument are ignored, as are the @@ -606,7 +606,7 @@ performs its default action: creating a new mount. specifies the source for the new mount, and .I target specifies the directory at which to create the mount point. -.PP +.P The .I filesystemtype and @@ -847,12 +847,12 @@ The definitions of and .B MS_UNBINDABLE were added to glibc headers in glibc 2.12. -.PP +.P Since Linux 2.4 a single filesystem can be mounted at multiple mount points, and multiple mounts can be stacked on the same mount point. .\" Multiple mounts on same mount point: since Linux 2.3.99pre7. -.PP +.P The .I mountflags argument may have the magic number 0xC0ED (\fBMS_MGC_VAL\fP) @@ -864,7 +864,7 @@ Specifying .B MS_MGC_VAL was required before Linux 2.4, but since Linux 2.4 is no longer required and is ignored if specified. -.PP +.P The original .B MS_SYNC flag was renamed @@ -873,7 +873,7 @@ in 1.1.69 when a different .B MS_SYNC was added to \fI<mman.h>\fP. -.PP +.P Before Linux 2.4 an attempt to execute a set-user-ID or set-group-ID program on a filesystem mounted with .B MS_NOSUID @@ -894,13 +894,13 @@ and changes to the namespace (i.e., mounts and unmounts) by one process are visible to all other processes sharing the same namespace. (The pre-2.4.19 Linux situation can be considered as one in which a single namespace was shared by every process on the system.) -.PP +.P A child process created by .BR fork (2) shares its parent's mount namespace; the mount namespace is preserved across an .BR execve (2). -.PP +.P A process can obtain a private mount namespace if: it was created using the .BR clone (2) @@ -920,7 +920,7 @@ of the namespace that it was previously sharing with other processes, so that future mounts and unmounts by the caller are invisible to other processes (except child processes that the caller subsequently creates) and vice versa. -.PP +.P For further details on mount namespaces, see .BR mount_namespaces (7). .\" @@ -928,7 +928,7 @@ For further details on mount namespaces, see Each mount has a parent mount. The overall parental relationship of all mounts defines the single directory hierarchy seen by the processes within a mount namespace. -.PP +.P The parent of a new mount is defined when the mount is created. In the usual case, the parent of a new mount is the mount of the filesystem @@ -936,7 +936,7 @@ containing the directory or file at which the new mount is attached. In the case where a new mount is stacked on top of an existing mount, the parent of the new mount is the previous mount that was stacked at that location. -.PP +.P The parental relationship between mounts can be discovered via the .IR /proc/ pid /mountinfo file (see below). |