centos – 无法启动kdump

前端之家收集整理的这篇文章主要介绍了centos – 无法启动kdump前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我的系统总是崩溃.所以我决定启用kdump来查看问题,因为我无法在日志文件中看到可能的错误.

我跟着steps to set up kdump from a site here.我的服务器在CentOS 5.8和16GB RAM上运行.以下是我为配置kdump所执行的步骤:

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

当我运行服务kdump状态时,它说Kdump不能运行.
我应该怎么做才能使kdump运作起来.我错过了配置的东西吗?
我在下面包含了/boot/grub/grub.conf和/etc/kdump.conf的内容

Bellow是文件/boot/grub/grub.conf的内容

  1. # grub.conf generated by anaconda
  2. #
  3. # Note that you do not have to rerun grub after making changes to this file
  4. # NOTICE: You have a /boot partition. This means that
  5. # all kernel and initrd paths are relative to /boot/,eg.
  6. # root (hd0,0)
  7. # kernel /vmlinuz-version ro root=/dev/sda3
  8. # initrd /initrd-version.img
  9. #boot=/dev/sda
  10. default=0
  11. timeout=5
  12. splashimage=(hd0,0)/grub/splash.xpm.gz
  13. hiddenmenu
  14. title CentOS (2.6.18-308.el5)
  15. root (hd0,0)
  16. kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
  17. crashkernel=128M
  18. initrd /initrd-2.6.18-308.el5.img

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

  1. # Configures where to put the kdump /proc/vmcore files
  2. #
  3. # This file contains a series of commands to perform (in order) when a
  4. # kernel crash has happened and the kdump kernel has been loaded. Directives in
  5. # this file are only applicable to the kdump initramfs,and have no effect if
  6. # the root filesystem is mounted and the normal init scripts are processed
  7. #
  8. # Currently only one dump target and path may be configured at once
  9. # if the configured dump target fails,the default action will be preformed
  10. # the default action may be configured with the default directive below. If the
  11. # configured dump target succedes
  12. #
  13. # For filesystem based dump,it's recommended to use UUID and LABEL
  14. # instead of device name in dump target.
  15. #
  16. # See the kdump.conf(5) man page for details of configuration directives
  17.  
  18. #raw /dev/sda5
  19. #ext3 /dev/sda3
  20. #ext3 LABEL=/boot
  21. #ext3 UUID=03138356-5e61-4ab3-b58e-27507ac41937
  22. #net my.server.com:/export/tmp
  23. #net user@my.server.com
  24. path /var/crash
  25. core_collector makedumpfile -c --message-level 1
  26. #core_collector cp --sparse=always
  27. #link_delay 60
  28. #kdump_post /var/crash/scripts/kdump-post.sh
  29. #extra_bins /usr/bin/lftp
  30. #disk_timeout 30
  31. #extra_modules gfs2
  32. #options modulename options
  33. #default shell
  34. #sshkey /root/.ssh/kdump_id_rsa

我还注意到我的/boot/grub/grub.conf文件与本教程中的示例grub.conf文件不同.它们有两行不同:

  1. From tutorial
  2. kernel /vmlinuz-2.6.32-220.el6.x86_64 ro root=/dev/sda3
  3. initrd /initramfs-2.6.32-220.el6.x86_64.img
  4.  
  5. From own conf
  6. kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
  7. initrd /initrd-2.6.18-308.el5.img

这些行会导致kdump无法启动吗?

[编辑1]
/ var / log / messages的内容

  1. Feb 25 02:18:28 61540 kernel: Command line: ro root=LABEL=/ crashkernel=128M
  2. Feb 25 02:18:28 61540 kernel: BIOS-provided physical RAM map:
  3. Feb 25 02:18:28 61540 kernel: BIOS-e820: 0000000000010000 - 000000000009a000 (usable)
  4. Feb 25 02:18:28 61540 kernel: BIOS-e820: 000000000009f800 - 00000000000a0000 (reserved)
  5. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
  6. Feb 25 02:18:28 61540 kernel: BIOS-e820: 0000000000100000 - 00000000cfda0000 (usable)
  7. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000cfda0000 - 00000000cfdd1000 (ACPI NVS)
  8. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000cfdd1000 - 00000000cfe00000 (ACPI data)
  9. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000cfe00000 - 00000000cff00000 (reserved)
  10. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000e0000000 - 00000000f0000000 (reserved)
  11. Feb 25 02:18:28 61540 kernel: BIOS-e820: 00000000fec00000 - 0000000100000000 (reserved)
  12. Feb 25 02:18:28 61540 kernel: BIOS-e820: 0000000100000000 - 000000042f000000 (usable)
  13. Feb 25 02:18:28 61540 kernel: DMI 2.4 present.
  14. Feb 25 02:18:28 61540 kernel: No NUMA configuration found
  15. Feb 25 02:18:28 61540 kernel: Faking a node at 0000000000000000-000000042f000000
  16. Feb 25 02:18:28 61540 kernel: Bootmem setup node 0 0000000000000000-000000042f000000
  17. Feb 25 02:18:28 61540 kernel: Memory for crash kernel (0x0 to 0x0) notwithin permissible range
  18. Feb 25 02:18:28 61540 kernel: disabling kdump
  19. Feb 25 02:44:39 61540 kdump: No crashkernel parameter was specified or crashkernel memory reservation Failed
  20. Feb 25 02:44:39 61540 kdump: Failed to start up

[编辑2]
或者我应该将代码ro root = LABEL =更改为ro root = / dev / sda3?

  1. title CentOS (2.6.18-308.el5)
  2. root (hd0,0)
  3. kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/
  4. crashkernel=128M
  5. initrd /initrd-2.6.18-308.el5.img

看起来您将crashkernel参数放入新行.这就是Kdump不是操作消息的原因.所有内核参数必须与内核放在同一行:

  1. title CentOS (2.6.18-308.el5)
  2. root (hd0,0)
  3. kernel /vmlinuz-2.6.18-308.el5 ro root=LABEL=/ crashkernel=128M
  4. initrd /initrd-2.6.18-308.el5.img

重新启动后,看一下/ var / log / messages,你会看到如下内容

  1. localhost kdump: kexec: loaded kdump kernel
  2. localhost kdump: started up

和:

  1. # /etc/init.d/kdump start
  2. Starting kdump: [ OK ]
  3. # /etc/init.d/kdump status
  4. Kdump is operational
  1. kdump: No crashkernel parameter was specified or crashkernel memory reservation Failed
  2. kdump: Failed to start up

根据this文档,试试这个:

crashkernel = 128M @ 16M

猜你在找的CentOS相关文章