File: systemd.mount.html

package info (click to toggle)
systemd 215-17
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 49,568 kB
  • sloc: ansic: 192,789; xml: 39,586; sh: 13,002; makefile: 4,700; perl: 1,461; python: 1,355
file content (213 lines) | stat: -rw-r--r-- 19,986 bytes parent folder | download | duplicates (2)
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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>systemd.mount</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><style>
    a.headerlink {
      color: #c60f0f;
      font-size: 0.8em;
      padding: 0 4px 0 4px;
      text-decoration: none;
      visibility: hidden;
    }

    a.headerlink:hover {
      background-color: #c60f0f;
      color: white;
    }

    h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, dt:hover > a.headerlink {
      visibility: visible;
    }
  </style><a href="index.html">Index </a>·
  <a href="systemd.directives.html">Directives </a>·
  <a href="../python-systemd/index.html">Python </a>·
  <a href="../libudev/index.html">libudev </a>·
  <a href="../libudev/index.html">gudev </a><span style="float:right">systemd 215</span><hr><div class="refentry"><a name="systemd.mount"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>systemd.mount — Mount unit configuration</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><p><code class="filename"><em class="replaceable"><code>mount</code></em>.mount</code></p></div><div class="refsect1"><a name="idm214182106304"></a><h2 id="Description">Description<a class="headerlink" title="Permalink to this headline" href="#Description">¶</a></h2><p>A unit configuration file whose name ends in
                "<code class="literal">.mount</code>" encodes information about
                a file system mount point controlled and supervised by
                systemd.</p><p>This man page lists the configuration options
                specific to this unit type. See
                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>
                for the common options of all unit configuration
                files. The common configuration items are configured
                in the generic [Unit] and [Install] sections. The
                mount specific configuration options are configured
                in the [Mount] section.</p><p>Additional options are listed in
                <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                which define the execution environment the
                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
                binary is executed in, and in
                <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>,
                which define the way the processes are terminated, and
                in
                <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
                which configure resource control settings for the
                processes of the service. Note that the User= and
                Group= options are not particularly useful for mount
                units specifying a "<code class="literal">Type=</code>" option or
                using configuration not specified in
                <code class="filename">/etc/fstab</code>;
                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
                will refuse options that are not listed in
                <code class="filename">/etc/fstab</code> if it is not run as
                UID 0.</p><p>Mount units must be named after the mount point
                directories they control. Example: the mount point
                <code class="filename">/home/lennart</code> must be configured
                in a unit file
                <code class="filename">home-lennart.mount</code>. For details
                about the escaping logic used to convert a file system
                path to a unit name, see
                <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>.</p><p>Optionally, a mount unit may be accompanied by
                an automount unit, to allow on-demand or parallelized
                mounting. See
                <a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>.</p><p>If a mount point is beneath another mount point
                in the file system hierarchy, a dependency between both
                units is created automatically.</p><p>Mount points created at runtime (independently of
                unit files or <code class="filename">/etc/fstab</code>) will be
                monitored by systemd and appear like any other mount
                unit in systemd.
                See <code class="filename">/proc/self/mountinfo</code> description
                in <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>.
                </p><p>Some file systems have special semantics as API
                file systems for kernel-to-userspace and
                userspace-to-userpace interfaces. Some of them may not
                be changed via mount units, and cannot be disabled.
                For a longer discussion see <a class="ulink" href="http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems" target="_top">API
                File Systems</a>.</p></div><div class="refsect1"><a name="idm214182689296"></a><h2 id="/etc/fstab"><code class="filename">/etc/fstab</code><a class="headerlink" title="Permalink to this headline" href="#/etc/fstab">¶</a></h2><p>Mount units may either be configured via unit
                files, or via <code class="filename">/etc/fstab</code> (see
                <a href="fstab.html"><span class="citerefentry"><span class="refentrytitle">fstab</span>(5)</span></a>
                for details). Mounts listed in
                <code class="filename">/etc/fstab</code> will be converted into
                native units dynamically at boot and when the
                configuration of the system manager is reloaded. In
                general, configuring mount points through
                <code class="filename">/etc/fstab</code> is the preferred
                approach. See
                <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>
                for details about the conversion.</p><p>When reading <code class="filename">/etc/fstab</code> a
                few special mount options are understood by systemd
                which influence how dependencies are created for mount
                points from <code class="filename">/etc/fstab</code>. systemd
                will create a dependency of type
                <code class="option">Wants</code> or <code class="option">Requires</code>
                (see option <code class="option">nofail</code> below), from
                either <code class="filename">local-fs.target</code> or
                <code class="filename">remote-fs.target</code>, depending
                whether the file system is local or remote.</p><div class="variablelist"><dl class="variablelist"><dt id="x-systemd.automount"><span class="term"><code class="option">x-systemd.automount</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.automount">¶</a></dt><dd><p>An automount unit will be created
                    for the file system. See
                    <a href="systemd.automount.html"><span class="citerefentry"><span class="refentrytitle">systemd.automount</span>(5)</span></a>
                    for details.</p></dd><dt id="x-systemd.device-timeout="><span class="term"><code class="option">x-systemd.device-timeout=</code></span><a class="headerlink" title="Permalink to this term" href="#x-systemd.device-timeout=">¶</a></dt><dd><p>Configure how long systemd should
                    wait for a device to show up before giving up on
                    an entry from
                    <code class="filename">/etc/fstab</code>. Specify a time in
                    seconds or explicitly append a unit as
                    "<code class="literal">s</code>", "<code class="literal">min</code>",
                    "<code class="literal">h</code>",
                    "<code class="literal">ms</code>".</p><p>Note that this option can only be used in
                    <code class="filename">/etc/fstab</code>, and will be
                    ignored when part of <code class="varname">Options=</code>
                    setting in a unit file.</p></dd><dt id="nofail"><span class="term"><code class="option">nofail</code>, </span><span class="term"><code class="option">fail</code></span><a class="headerlink" title="Permalink to this term" href="#nofail">¶</a></dt><dd><p>With <code class="option">nofail</code> this
                    mount will be only wanted, not required, by the
                    <code class="filename">local-fs.target</code>. This means
                    that the boot will continue even if this mount
                    point is not mounted successfully. Option
                    <code class="option">fail</code> has the opposite meaning and
                    is the default.</p></dd><dt id="noauto"><span class="term"><code class="option">noauto</code>, </span><span class="term"><code class="option">auto</code></span><a class="headerlink" title="Permalink to this term" href="#noauto">¶</a></dt><dd><p>With <code class="option">noauto</code>, this
                    mount will not be added as a dependency for
                    <code class="filename">local-fs.target</code>. This means
                    that it will not be mounted automatically during
                    boot, unless it is pulled in by some other
                    unit. Option <code class="option">auto</code> has the
                    opposite meaning and is the default.</p></dd><dt id="x-initrd.mount"><span class="term"><code class="option">x-initrd.mount</code></span><a class="headerlink" title="Permalink to this term" href="#x-initrd.mount">¶</a></dt><dd><p>An additional filesystem to be
                    mounted in the initramfs. See
                    <code class="filename">initrd-fs.target</code> description
                    in
                    <a href="systemd.special.html"><span class="citerefentry"><span class="refentrytitle">systemd.special</span>(7)</span></a>.
                    </p></dd></dl></div><p>If a mount point is configured in both
                <code class="filename">/etc/fstab</code> and a unit file that
                is stored below <code class="filename">/usr</code>, the former
                will take precedence. If the unit file is stored below
                <code class="filename">/etc</code>, it will take
                precedence. This means: native unit files take
                precedence over traditional configuration files, but
                this is superseded by the rule that configuration in
                <code class="filename">/etc</code> will always take precedence
                over configuration in
                <code class="filename">/usr</code>.</p></div><div class="refsect1"><a name="idm214181078496"></a><h2 id="Options">Options<a class="headerlink" title="Permalink to this headline" href="#Options">¶</a></h2><p>Mount files must include a [Mount] section,
                which carries information about the file system mount points it
                supervises. A number of options that may be used in
                this section are shared with other unit types. These
                options are documented in
                <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                and
                <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>. The
                options specific to the [Mount] section of mount
                units are the following:</p><div class="variablelist"><dl class="variablelist"><dt id="What="><span class="term"><code class="varname">What=</code></span><a class="headerlink" title="Permalink to this term" href="#What=">¶</a></dt><dd><p>Takes an absolute path
                                of a device node, file or other
                                resource to mount. See
                                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
                                for details. If this refers to a
                                device node, a dependency on the
                                respective device unit is
                                automatically created. (See
                                <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a> for more information.)
                                This option is
                                mandatory.</p></dd><dt id="Where="><span class="term"><code class="varname">Where=</code></span><a class="headerlink" title="Permalink to this term" href="#Where=">¶</a></dt><dd><p>Takes an absolute path
                                of a directory of the mount point. If
                                the mount point does not exist at the
                                time of mounting, it is created. This
                                string must be reflected in the unit
                                filename. (See above.) This option is
                                mandatory.</p></dd><dt id="Type="><span class="term"><code class="varname">Type=</code></span><a class="headerlink" title="Permalink to this term" href="#Type=">¶</a></dt><dd><p>Takes a string for the
                                file system type. See
                                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>
                                for details. This setting is
                                optional.</p></dd><dt id="Options="><span class="term"><code class="varname">Options=</code></span><a class="headerlink" title="Permalink to this term" href="#Options=">¶</a></dt><dd><p>Mount options to use
                                when mounting. This takes a
                                comma-separated list of options. This
                                setting is optional.</p></dd><dt id="SloppyOptions="><span class="term"><code class="varname">SloppyOptions=</code></span><a class="headerlink" title="Permalink to this term" href="#SloppyOptions=">¶</a></dt><dd><p>Takes a boolean
                                argument. If true, parsing of the
                                options specified in
                                <code class="varname">Options=</code> is
                                relaxed, and unknown mount options are
                                tolerated. This corresponds with
                                <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>'s
                                <em class="parameter"><code>-s</code></em>
                                switch. Defaults to
                                off.</p></dd><dt id="DirectoryMode="><span class="term"><code class="varname">DirectoryMode=</code></span><a class="headerlink" title="Permalink to this term" href="#DirectoryMode=">¶</a></dt><dd><p>Directories of mount
                                points (and any parent directories)
                                are automatically created if
                                needed. This option specifies the file
                                system access mode used when creating
                                these directories. Takes an access
                                mode in octal notation. Defaults to
                                0755.</p></dd><dt id="TimeoutSec="><span class="term"><code class="varname">TimeoutSec=</code></span><a class="headerlink" title="Permalink to this term" href="#TimeoutSec=">¶</a></dt><dd><p>Configures the time to
                                wait for the mount command to
                                finish. If a command does not exit
                                within the configured time, the mount
                                will be considered failed and be shut
                                down again. All commands still running
                                will be terminated forcibly via
                                <code class="constant">SIGTERM</code>, and after another delay of
                                this time with <code class="constant">SIGKILL</code>. (See
                                <code class="option">KillMode=</code> in
                                <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>.)
                                Takes a unit-less value in seconds, or
                                a time span value such as "5min
                                20s". Pass 0 to disable the timeout
                                logic. The default value is set from the manager configuration
                                file's <code class="varname">DefaultTimeoutStart=</code> variable.</p></dd></dl></div><p>Check
                <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>
                and
                <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>
                for more settings.</p></div><div class="refsect1"><a name="idm214180019264"></a><h2 id="See Also">See Also<a class="headerlink" title="Permalink to this headline" href="#See%20Also">¶</a></h2><p>
                          <a href="systemd.html"><span class="citerefentry"><span class="refentrytitle">systemd</span>(1)</span></a>,
                          <a href="systemctl.html"><span class="citerefentry"><span class="refentrytitle">systemctl</span>(8)</span></a>,
                          <a href="systemd.unit.html"><span class="citerefentry"><span class="refentrytitle">systemd.unit</span>(5)</span></a>,
                          <a href="systemd.exec.html"><span class="citerefentry"><span class="refentrytitle">systemd.exec</span>(5)</span></a>,
                          <a href="systemd.kill.html"><span class="citerefentry"><span class="refentrytitle">systemd.kill</span>(5)</span></a>,
                          <a href="systemd.resource-control.html"><span class="citerefentry"><span class="refentrytitle">systemd.resource-control</span>(5)</span></a>,
                          <a href="systemd.service.html"><span class="citerefentry"><span class="refentrytitle">systemd.service</span>(5)</span></a>,
                          <a href="systemd.device.html"><span class="citerefentry"><span class="refentrytitle">systemd.device</span>(5)</span></a>,
                          <a href="proc.html"><span class="citerefentry"><span class="refentrytitle">proc</span>(5)</span></a>,
                          <a href="mount.html"><span class="citerefentry"><span class="refentrytitle">mount</span>(8)</span></a>,
                          <a href="systemd-fstab-generator.html"><span class="citerefentry"><span class="refentrytitle">systemd-fstab-generator</span>(8)</span></a>,
                          <a href="systemd.directives.html"><span class="citerefentry"><span class="refentrytitle">systemd.directives</span>(7)</span></a>
                  </p></div></div></body></html>