[systemd-devel] [PATCH] fstab-generator: local-fs.target waits for nofail mounts
WANG Chao
chaowang at redhat.com
Thu Apr 3 23:44:50 PDT 2014
In kdump kernel, we need mount certain file system, and we use "nofail"
for all mounts specified in /etc/fstab. Because we don't want any mount
failure to interrupt the boot process to arrive at
dracut-pre-pivot.service (This is the point just before we switch root).
And at that dracut-pre-pivot, we run our kernel dump capture script
(called kdump.sh).
Our kdump.sh needs every .mount is mounted (or started in systemd
context) before it gets run by dracut-pre-pivot.service. And
dracut-pre-pivot.service is configured to run after local-fs.target. So
what we expect is no matter nofail is configured or not, local-fs.target
should be delayed after all mount units are started.
And it's also the same for remote nofail mounts and remote-fs.target.
---
src/fstab-generator/fstab-generator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index a9a5c02..55938b5 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -225,7 +225,7 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
- if (post && !noauto && !nofail && !automount)
+ if (post && !noauto && !automount)
fprintf(f, "Before=%s\n", post);
if (passno != 0) {
--
1.8.5.3
More information about the systemd-devel
mailing list