LoginSignup
3
1

More than 5 years have passed since last update.

kdump設定

Posted at

■kdump設定
①systemctl start kdump.serviceで起動した際にエラーになる
②cat /var/log/messages | grep kdump
Apr 23 07:05:51 localhost systemd: Unit kdump.service entered failed state.
Apr 23 07:05:51 localhost systemd: kdump.service failed.
Apr 23 07:09:11 localhost kdumpctl: No memory reserved for crash kernel.
Apr 23 07:09:11 localhost kdumpctl: Starting kdump: [FAILED]
Apr 23 07:09:11 localhost systemd: kdump.service: main process exited, code=exited, status=1/FAILURE

No memory reserved for crash kernel.
カーネルクラッシュ時のメモリがないよ。という意味らしい

③/etc/default/grubを編集
GRUB_CMDLINE_LINUX="crashkernel=auto rhgb quiet"

GRUB_CMDLINE_LINUX="rd.lvm.lv=centos/swap vconsole.font=latarcyrheb-sun16 vconsole.keymap=jp106 rd.lvm.lv=centos/root crashkernel=128M rhgb quiet"

④上記のように crashkernel=auto → crashkernel=128M へ変更
編集後、grub2-mkconfig で、最新のgrub設定ファイルを生成
grub2-mkconfig -o /boot/grub2/grub.cfg

⑤生成後、リブート
reboot

⑥再度、kdumpの状態を確認
[root@localhost ~]# systemctl status kdump.service
● kdump.service - Crash recovery kernel arming
Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled)
Active: active (exited) since Tue 2019-04-23 08:06:36 PDT; 1min 23s ago
Process: 4398 ExecStart=/usr/bin/kdumpctl start (code=exited, status=0/SUCCESS)
Main PID: 4398 (code=exited, status=0/SUCCESS)
Tasks: 0
CGroup: /system.slice/kdump.service

Apr 23 08:06:27 localhost.localdomain systemd[1]: Starting Crash recovery ker...
Apr 23 08:06:36 localhost.localdomain kdumpctl[4398]: kexec: loaded kdump kernel
Apr 23 08:06:36 localhost.localdomain kdumpctl[4398]: Starting kdump: [OK]
Apr 23 08:06:36 localhost.localdomain systemd[1]: Started Crash recovery kern...
Hint: Some lines were ellipsized, use -l to show in full.

⑦/var/log/messagesでも、問題ないことを確認する。
[root@localhost ~]# cat /var/log/messages | grep kdump
Apr 23 08:06:36 localhost kdumpctl: kexec: loaded kdump kernel
Apr 23 08:06:36 localhost kdumpctl: Starting kdump: [OK]

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1