From: Kazuhito Hagio <k-hagio-ab(a)nec.com>
Since commit 6dee286467e5 ("Don't mount the dump target unless needed"),
dump_fs function unmounts the dump target just after saving vmcore.
This broke the condition that it's mounted when executing "kdump_post",
which had been stable since RHEL5, and a certain tool which uses the
kdump_post hook to save information of 2nd kernel to the dump target
started to fail.
As unmounting it is done by systemd-shutdown before reboot without
the umount command as below, so let's don't unmount it in dump_fs.
systemd-shutdown[1]: Unmounting file systems.
[547]: Remounting '/sysroot' read-only in with options '(null)'.
EXT4-fs (dm-0): re-mounted. Opts: (null)
[548]: Unmounting '/sysroot'.
Signed-off-by: Kazuhito Hagio <k-hagio-ab(a)nec.com>
---
kdump-lib-initramfs.sh | 6 ------
1 file changed, 6 deletions(-)
diff --git a/kdump-lib-initramfs.sh b/kdump-lib-initramfs.sh
index a7c0bf9..7b314a7 100755
--- a/kdump-lib-initramfs.sh
+++ b/kdump-lib-initramfs.sh
@@ -97,7 +97,6 @@ get_kdump_confs()
# dump_fs <mount point| device>
dump_fs()
{
- local _do_umount=""
local _dev=$(findmnt -k -f -n -r -o SOURCE $1)
local _mp=$(findmnt -k -f -n -r -o TARGET $1)
local _op=$(findmnt -k -f -n -r -o OPTIONS $1)
@@ -116,7 +115,6 @@ dump_fs()
echo "kdump: mounting failed (mount point: $_mp, option:
$_op)"
return 1
fi
- _do_umount=1
else
echo "kdump: error: Dump target $_dev is not usable"
fi
@@ -147,10 +145,6 @@ dump_fs()
echo "kdump: saving vmcore complete"
- if [ $_do_umount ]; then
- umount $_mp || echo "kdump: warn: failed to umount target"
- fi
-
# improper kernel cmdline can cause the failure of echo, we can ignore this kind of
failure
return 0
}
--
2.24.1