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(a)stratus.com>
> Reported-by: Charlotte Richardson <charlotte.richardson(a)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(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec