Dump destination directory prefix "127.0.0.1" doesn't add any useful information in the local dump_fs case. Remove it so that it agrees with kdump.conf(5) documentation for <fs type> <partition> option, which states the target directory format as "/mnt/var/crash/%DATE/".
Signed-off-by: Joe Lawrence joe.lawrence@stratus.com Reported-by: Charlotte Richardson charlotte.richardson@stratus.com --- kdump-lib-initramfs.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index 57b8304217cd..f657d836afa6 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -8,7 +8,6 @@ DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31" DMESG_COLLECTOR="/sbin/vmcore-dmesg" DEFAULT_ACTION="reboot" DATEDIR=`date +%Y.%m.%d-%T` -HOST_IP='127.0.0.1' DUMP_INSTRUCTION="" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" KDUMP_SCRIPT_DIR="/kdumpscripts" @@ -87,6 +86,7 @@ dump_fs()
local _dev=$(findmnt -k -f -n -r -o SOURCE $1) local _mp=$(findmnt -k -f -n -r -o TARGET $1) + local _dir=""
echo "kdump: dump target is $_dev"
@@ -95,19 +95,25 @@ dump_fs() return 1 fi
+ if [ -z "$HOST_IP" ]; then + _dir="$_mp/$KDUMP_PATH/$DATEDIR" + else + _dir="$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR" + fi + # Remove -F in makedumpfile case. We don't want a flat format dump here. [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
- echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/" + echo "kdump: saving to $_dir/"
mount -o remount,rw $_mp || return 1 - mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1 + mkdir -p $_dir || return 1
- save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/" + save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_dir/"
echo "kdump: saving vmcore" - $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1 - mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore + $CORE_COLLECTOR /proc/vmcore $_dir/vmcore-incomplete || return 1 + mv $_dir/vmcore-incomplete $_dir/vmcore sync
echo "kdump: saving vmcore complete"
On 02/08/15 at 11:23pm, Joe Lawrence wrote:
Dump destination directory prefix "127.0.0.1" doesn't add any useful information in the local dump_fs case. Remove it so that it agrees with kdump.conf(5) documentation for <fs type> <partition> option, which states the target directory format as "/mnt/var/crash/%DATE/".
We intend to use 127.0.1 in below commit, I guess for compability issue. Baoquan?
commit 3be6c1228e822fca98a72dac4e51893d164244e4 Author: Baoquan He bhe@redhat.com Date: Thu Dec 13 13:47:56 2012 +0800
change the dump dir format to be more readable
Signed-off-by: Joe Lawrence joe.lawrence@stratus.com Reported-by: Charlotte Richardson charlotte.richardson@stratus.com
kdump-lib-initramfs.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index 57b8304217cd..f657d836afa6 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -8,7 +8,6 @@ DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31" DMESG_COLLECTOR="/sbin/vmcore-dmesg" DEFAULT_ACTION="reboot" DATEDIR=`date +%Y.%m.%d-%T` -HOST_IP='127.0.0.1' DUMP_INSTRUCTION="" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" KDUMP_SCRIPT_DIR="/kdumpscripts" @@ -87,6 +86,7 @@ dump_fs()
local _dev=$(findmnt -k -f -n -r -o SOURCE $1) local _mp=$(findmnt -k -f -n -r -o TARGET $1)
local _dir=""
echo "kdump: dump target is $_dev"
@@ -95,19 +95,25 @@ dump_fs() return 1 fi
- if [ -z "$HOST_IP" ]; then
_dir="$_mp/$KDUMP_PATH/$DATEDIR"
- else
_dir="$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR"
- fi
- # Remove -F in makedumpfile case. We don't want a flat format dump here. [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
- echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
echo "kdump: saving to $_dir/"
mount -o remount,rw $_mp || return 1
- mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1
- mkdir -p $_dir || return 1
- save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_dir/"
echo "kdump: saving vmcore"
- $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1
- mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
$CORE_COLLECTOR /proc/vmcore $_dir/vmcore-incomplete || return 1
mv $_dir/vmcore-incomplete $_dir/vmcore sync
echo "kdump: saving vmcore complete"
-- 1.7.10.4
On 02/08/15 at 11:23pm, Joe Lawrence wrote:
Dump destination directory prefix "127.0.0.1" doesn't add any useful information in the local dump_fs case. Remove it so that it agrees with kdump.conf(5) documentation for <fs type> <partition> option, which states the target directory format as "/mnt/var/crash/%DATE/".
Hi Joe,
Thanks for posting.
Since we have been using the dir convention from rhel6, 127.0.0.1 truly doesn't add much information, while it does tell it's a local dump. The local dir naming does not match kdump.conf, so could we just change the document.
Thanks Baoquan
Signed-off-by: Joe Lawrence joe.lawrence@stratus.com Reported-by: Charlotte Richardson charlotte.richardson@stratus.com
kdump-lib-initramfs.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index 57b8304217cd..f657d836afa6 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -8,7 +8,6 @@ DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31" DMESG_COLLECTOR="/sbin/vmcore-dmesg" DEFAULT_ACTION="reboot" DATEDIR=`date +%Y.%m.%d-%T` -HOST_IP='127.0.0.1' DUMP_INSTRUCTION="" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" KDUMP_SCRIPT_DIR="/kdumpscripts" @@ -87,6 +86,7 @@ dump_fs()
local _dev=$(findmnt -k -f -n -r -o SOURCE $1) local _mp=$(findmnt -k -f -n -r -o TARGET $1)
local _dir=""
echo "kdump: dump target is $_dev"
@@ -95,19 +95,25 @@ dump_fs() return 1 fi
- if [ -z "$HOST_IP" ]; then
_dir="$_mp/$KDUMP_PATH/$DATEDIR"
- else
_dir="$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR"
- fi
- # Remove -F in makedumpfile case. We don't want a flat format dump here. [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
- echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
echo "kdump: saving to $_dir/"
mount -o remount,rw $_mp || return 1
- mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1
- mkdir -p $_dir || return 1
- save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_dir/"
echo "kdump: saving vmcore"
- $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1
- mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
$CORE_COLLECTOR /proc/vmcore $_dir/vmcore-incomplete || return 1
mv $_dir/vmcore-incomplete $_dir/vmcore sync
echo "kdump: saving vmcore complete"
-- 1.7.10.4
On 02/09/15 at 04:07pm, Baoquan He wrote:
On 02/08/15 at 11:23pm, Joe Lawrence wrote:
Dump destination directory prefix "127.0.0.1" doesn't add any useful information in the local dump_fs case. Remove it so that it agrees with kdump.conf(5) documentation for <fs type> <partition> option, which states the target directory format as "/mnt/var/crash/%DATE/".
Hi Joe,
Thanks for posting.
Since we have been using the dir convention from rhel6, 127.0.0.1 truly doesn't add much information, while it does tell it's a local dump. The local dir naming does not match kdump.conf, so could we just change the document.
Hi.
I think it is more reasonable to add the prefix "127.0.0.1" to the dump directory.
- indicate it is a local dump core, although we do not save the dump core via 127.0.0.1. - keep the same format of the dump directory. The adminstrator may like using the script to collect the kdump core. And the some format is more confortable to be filted.
Thanks Minfei
Thanks Baoquan
Signed-off-by: Joe Lawrence joe.lawrence@stratus.com Reported-by: Charlotte Richardson charlotte.richardson@stratus.com
kdump-lib-initramfs.sh | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh index 57b8304217cd..f657d836afa6 100755 --- a/kdump-lib-initramfs.sh +++ b/kdump-lib-initramfs.sh @@ -8,7 +8,6 @@ DEFAULT_CORE_COLLECTOR="makedumpfile -l --message-level 1 -d 31" DMESG_COLLECTOR="/sbin/vmcore-dmesg" DEFAULT_ACTION="reboot" DATEDIR=`date +%Y.%m.%d-%T` -HOST_IP='127.0.0.1' DUMP_INSTRUCTION="" SSH_KEY_LOCATION="/root/.ssh/kdump_id_rsa" KDUMP_SCRIPT_DIR="/kdumpscripts" @@ -87,6 +86,7 @@ dump_fs()
local _dev=$(findmnt -k -f -n -r -o SOURCE $1) local _mp=$(findmnt -k -f -n -r -o TARGET $1)
local _dir=""
echo "kdump: dump target is $_dev"
@@ -95,19 +95,25 @@ dump_fs() return 1 fi
- if [ -z "$HOST_IP" ]; then
_dir="$_mp/$KDUMP_PATH/$DATEDIR"
- else
_dir="$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR"
- fi
- # Remove -F in makedumpfile case. We don't want a flat format dump here. [[ $CORE_COLLECTOR = *makedumpfile* ]] && CORE_COLLECTOR=`echo $CORE_COLLECTOR | sed -e "s/-F//g"`
- echo "kdump: saving to $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
echo "kdump: saving to $_dir/"
mount -o remount,rw $_mp || return 1
- mkdir -p $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR || return 1
- mkdir -p $_dir || return 1
- save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/"
save_vmcore_dmesg_fs ${DMESG_COLLECTOR} "$_dir/"
echo "kdump: saving vmcore"
- $CORE_COLLECTOR /proc/vmcore $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete || return 1
- mv $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore-incomplete $_mp/$KDUMP_PATH/$HOST_IP-$DATEDIR/vmcore
$CORE_COLLECTOR /proc/vmcore $_dir/vmcore-incomplete || return 1
mv $_dir/vmcore-incomplete $_dir/vmcore sync
echo "kdump: saving vmcore complete"
-- 1.7.10.4
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec
Thanks for the clarification, guys.
Since this intentional, should the documentation be updated like the following patch?
Also, who invokes kdumpctl's save_core and save_raw, which don't appear to prefix %HOST?
-->8-- -->8--
From 412d69cd33db1f161792cdc7247b6fa2c6b93f25 Mon Sep 17 00:00:00 2001
From: Joe Lawrence joe.lawrence@stratus.com Date: Mon, 9 Feb 2015 09:22:45 -0500 Subject: [PATCH] update documentation for local fs dump dir prefix
commit 3be6c1228e82 "change the dump dir format to be more readable" re-added the host-ip to local fs dump destination directory (127.0.0.1). Update relevent documentation to match.
Signed-off-by: Joe Lawrence joe.lawrence@stratus.com Reported-by: Charlotte Richardson charlotte.richardson@stratus.com --- kdump.conf | 2 +- kdump.conf.5 | 2 +- kexec-kdump-howto.txt | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 54b581daf93b..214409429b4e 100644 --- a/kdump.conf +++ b/kdump.conf @@ -29,7 +29,7 @@ # /root/.ssh/kdump_id_rsa. # # <fs type> <partition> - Will mount -t <fs type> <partition> /mnt and copy -# /proc/vmcore to /mnt/var/crash/%DATE/. +# /proc/vmcore to /mnt/var/crash/%HOST-%DATE/. # NOTE: <partition> can be a device node, label or uuid. # It's recommended to use persistent device names # such as /dev/vg/<devname>. diff --git a/kdump.conf.5 b/kdump.conf.5 index f1c2a2c1d24e..6e61227ab946 100644 --- a/kdump.conf.5 +++ b/kdump.conf.5 @@ -55,7 +55,7 @@ the default value is /root/.ssh/kdump_id_rsa. .B <fs type> <partition> .RS Will mount -t <fs type> <partition> /mnt and copy /proc/vmcore to -/mnt/var/crash/%DATE/. NOTE: <partition> can be a device node, label +/mnt/var/crash/%HOST-%DATE/. NOTE: <partition> can be a device node, label or uuid. It's recommended to use persistent device names such as /dev/vg/<devname>. Otherwise it's suggested to use label or uuid. .RE diff --git a/kexec-kdump-howto.txt b/kexec-kdump-howto.txt index 05b497f692e1..5c5a78e73ed4 100644 --- a/kexec-kdump-howto.txt +++ b/kexec-kdump-howto.txt @@ -116,8 +116,8 @@ your system by echo'ing a c into /proc/sysrq-trigger: You should see some panic output, followed by the system restarting into the kdump kernel. When the boot process gets to the point where it starts the kdump service, your vmcore should be copied out to disk (by default, -in /var/crash/YYYY-MM-DD-HH:MM/vmcore), then the system rebooted back into -your normal kernel. +in /var/crash/<HOST-IP>-YYYY-MM-DD-HH:MM/vmcore), then the system rebooted +back into your normal kernel.
Once back to your normal kernel, you can use the previously installed crash kernel in conjunction with the previously installed kernel-debuginfo to