朝っぱらに自分のケータイがしつこく鳴るので眠い目をこすりながら確かめてみると、サーバが落ちてるよメールでした。とりあえずアラートを止めようとPC立ち上げたら、目が冴えてきたので、ついでにさくらに電話して状況を確認してもらうと、7月末に引き続きrejecting I/O to offline deviceが出るというパターンでした。
いい加減プライベートなサーバのトラブルで睡眠を妨害させられるのにイライラしてきたので、本気でVPSへの移行を考えたいと思いますが、その前にできるだけのことはやってみようということでRAIDカードのドライバをアップデートしてみました。いちおう書いておきますが、トラブルもないのにRAIDカードのドライバをアップデートすることはお勧めできません。特にホスティングだとブートしなくなった場合の選択肢も少ないので、安易に真似しないでください。
以下、作業メモ。
† ドライバのダウンロード先URLを確認する
3ware 9650SE の最新のドライバについては LSI のサイトにあります。
今回は現状の最新版である 9.5.3 code set に含まれる Linux ドライバを使いました。
LSI KnowledgeBase - Downloads - 3ware - 9.5.3 code set
† ドライバを更新する
まず、作業前にアップデート前のドライバのバージョンを確認(メモ)しておきます。
# /opt/AMCC/CLI/tw_cli /c0 show all | grep Driver
/c0 Driver Version = 2.26.08.003-2.6.18RH
念のため現状のドライバのバックアップを取っておきます。
# cp /lib/modules/`uname -r`/kernel/drivers/scsi/3w-9xxx.ko 3w-9xxx.ko.bak
その後、ドライバのダウンロード、解凍、md5で破損がないかのチェックをしておきます。
対象となるマシンは Cent OS 5.5 (x86) なので、今回は RedHat EL5_U4/driver-redhat-el5_u4-x86-9.5.3.tgz を使っています。
# wget ftp://tsupport:tsupport@ftp0.lsil.com/private/3Ware/downloads/driver-linux-9.5.3.zip
# unzip driver-linux-9.5.3.zip
Archive: driver-linux-9.5.3.zip
inflating: Linux driver source/3w-9xxx-linux-src-9.5.3.tgz
extracting: Linux driver source/driver-linux_2.4-9.5.3.tgz
inflating: SuSE 11/driver-suse-su111-x86-9.5.3.tgz
inflating: SuSE 11/driver-suse-su111-x86_64-9.5.3.tgz
inflating: SuSE 11/driver-suse11-x86-9.5.3.tgz
inflating: SuSE 11/driver-suse11-x86_64-9.5.2.tgz
inflating: SuSE 11.1/suse11-sles-installdisk-x86-9.5.3.img
inflating: SuSE 11.1/suse11-sles-installdisk-x86-9.5.3.tgz
inflating: SuSE 11.1/suse11-sles-installdisk-x86_64-9.5.3.img
inflating: SuSE 11.1/suse11-sles-installdisk-x86_64-9.5.3.tgz
inflating: SuSE 11.1/suse111-installdisk-x86-9.5.3.img
inflating: SuSE 11.1/suse111-installdisk-x86-9.5.3.tgz
inflating: SuSE 11.1/suse111-installdisk-x86_64-9.5.3.img
inflating: SuSE 11.1/suse111-installdisk-x86_64-9.5.3.tgz
inflating: Fedora Core 11/driver-fedoracore11-x86-9.5.3.tgz
inflating: Fedora Core 11/driver-fedoracore11-x86_64-9.5.3.tgz
inflating: Fedora Core 11/fedoracore-installdisk-x86-9.5.3.img
inflating: Fedora Core 11/fedoracore-installdisk-x86-9.5.3.tgz
inflating: Fedora Core 11/fedoracore-installdisk-x86_x64-9.5.3.img
inflating: Fedora Core 11/fedoracore-installdisk-x86_x64-9.5.3.tgz
inflating: RedHat EL5_U4/driver-redhat-el5_u4-x86-9.5.3.tgz
inflating: RedHat EL5_U4/driver-redhat-el5_u4-x86_64-9.5.3.tgz
inflating: RedHat EL5_U4/redhat-installdisk-x86-9.5.3.img
inflating: RedHat EL5_U4/redhat-installdisk-x86-9.5.3.tgz
inflating: RedHat EL5_U4/redhat-installdisk-x86_64-9.5.3.img
inflating: RedHat EL5_U4/redhat-installdisk-x86_64-9.5.3.tgz
# cd RedHat\ EL5_U4/
# tar zxvf driver-redhat-el5_u4-x86-9.5.3.tgz
3w-9xxx.ko
3w-9xxx.pae
3w-9xxx.xen
md5sums
# md5sum -c md5sums
3w-9xxx.ko: OK
3w-9xxx.pae: OK
3w-9xxx.xen: OK
上記で問題がなければ、ドライバをインストールします。下記の方法だと現在使っているカーネルにインストールしてしまうので、Kernelのアップデート後にまだリブートを行っていない場合には作業前にリブートしておくほうが賢明です。また、新規インストールするドライバであれば /etc/modprobe.conf の編集が必要ですが、バージョンアップであれば特にいじる必要はないと思います。
# cp 3w-9xxx.ko /lib/modules/`uname -r`/kernel/drivers/scsi/
cp: overwrite `/lib/modules/2.6.18-194.17.1.el5/kernel/drivers/scsi/3w-9xxx.ko'? y
その後、initrdのイメージを更新しておきます。
# cd /boot
# mkinitrd -v -f initrd-`uname -r`.img `uname -r`
Creating initramfs
Looking for deps of module ehci-hcd
Looking for deps of module ohci-hcd
Looking for deps of module uhci-hcd
Looking for deps of module ext3: jbd
Looking for deps of module jbd
Looking for driver for device sda2
Looking for deps of module pci:v000013C1d00001004sv000013C1sd00001004bc01sc04i00: scsi_mod 3w-9xxx
Looking for deps of module scsi_mod
Looking for deps of module sd_mod: scsi_mod
Looking for deps of module 3w-9xxx: scsi_mod
(省略)
ここまでの手順で問題なければマシンをリブートします。
# shutdown -r now
ブート後、バージョンを確認してドライバが更新されているか確認します。
# /opt/AMCC/CLI/tw_cli /c0 show all | grep Driver
/c0 Driver Version = 2.26.08.006-2.6.18