首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法启动kdump

无法启动kdump
EN

Server Fault用户
提问于 2013-02-25 07:37:36
回答 2查看 19.7K关注 0票数 3

我的系统总是崩溃。因此,我决定启用kdump来查看问题,因为我无法在日志文件上看到可能的错误。

我跟踪了从此站点设置kdump的步骤。我的服务器运行在CentOS 5.8和16 on内存上。下面是我为配置kdump所执行的步骤:

代码语言:javascript
复制
1. Install kexec-tools, `yum install kexec-tools` and follow the installation steps
2. Edit the /boot/grub/grub.conf to configure the kdump memory usage
3. Edit the /etc/kdump.cof to configure the target type to /var/crash/ and core_collector
4. Enable kdump through `chkconfig kdump on`.
5. Reboot the server

当我运行service kdump status时,上面写着Kdump is not operational。我该怎么做才能让kdump开始运作。我错过什么配置了吗?下面是我的/boot/grub/grub.conf和/etc/kdump.conf的内容。

以下是文件/boot/grub/grub.conf的内容

代码语言:javascript
复制
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/sda3
#          initrd /initrd-version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-308.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
crashkernel=128M
        initrd /initrd-2.6.18-308.el5.img

下面是文件/etc/kdump.conf的内容

代码语言:javascript
复制
# Configures where to put the kdump /proc/vmcore files
#
# This file contains a series of commands to perform (in order) when a
# kernel crash has happened and the kdump kernel has been loaded.  Directives in
# this file are only applicable to the kdump initramfs, and have no effect if
# the root filesystem is mounted and the normal init scripts are processed
#
# Currently only one dump target and path may be configured at once
# if the configured dump target fails, the default action will be preformed
# the default action may be configured with the default directive below.  If the
# configured dump target succedes
#
# For filesystem based dump, it's recommended to use UUID and LABEL
# instead of device name in dump target.
#
# See the kdump.conf(5) man page for details of configuration directives

#raw /dev/sda5
#ext3 /dev/sda3
#ext3 LABEL=/boot
#ext3 UUID=03138356-5e61-4ab3-b58e-27507ac41937
#net my.server.com:/export/tmp
#net user@my.server.com
path /var/crash
core_collector makedumpfile -c --message-level 1
#core_collector cp --sparse=always
#link_delay 60
#kdump_post /var/crash/scripts/kdump-post.sh
#extra_bins /usr/bin/lftp
#disk_timeout 30
#extra_modules gfs2
#options modulename options
#default shell
#sshkey /root/.ssh/kdump_id_rsa

我还注意到,我的/boot/grub/grub.conf文件与教程中的示例grub.conf文件不同。它们有两条不同之处:

代码语言:javascript
复制
From tutorial
   kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/sda3
   initrd /initramfs-2.6.32-220.el6.x86_64.img

From own conf 
   kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
   initrd /initrd-2.6.18-308.el5.img 

这些行会不会导致kdump不启动?

/var/log/消息的编辑1内容

代码语言:javascript
复制
    Feb 25 02:18:28 61540 kernel: Command line: ro root=LABEL=/ crashkernel=128M
    Feb 25 02:18:28 61540 kernel: BIOS-provided physical RAM map:
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 0000000000010000 - 000000000009a000 (usable)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 0000000000100000 - 00000000cfda0000 (usable)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000cfda0000 - 00000000cfdd1000 (ACPI NVS)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000cfdd1000 - 00000000cfe00000 (ACPI data)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000cfe00000 - 00000000cff00000 (reserved)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
    Feb 25 02:18:28 61540 kernel:  BIOS-e820: 0000000100000000 - 000000042f000000 (usable)
    Feb 25 02:18:28 61540 kernel: DMI 2.4 present.
    Feb 25 02:18:28 61540 kernel: No NUMA configuration found
    Feb 25 02:18:28 61540 kernel: Faking a node at 0000000000000000-000000042f000000
    Feb 25 02:18:28 61540 kernel: Bootmem setup node 0 0000000000000000-000000042f000000
    Feb 25 02:18:28 61540 kernel: Memory for crash kernel (0x0 to 0x0) notwithin permissible range
    Feb 25 02:18:28 61540 kernel: disabling kdump
    Feb 25 02:44:39 61540 kdump: No crashkernel parameter was specified or crashkernel memory reservation failed
    Feb 25 02:44:39 61540 kdump: failed to start up

编辑2,还是应该将ro root=LABEL=代码更改为ro root=/dev/sda3 3?

EN

回答 2

Server Fault用户

回答已采纳

发布于 2013-02-25 08:08:06

代码语言:javascript
复制
title CentOS (2.6.18-308.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
crashkernel=128M
        initrd /initrd-2.6.18-308.el5.img

看起来您将crashkernel参数放入一个新行中。这就是Kdump is not operational消息产生的原因。所有内核参数必须放在与kernel相同的行上:

代码语言:javascript
复制
title CentOS (2.6.18-308.el5)
        root (hd0,0)
        kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/ crashkernel=128M
        initrd /initrd-2.6.18-308.el5.img

重新启动后,查看一下/var/log/messages,您将看到如下所示:

代码语言:javascript
复制
localhost kdump: kexec: loaded kdump kernel
localhost kdump: started up

以及:

代码语言:javascript
复制
# /etc/init.d/kdump start
Starting kdump:                                            [  OK  ]
# /etc/init.d/kdump status
Kdump is operational
代码语言:javascript
复制
kdump: No crashkernel parameter was specified or crashkernel memory reservation failed
kdump: failed to start up

根据文档,尝试如下:

crashkernel=128M@16M

票数 3
EN

Server Fault用户

发布于 2013-05-08 19:00:38

你的核太小了。试试256米,384米,甚至512米。消息“crashkernel的内存.不在允许范围内”告诉您这一点。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/482151

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档