On 03/30/2017 at 04:10 PM, Xunlei Pang wrote:
In diskless environment, if "path XXX" is located at the
root fs(i.e. root nfs), we must call kdump_install_net(),
otherwise kdump will lose the network connection.
Signed-off-by: Xunlei Pang <xlpang(a)redhat.com>
---
dracut-module-setup.sh | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 1f96bb8..1937792 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -390,10 +390,9 @@ default_dump_target_install_conf()
_save_path=$_mntpoint/$_save_path
fi
+ _fstype=$(get_fs_type_from_target $_target)
if [ "$_mntpoint" != "/" ]; then
- _fstype=$(get_fs_type_from_target $_target)
-
- if $(is_fs_type_nfs $_fstype); then
+ if is_fs_type_nfs $_fstype; then
kdump_install_net "$_target"
_fstype="nfs"
else
@@ -405,6 +404,9 @@ default_dump_target_install_conf()
# strip the duplicated "/"
_save_path=$(echo $_save_path | tr -s /)
_save_path=${_save_path##"$_mntpoint"}
+ elif is_fs_type_nfs $_fstype; then
+ # root is nfs mount(diskless environment)
+ kdump_install_net "$_target"
Considered more, should we regard this case as the remote nfs dumping,
so to add IP information in the dump folder name, i.e. two more lines here?
+ _fstype="nfs"
+ echo "$_fstype $_target" >> ${initdir}/tmp/$$-kdump.conf
Regards,
Xunlei
fi
#erase the old path line, then insert the parsed path