[kexec-tools] dracut-kdump.sh: Issue a sync after saving vmcore-dmesg.txt
WANG Chao
wangchao at fedoraproject.org
Mon Jul 28 05:23:01 UTC 2014
commit 7f2717aa0ad98c01a32a59735f0579498fee84ec
Author: Vivek Goyal <vgoyal at redhat.com>
Date: Thu Jul 24 13:43:48 2014 -0400
dracut-kdump.sh: Issue a sync after saving vmcore-dmesg.txt
Recently somebody reported an issue where vmcore-dmesg.txt was saved
successfully but later saving vmcore failed to due to lack of space on disk.
System rebooted but after reboot there was nothing on disk. Not even
vmcore-dmesg.txt.
Issue a sync after saving vmcore-dmesg.txt to solve this issue.
I think this is happening because we are doing "reboot -f" instead of going
through systemd reboot path. Anyway, doing a sync now should take care of
this.
Signed-off-by: Vivek Goyal <vgoyal at redhat.com>
Acked-by: WANG Chao <chaowang at redhat.com>
dracut-kdump.sh | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/dracut-kdump.sh b/dracut-kdump.sh
index 9958317..e6faf9c 100755
--- a/dracut-kdump.sh
+++ b/dracut-kdump.sh
@@ -179,6 +179,11 @@ save_vmcore_dmesg_fs() {
_exitcode=$?
if [ $_exitcode -eq 0 ]; then
mv ${_path}/vmcore-dmesg-incomplete.txt ${_path}/vmcore-dmesg.txt
+
+ # Make sure file is on disk. There have been instances where later
+ # saving vmcore failed and system rebooted without sync and there
+ # was no vmcore-dmesg.txt available.
+ sync
echo "kdump: saving vmcore-dmesg.txt complete"
else
echo "kdump: saving vmcore-dmesg.txt failed"
More information about the scm-commits
mailing list