Name

systemd.mount — systemd mount configuration files

Synopsis

systemd.mount

Options

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 systemd.exec(5). The options specific to the [Mount] section of mount units are the following:

What=

Takes an absolute path of a device node, file or other resource to mount. See mount(8) for details. If this refers to a device node, a dependency on the respective device unit is automatically created. (See systemd.device(5) for more information.) This option is mandatory.

Where=

Takes an absolute path of a directory of the mount point. If the mount point is not existing at time of mounting, it is created. This string must be reflected in the unit file name. (See above.) This option is mandatory.

Type=

Takes a string for the filesystem type. See mount(8) for details. This setting is optional.

Options=

Mount options to use when mounting. This takes a comma separated list of options. This setting is optional.

DirectoryMode=

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.

TimeoutSec=

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 SIGTERM, and after another delay of this time with SIGKILL. (See KillMode= below.) Takes a unit-less value in seconds, or a time span value such as "5min 20s". Pass 0 to disable the timeout logic. Defaults to 90s.

KillMode=

Specifies how processes of this mount shall be killed. One of control-group, process, none.

This option is mostly equivalent to the KillMode= option of service files. See systemd.service(5) for details.

KillSignal=

Specifies which signal to use when killing a process of this mount. Defaults to SIGTERM.

SendSIGKILL=

Specifies whether to send SIGKILL to remaining processes after a timeout, if the normal shutdown procedure left processes of the mount around. Takes a boolean value. Defaults to "yes".