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