Kdump fails to start with error "Memory for crashkernel is not reserved".

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux (RHEL) 5
  • Red Hat Enterprise Linux (RHEL) 6
  • Using kdump with crash kernel offset specified

Issue

  • After enabling kdump, a service kdump restart throws the following error:
Memory for crashkernel is not reserved
Please reserve memory by passing "crashkernel=X@Y" parameter to the kernel
Stopping kdump:                                            [FAILED]
Starting kdump:                                            [FAILED]

Resolution

The error message "Memory for crashkernel is not reserved" comes from the kexec-tools on which the kdump service relies on.

In the following discussion, we use crashkernel=128M@16M as an example.

Red Hat Enterprise Linux 5

Once reserving memory for the crash kernel fails, kdump will log the following messages into system log:

No crashkernel parameter was specified or crashkernel memory reservation failed

On RHEL5 the @16M etc. is a valid syntax for the crash kernel offset. Further verify that the size and the offset are configured correctly, with the RAM size of the system in mind. KCS How should the crashkernel parameter be configured for using kdump on Red Hat Enterprise Linux 5? has details. A reboot is required for the changed parameter to become active.

Red Hat Enterprise Linux 6

Once reserving memory for the crash kernel fails, kdump will log the following messages into system log:

No crashkernel parameter specified for running kernel

On RHEL6, remove the @16M and have the boot parameter read crashkernel=128M. This will ensure that the kernel selects the reserve location for you, giving the kernel greater leeway in finding a large contiguous region. KCS How should the crashkernel parameter be configured for using kdump on RHEL6? has details. A reboot is required for the changed parameter to become active.

Root Cause

  • The crashkernel values instruct the kernel to reserve 128M at a 16M offset. The offset has to be increased because the RHEL 6 kernel needs more than 16M in memory. It is also possible to try specifying only crashkernel=128M on RHEL6, the offset will be calculated automatically.

Diagnostic Steps

  • Output of cat /proc/cmdline:

    ro root=/dev/mapper/vg00-slashvol rd_LVM_LV=vg00/slashvol rd_LVM_LV=vg00/swapvol rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us crashkernel=128M@16M
    
  • Examined /var/log/messages to examine where the system was attempting to reserve memory, as this message was being passed to the kernel on start.

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