summaryrefslogtreecommitdiffstats
path: root/man/man5/proc_pid_mountinfo.5
blob: 67806361752a37332a67ce73dd19e3f0865949fc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
.\" Copyright (C) 1994, 1995, Daniel Quinlan <quinlan@yggdrasil.com>
.\" Copyright (C) 2002-2008, 2017, Michael Kerrisk <mtk.manpages@gmail.com>
.\" Copyright (C) 2023, Alejandro Colomar <alx@kernel.org>
.\"
.\" SPDX-License-Identifier: GPL-3.0-or-later
.\"
.TH proc_pid_mountinfo 5 (date) "Linux man-pages (unreleased)"
.SH NAME
/proc/pid/mountinfo \- mount information
.SH DESCRIPTION
.TP
.IR /proc/ pid /mountinfo " (since Linux 2.6.26)"
.\" This info adapted from Documentation/filesystems/proc.txt
.\" commit 2d4d4864ac08caff5c204a752bd004eed4f08760
This file contains information about mounts
in the process's mount namespace (see
.BR mount_namespaces (7)).
It supplies various information
(e.g., propagation state, root of mount for bind mounts,
identifier for each mount and its parent) that is missing from the (older)
.IR /proc/ pid /mounts
file, and fixes various other problems with that file
(e.g., nonextensibility,
failure to distinguish per-mount versus per-superblock options).
.IP
The file contains lines of the form:
.IP
.EX
36 35 98:0 /mnt1 /mnt2 rw,noatime master:1 \- ext3 /dev/root rw,errors=continue
(1)(2)(3)   (4)   (5)      (6)      (7)   (8) (9)   (10)         (11)
.EE
.IP
The numbers in parentheses are labels for the descriptions below:
.RS 7
.TP 5
(1)
mount ID: a unique ID for the mount (may be reused after
.BR umount (2)).
.TP
(2)
parent ID: the ID of the parent mount
(or of self for the root of this mount namespace's mount tree).
.IP
If a new mount is stacked on top of a previous existing mount
(so that it hides the existing mount) at pathname P,
then the parent of the new mount is the previous mount at that location.
Thus, when looking at all the mounts stacked at a particular location,
the top-most mount is the one that is not the parent
of any other mount at the same location.
(Note, however, that this top-most mount will be accessible only if
the longest path subprefix of P that is a mount point
is not itself hidden by a stacked mount.)
.IP
If the parent mount lies outside the process's root directory (see
.BR chroot (2)),
the ID shown here won't have a corresponding record in
.I mountinfo
whose mount ID (field 1) matches this parent mount ID
(because mounts that lie outside the process's root directory
are not shown in
.IR mountinfo ).
As a special case of this point,
the process's root mount may have a parent mount
(for the initramfs filesystem) that lies
.\" Miklos Szeredi, Nov 2017: The hidden one is the initramfs, I believe
.\" mtk: In the initial mount namespace, this hidden ID has the value 0
outside the process's root directory,
and an entry for that mount will not appear in
.IR mountinfo .
.TP
(3)
major:minor: the value of
.I st_dev
for files on this filesystem (see
.BR stat (2)).
.TP
(4)
root: the pathname of the directory in the filesystem
which forms the root of this mount.
.TP
(5)
mount point: the pathname of the mount point relative
to the process's root directory.
.TP
(6)
mount options: per-mount options (see
.BR mount (2)).
.TP
(7)
optional fields: zero or more fields of the form "tag[:value]"; see below.
.TP
(8)
separator: the end of the optional fields is marked by a single hyphen.
.TP
(9)
filesystem type: the filesystem type in the form "type[.subtype]".
.TP
(10)
mount source: filesystem-specific information or "none".
.TP
(11)
super options: per-superblock options (see
.BR mount (2)).
.RE
.IP
Currently, the possible optional fields are
.IR shared ,
.IR master ,
.IR propagate_from ,
and
.IR unbindable .
See
.BR mount_namespaces (7)
for a description of these fields.
Parsers should ignore all unrecognized optional fields.
.IP
For more information on mount propagation see
.I Documentation/filesystems/sharedsubtree.rst
(or
.I Documentation/filesystems/sharedsubtree.txt
before Linux 5.8)
in the Linux kernel source tree.
.SH SEE ALSO
.BR proc (5)