On 09/17/13 at 02:28pm, Dave Young wrote:
On 09/02/13 at 03:32pm, 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.
>
> Based on above, we can conclude that in order to run kdump.sh,
> initrd.target must be reached.
>
> 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. That means
> initrd.target can always be reached whether or not sysroot.mount fails.
> So when initrd.target is reached, kdump.sh can be run.
>
> 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.
> initrd.target can be reached whether or not mount /etc/fstab fails. So
> when initrd.target is reached, kdump.sh can be run.
>
> If the mount failures block kdump from working properly (for example,
> the dump target isn't mounted), the error handling will be done by
> "default" action specified in /etc/kdump.conf. Otherwise kdump will
> ignore the mount failures and dump as expected.
>
> Signed-off-by: WANG Chao <chaowang(a)redhat.com>
> ---
> kdump.sysconfig.i386 | 2 +-
> kdump.sysconfig.ppc64 | 2 +-
> kdump.sysconfig.s390x | 2 +-
> kdump.sysconfig.x86_64 | 2 +-
> mkdumprd | 1 +
> 5 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/kdump.sysconfig.i386 b/kdump.sysconfig.i386
> index 1425ce1..0d26a66 100644
> --- a/kdump.sysconfig.i386
> +++ b/kdump.sysconfig.i386
> @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
>
> # This variable lets us append arguments to the current kdump commandline
> # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
> -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off
udev.children-max=2 panic=10"
> +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices numa=off
udev.children-max=2 panic=10 rootflags=nofail"
>
> # Any additional kexec arguments required. In most situations, this should
> # be left empty
> diff --git a/kdump.sysconfig.ppc64 b/kdump.sysconfig.ppc64
> index 22e7bd5..ca7e1d8 100644
> --- a/kdump.sysconfig.ppc64
> +++ b/kdump.sysconfig.ppc64
> @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
>
> # This variable lets us append arguments to the current kdump commandline
> # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
> -KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10"
> +KDUMP_COMMANDLINE_APPEND="irqpoll maxcpus=1 noirqdistrib reset_devices
cgroup_disable=memory numa=off udev.children-max=2 ehea.use_mcs=0 panic=10
rootflags=nofail"
>
> # Any additional kexec arguments required. In most situations, this should
> # be left empty
> diff --git a/kdump.sysconfig.s390x b/kdump.sysconfig.s390x
> index 129b205..b55515a 100644
> --- a/kdump.sysconfig.s390x
> +++ b/kdump.sysconfig.s390x
> @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
>
> # This variable lets us append arguments to the current kdump commandline
> # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
> -KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off
udev.children-max=2 panic=10"
> +KDUMP_COMMANDLINE_APPEND="maxcpus=1 cgroup_disable=memory numa=off
udev.children-max=2 panic=10 rootflags=nofail"
>
> # Any additional /sbin/mkdumprd arguments required.
> MKDUMPRD_ARGS=""
> diff --git a/kdump.sysconfig.x86_64 b/kdump.sysconfig.x86_64
> index a143b5c..7e4d611 100644
> --- a/kdump.sysconfig.x86_64
> +++ b/kdump.sysconfig.x86_64
> @@ -16,7 +16,7 @@ KDUMP_COMMANDLINE=""
>
> # This variable lets us append arguments to the current kdump commandline
> # As taken from either KDUMP_COMMANDLINE above, or from /proc/cmdline
> -KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices
cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10"
> +KDUMP_COMMANDLINE_APPEND="irqpoll nr_cpus=1 reset_devices
cgroup_disable=memory mce=off numa=off udev.children-max=2 panic=10
rootflags=nofail"
>
> # Any additional kexec arguments required. In most situations, this should
> # be left empty
> 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
failure
> _mntopts="$_t $_o"
> #for non-nfs _dev converting to use udev persistent name
> if [ -b "$_s" ]; then
Ack
a nitpick: should remove kdump.sysconfig: in subject because the patch is not
only for sysconfig changes.
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec