今更ですが、RHEL5環境にkdumpをインストールしました。
なお、適用にはOSの再起動が必須なので、運用中のサーバにインストールする場合は注意が必要です。
1.kexec-toolsのインストール
# yum install kexec-tools
~~~中略~~~
Dependencies Resolved
================================================================================================================================
Package Arch Version Repository Size
================================================================================================================================
Installing:
kexec-tools i386 1.102pre-164.el5 base 580 k
Installing for dependencies:
busybox i386 1:1.2.0-14.el5.centos base 1.1 M
Transaction Summary
================================================================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 1.6 M
~~~下略~~~
なお、これだけではkdumpを起動しようとしてもエラーがでて起動すらしません。
# /etc/rc.d/init.d/kdump start
Detected change(s) the following file(s):
/etc/kdump.conf
Rebuilding /boot/initrd-2.6.18-371.1.2.el5kdump.img
Starting kdump:[失敗]
# /etc/rc.d/init.d/kdump status
Kdump is not operational
# cat /var/log/messages
~~~上略~~~
Apr 12 1:00:10 HOGE kdump: No crashkernel parameter was specified or crashkernel memory reservation failed
Apr 12 1:00:10 HOGE kdump: failed to start up
2.grub.confの設定
kdump用にメモリの割り当てを設定します
# vi /etc/grub.conf # 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/VolGroup00/LogVol00 # initrd /initrd-version.img #boot=/dev/sda default=0 timeout=5 splashimage=(hd0,0)/grub/splash.xpm.gz hiddenmenu title Red Hat Enterprise Linux Server (2.6.18-371.1.2.el5) root (hd0,0) ※赤文字の部分を追記します。なお、RHEL6の場合は@以降は不要(Auto)です kernel /vmlinuz-2.6.18-371.1.2.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet crashkernel=128M@16M initrd /initrd-2.6.18-371.1.2.el5.img
3.OSの再起動
設定を適用するためにOSを再起動します。
4.OS再起動後の動作確認
# /etc/rc.d/init.d/kdump status
Kdump is operational
# cat /var/log/messages
~~~上略~~~
Apr 12 1:02:10 HOGE kdump: kexec: loaded kdump kernel
Apr 12 1:02:10 HOGE kdump: started up