m hierarchy, both a requirement dependency and an ordering dependency between both units are created automatically.
Block device backed file systems automatically gain BindsTo= and After= type dependencies on the device unit encapsulating the block device (see below).
If traditional file system quota is enabled for a mount unit, automatic Wants= and Before= dependencies on systemd-quotacheck.service and quotaon.service are added.
For mount units with DefaultDependencies=yes (the default) a couple additional dependencies are added. Mount units referring to local file systems automatically gain an After= dependency on local-fs-pre.target. Network mount units automatically acquire After= dependencies on remote-fs-pre.target, network.target and network-online.target. Towards the latter a Wants= unit is added as well. Mount units referring to local and network file systems are distinguished by their file system type specification. In some cases this is not sufficient (for example network block device based mounts, such as iSCSI), in which case _netdev may be added to the mount option string of the unit, which forces systemd to consider the mount unit a network mount. Mount units (regardless if local or network) also acquire automatic Before= and Conflicts= on umount.target in order to be stopped during shutdown.
Mount units may either be configured via unit files, or via /etc/fstab (see fstab(5) for details). Mounts listed in /etc/fstab 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 /etc/fstab is the preferred approach. See systemd-fstab-generator(8) for details about the conversion.
When reading /etc/fstab a few special mount options are understood by systemd which influence how dependencies are created for mount points. systemd will create a dependency of type Wants= or Requires (see option nofail below), from either local-fs.target or remote-fs.target, depending whether the file system is local or remote.
- Configures a Requires= and an After= dependency between the created mount unit and another systemd unit, such as a device or mount unit. The argument should be a unit name, or an absolute path to a device node or mount point. This option may be specified more than once. This option is particularly useful for mount point declarations that need an additional device to be around (such as an external journal device for journal file systems) or an additional mount to be in place (such as an overlay file system that merges multiple mount points). See After= and Requires= in systemd.unit(5) for details.
- Configures a RequiresMountsFor= dependency between the created mount unit and other mount units. The argument must be an absolute path. This option may be specified more than once. See RequiresMountsFor= in systemd.unit(5) for details.
- An automount unit will be created for the file system. See systemd.automount(5) for details.
- Configures the idle timeout of the automount unit. See TimeoutIdleSec= in systemd.automount(5) for details.
Configure how long systemd should wait for a device to show up before giving up on an entry from
/etc/fstab. Specify a time in seconds or explicitly append a unit such as
Note that this option can only be used in /etc/fstab, and will be ignored when part of the Options= setting in a unit file.
- With noauto, this mount will not be added as a dependency for local-fs.target or remote-fs.target. This means that it will not be mounted automatically during boot, unless it is pulled in by some other unit. The auto option has the opposite meaning and is the default.
- With nofail, this mount will be only wanted, not required, by local-fs.target or remote-fs.target. This means that the boot will continue even if this mount point is not mounted successfully.
- An additional filesystem to be mounted in the initramfs. See initrd-fs.target description in systemd.special(7).
If a mount point is configured in both /etc/fstab and a unit file that is stored below /usr, the former will take prece