On 03/31/14 at 03:17pm, Baoquan He wrote:
If default target is a separate disk, the related information need be stored in /etc/kdump.conf of kdump initramfs. This includes the disk info which will help to deduce the dump_code and path which the vmcore will be written into.
Signed-off-by: Baoquan He bhe@redhat.com
dracut-module-setup.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index bdadf7c..4c95e3d 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -261,6 +261,37 @@ kdump_install_net() { fi }
+default_dump_target_install_conf() +{
- local _target _fstype
- local _s _t
- local _mntpoint
- local _path _save_path
- is_user_configured_dump_target && return
- _save_path=$(grep ^path "/etc/kdump.conf"| cut -d' ' -f2)
- [ -z "$_save_path" ] && _save_path=$DEFAULT_PATH
- _mntpoint=$(get_mntpoint_from_path $_save_path)
- _target=$(get_target_from_path $_save_path)
- if [ "$_mntpoint" != "/" ]; then
_fstype=$(get_fs_type_from_target $_target)
if [ "$_fstype" = "nfs" ];then
kdump_install_net "$_target"
$_fstype could be "nfs4" (I found this on my setup) and kdump will fail. You need to handle this "nfs4" case as well.
Thanks WANG Chao
else
_target=$(kdump_to_udev_name $_target)
fi
echo "$_fstype $_target" >> /tmp/$$-kdump.conf
_path=${_save_path##"$_mntpoint"}
sed -i -e "s#$_save_path#$_path#" /tmp/$$-kdump.conf
- fi
+}
#install kdump.conf and what user specifies in kdump.conf kdump_install_conf() { sed -ne '/^#/!p' /etc/kdump.conf > /tmp/$$-kdump.conf @@ -285,6 +316,8 @@ kdump_install_conf() { esac done < /etc/kdump.conf
- default_dump_target_install_conf
- kdump_check_fence_kdump inst "/tmp/$$-kdump.conf" "/etc/kdump.conf" rm -f /tmp/$$-kdump.conf
-- 1.8.5.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec