Kernel crash dump (vmcore) not getting generated inside partition mounted under /var/crash.

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux Server (RHEL) 5.
  • Red Hat Enterprise Linux Server (RHEL) 6.
  • Red Hat Enterprise Linux Server (RHEL) 7.

Issue

  • vmcore not getting generated inside the partition mounted under /var/crash.

Resolution

  • This happens if /var/crash mount point was defined after the generation of the kdump initrd image. Hence in order to update the kdump initrd image with changes in /var/crash path you need to regenerate the initrd image after mounting the /var/crash partition..

Kindly run below two commands in sequence to regenerate the initrd image for kdump. Once done test the kdump and check if vmcore is getting generated under /var/crash.

# touch /etc/kdump.conf
# service kdump restart

Root Cause

  • The /var/crash mount point was defined after the generation of the kdump initrd image. Thus the kdump initrd image is not updated with changes in /var/crash path.

Diagnostic Steps

  • The kdump is configured to generate vmcore in /var/crash as per /etc/kdump.conf given below:

    path /var/crash
    core_collector makedumpfile -c --message-level 1 -d 31
    
  • Contents of /etc/fstab:

    /dev/mapper/VolGroup00-lv_root    /    ext4    defaults    1    1
    /dev/mapper/VolGroup00-crash    /var/crash    ext4    defaults    1    2
    

    But vmcore is getting generated in side /dev/mapper/VolGroup00-lv_root which is the default path for /var/crash before /var/crash mount point was defined.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments