From c129bd5df3ca08eb352cf69d01d2f374552624ae Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2015 20:47:07 +0100 Subject: man: document automatic dependencies For all units ensure there's an "Automatic Dependencies" section in the man page, and explain which dependencies are automatically added in all cases, and which ones are added on top if DefaultDependencies=yes is set. This is also done for systemd.exec(5), systemd.resource-control(5) and systemd.unit(5) as these pages describe common behaviour of various unit types. --- man/systemd.mount.xml | 52 ++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 47 insertions(+), 5 deletions(-) (limited to 'man/systemd.mount.xml') diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index dd6b7a51a8..67e96dc157 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -94,10 +94,6 @@ unit, to allow on-demand or parallelized mounting. See systemd.automount5. - If a mount point is beneath another mount point in the file - system hierarchy, a dependency between both units is created - automatically. - Mount points created at runtime (independently of unit files or /etc/fstab) will be monitored by systemd and appear like any other mount unit in systemd. See @@ -113,6 +109,52 @@ File Systems. + + Automatic Dependencies + + If a mount unit is beneath another mount unit in the file + system 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 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. + + Additional implicit dependencies may be added as result of + execution and resource control parameters as documented in + systemd.exec5 + and + systemd.resource-control5. + + <filename>fstab</filename> @@ -130,7 +172,7 @@ 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 or + dependency of type Wants= or (see option below), from either local-fs.target or remote-fs.target, depending whether the file -- cgit v1.2.3-54-g00ecf