From 3519d230c8bafe834b2dac26ace49fcfba139823 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 18 May 2015 12:30:37 +0200 Subject: fstab-generator: add x-systemd.requires and x-systemd.requires-mounts-for Currently we have no way how to specify dependencies between fstab entries (or another units) in the /etc/fstab. It means that users are forced to bypass fstab and write .mount units manually. The patch introduces new systemd fstab options: x-systemd.requires= - to specify dependence an another mount (PATH is translated to unit name) x-systemd.requires= - to specify dependence on arbitrary UNIT x-systemd.requires-mounts-for= - to specify dependence on another paths, implemented by RequiresMountsFor=. The option may be specified more than once. For example two bind mounts where B depends on A: /mnt/test/A /mnt/test/A none bind,defaults /mnt/test/A /mnt/test/B none bind,x-systemd.requires=/mnt/test/A More complex example with overlay FS where one mount point depends on "low" and "upper" directories: /dev/sdc1 /mnt/low ext4 defaults /dev/sdc2 /mnt/high ext4 defaults overlay /mnt/merged overlay lowerdir=/mnt/low,upperdir=/mnt/high/data,workdir=/mnt/high/work,x-systemd.requires-mounts-for=/mnt/low,x-systemd.requires-mounts-for=mnt/high https://bugzilla.redhat.com/show_bug.cgi?id=812826 https://bugzilla.redhat.com/show_bug.cgi?id=1164334 --- man/systemd.mount.xml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'man/systemd.mount.xml') diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml index 862f42e594..ffffc56936 100644 --- a/man/systemd.mount.xml +++ b/man/systemd.mount.xml @@ -138,6 +138,36 @@ + + + + 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.unit5 + 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.unit5 + for details. + + -- cgit v1.2.3-54-g00ecf