Currently, kexec-tools compares the value of kernel cmdline parameter
crashkernel with default value string "1G-4G:192M,4G-64G:256M,64G-:512M"
to tell if the user wants kexec-tools to automatically manage the value
of crashkernel. Since extra memory needs to be allocated for cases like
swiotlb memory requirement, this comparison would become invalid.
kexec-tools needs the user to explicitly tell kexec-tools if crashkernel
should be managed automatically. Thus introduce crashkernel in
kdump.conf.
Signed-off-by: Coiby Xu <coxu(a)redhat.com>
---
kdump.conf | 6 ++++++
kdump.conf.5 | 7 +++++++
2 files changed, 13 insertions(+)
diff --git a/kdump.conf b/kdump.conf
index dea2e94..139ed81 100644
--- a/kdump.conf
+++ b/kdump.conf
@@ -11,6 +11,11 @@
#
# Supported options:
#
+# crashkernel <auto|ANY_FORMAT_SUPPORTED_BY_KERNEL_CRASHKERNEL_CMDLINE>
+# - when crashkernel=auto, kexec-tools will set up the kernel
+# crashkernel cmdline automatically. Note this is a best-effort
+# etimation.
+#
# raw <partition>
# - Will dd /proc/vmcore into <partition>.
# Use persistent device names for partition devices,
@@ -170,6 +175,7 @@
#ssh user(a)my.server.com
#ssh user@2001:db8::1:2:3:4
#sshkey /root/.ssh/kdump_id_rsa
+crashkernel auto
path /var/crash
core_collector makedumpfile -l --message-level 7 -d 31
#core_collector scp
diff --git a/kdump.conf.5 b/kdump.conf.5
index 6e6cafa..98c16f8 100644
--- a/kdump.conf.5
+++ b/kdump.conf.5
@@ -26,6 +26,13 @@ understand how this configuration file affects the behavior of kdump.
.SH OPTIONS
+.B crashkernel <auto|ANY_FORMAT_SUPPORTED_BY_KERNEL_CRASHKERNEL_CMDLINE>
+.RS
+when crashkernel=auto, kexec-tools will set up the kernel crashkernel cmdline
+automatically when installing a kernel. Note the value is based on prior
+experence and doesn't gurantee the resered memory is sufficient for kdump.
+If OOM occurs, please set it to a different value.
+
.B raw <partition>
.RS
Will dd /proc/vmcore into <partition>. Use persistent device names for
--
2.31.1