Debian Codegraph @

upstream/debian-unstable/man5/proc_pid_mountinfo.5

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