table of contents
- stretch 232-25+deb9u11
- testing 241-5
- stretch-backports 241-3~bpo9+1
- unstable 241-5
- experimental 242-2
SYSTEMD-MOUNT(1) | systemd-mount | SYSTEMD-MOUNT(1) |
NAME¶
systemd-mount - Establish a mount or auto-mount point transientlySYNOPSIS¶
systemd-mount [OPTIONS...] WHAT [WHERE]
systemd-mount [OPTIONS...] --list
DESCRIPTION¶
systemd-mount may be used to create and start a transient .mount or .automount unit of the file system WHAT on the mount point WHERE.In many ways, systemd-mount is similar to the lower-level mount(8) command, however instead of executing the mount operation directly and immediately, systemd-mount schedules it through the service manager job queue, so that it may pull in further dependencies (such as parent mounts, or a file system checker to execute a priori), and may make use of the auto-mounting logic.
The command takes either one or two arguments. If only one argument is specified it should refer to a block device containing a file system (e.g. "/dev/sdb1"), which is then probed for a label and other metadata, and is mounted to a directory whose name is generated from the label. In this mode the block device must exist at the time of invocation of the command, so that it may be probed. If the device is found to be a removable block device (e.g. a USB stick) an automount point instead of a regular mount point is created (i.e. the --automount= option is implied, see below).
If two arguments are specified the first indicates the mount source (the WHAT) and the second indicates the path to mount it on (the WHERE). In this mode no probing of the source is attempted, and a backing device node doesn't have to exist yet. However, if this mode is combined with --discover, device node probing for additional metadata is enabled, and – much like in the single-argument case discussed above – the specified device has to exist at the time of invocation of the command.
Use the --list command to show a terse table of all local, known block devices with file systems that may be mounted with this command.
OPTIONS¶
The following options are understood:--no-block
--no-pager
--no-ask-password
--quiet, -q
--discover
--type=, -t
--options=, -o
--fsck=
--description=
--property=, -p
--automount=
If this switch is not specified it defaults to false. If not specified and --discover is used (or only a single argument passed, which implies --discover, see above), and the file system block device is detected to be removable, it is set to true, in order to increase the chance that the file system is in a fully clean state if the device is unplugged abruptly.
-A
--timeout-idle-sec=
Note that if --discover is used (or only a single argument passed, which implies --discover, see above), and the file system block device is detected to be removable, --timeout-idle-sec=1s is implied.
--automount-property=
--bind-device=
Note that if --discover is used (or only a single argument passed, which implies --discover, see above), and the file system block device is detected to be removable, this option is implied.
--list
--user
--system
-H, --host=
-M, --machine=
-h, --help
--version
EXIT STATUS¶
On success, 0 is returned, a non-zero failure code otherwise.THE UDEV DATABASE¶
If --discover is used, systemd-mount honors a couple of additional udev properties of block devices:SYSTEMD_MOUNT_OPTIONS=
SYSTEMD_MOUNT_WHERE=
SEE ALSO¶
systemd(1), mount(8), systemctl(1), systemd.unit(5), systemd.mount(5), systemd.automount(5), systemd-run(1)systemd 232 |