近頃妙にサーバが重い。再起動をしても直らない。ふとコンソールを見てみたら以下のようなエラーメッセージが出ていた。
いつからこうなったのか判らないが、再起動をしてもかならず出てくる。試しにカーネルを最新版にあげてみることにした。昔はCD-ROMドライバやサウンドドライバをインストールしたり、FATで日本語ファイル名を使ったりするためにカーネルソースをダウンロードしてmake menuconfigして再構築したりしたものだが、今は必要なモジュールはほとんどローダブルモジュールとして自動的にロードされるので、ディストリビューションで用意されているカーネルをyumでアップデートするだけで済ましてしまう。
まずは現在の情報を確認する。
[root@www ~]# uname -a
Linux www.grandarbre.net 2.6.21-1.3194.fc7 #1 SMP Wed May 23 22:35:01 EDT 2007 i686 i686 i386 GNU/Linux
[root@www sysconfig]# rpm -q kernel
kernel-2.6.21-1.3194.fc7
そしておもむろにアップデートをする。やることはこれだけ。
root@www ~]# yum upgrade kernel
Loading "installonlyn" plugin
Setting up Upgrade Process
fedora 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
primary.sqlite.bz2 100% |=========================| 1.5 MB 00:24
Resolving Dependencies
--> Running transaction check
filelists.sqlite.bz2 100% |=========================| 3.5 MB 00:54
---> Package kernel.i686 0:2.6.22.5-76.fc7 set to be updated
--> Processing Dependency: mkinitrd >= 6.0.9-7.1 for package: kernel
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package mkinitrd.i386 0:6.0.9-7.1 set to be updated
--> Processing Dependency: nash = 6.0.9-7.1 for package: mkinitrd
--> Restarting Dependency Resolution with new changes.
--> Running transaction check
---> Package nash.i386 0:6.0.9-7.1 set to be updated
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
kernel i686 2.6.22.5-76.fc7 updates 16 M
Updating for dependencies:
mkinitrd i386 6.0.9-7.1 updates 91 k
nash i386 6.0.9-7.1 updates 158 k
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 2 Package(s)
Remove 0 Package(s)
Total download size: 16 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): kernel-2.6.22.5-76 100% |=========================| 16 MB 04:16
(2/3): mkinitrd-6.0.9-7.1 100% |=========================| 91 kB 00:02
(3/3): nash-6.0.9-7.1.i38 100% |=========================| 158 kB 00:03
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : nash ######################### [1/5]
Updating : mkinitrd ######################### [2/5]
Installing: kernel ######################### [3/5]
Cleanup : nash ######################### [4/5]
Cleanup : mkinitrd ######################### [5/5]
Installed: kernel.i686 0:2.6.22.5-76.fc7
Dependency Updated: mkinitrd.i386 0:6.0.9-7.1 nash.i386 0:6.0.9-7.1
Complete!
[root@www ~]#
いちおうブートローダが更新されていることを確認する。
[root@www ~]# cat /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 Fedora (2.6.22.5-76.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.22.5-76.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.22.5-76.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,0)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
[root@www etc]#
カーネルも確認する。
[root@www ~]# ls /boot/
System.map-2.6.21-1.3194.fc7 grub vmlinuz-2.6.21-1.3194.fc7
System.map-2.6.22.5-76.fc7 initrd-2.6.21-1.3194.fc7.img vmlinuz-2.6.22.5-76.fc7
config-2.6.21-1.3194.fc7 initrd-2.6.22.5-76.fc7.img
config-2.6.22.5-76.fc7 lost+found
[root@www ~]#
そしておもむろに再起動!!
[root@www ~]# reboot
Broadcast message from root (pts/0) (Tue Sep 18 22:54:34 2007):
The system is going down for reboot NOW!
[root@www ~]#
コンソールで起動メッセージを見たが問題なく新しいバージョンであがってきた。
[root@www ~]# uname -a
Linux www.grandarbre.net 2.6.22.5-76.fc7 #1 SMP Thu Aug 30 13:47:21 EDT 2007 i686 i686 i386 GNU/Linux
[root@www ~]#
コンソールのレスポンスが明らかに良くなっている。Movable Typeの編集画面の重さは相変わらずだが...。
