On Mon, Aug 26, 2013 at 03:58:05PM +0800, WANG Chao wrote:
Currently we have two issues against mounting filesystems by
systemd.
1. If any failure in sysroot.mount, initrd.target won't be reached.
2. If any failure in mounting /etc/fstab, initrd.target won't be reached
Our kdump.sh is in dracut-pre-pivot hook which is ordered after
initrd.target. That means if systemd doesn't reach initrd.target,
pre-pivot service will not run.
To fix issue 1), we can add rootflags=nofail to 2nd kernel cmdline, so
that initrd.target will not require sysroot.mount. initrd.target
wouldn't care about the failures in sysroot.mount. And our kdump.sh will
run eventually.
To fix issue 2), we can append "nofail" mount options to every entry in
/etc/fstab. It has almost the same affects as to sysroot.mount.
Please also mention that why kdump code should be invoked even if
mounting root or mounting other file systems failed. And also mention
that error handling will be done by kdump using "default" option in
kdump.conf file.
[..]
diff --git a/mkdumprd b/mkdumprd
index 26fe5af..02521bf 100644
--- a/mkdumprd
+++ b/mkdumprd
@@ -102,6 +102,7 @@ to_mount() {
_t=$(findmnt -k -f -n -r -o TARGET,FSTYPE $_dev)
_o=$(findmnt -k -f -n -r -o OPTIONS $_dev)
_o=${_o/#ro/rw} #mount fs target as rw in 2nd kernel
+ _o="${_o},nofail" #with nofail set, systemd won't block for mount
failyre
s/failyre/failure.
Thanks
Vivek