On 07/24/14 at 01:43pm, Vivek Goyal wrote:
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(a)redhat.com>
It looks good to me.
Acked-by: WANG Chao <chaowang(a)redhat.com>
---
dracut-kdump.sh | 5 +++++
1 file changed, 5 insertions(+)
Index: kexec-tools-fedora/dracut-kdump.sh
===================================================================
--- kexec-tools-fedora.orig/dracut-kdump.sh 2014-06-03 08:41:19.024008596 -0400
+++ kexec-tools-fedora/dracut-kdump.sh 2014-07-24 13:43:13.042387127 -0400
@@ -174,6 +174,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"
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec