VirtualBox de RAC (Oracle11g R1編)#2 Tweet
VirtualBox de RAC (Oracle11g R1編)の続きです。
試していて気付いた問題点やハマった点が幾つかあったので備忘録として残しておきますね。
まず最初はCentOS5.5でのiscsidの問題。
この問題、iscsiデバイスを利用しているCentOS5.5をshutdown/rebootすると停止時に以下のようなメッセージを表示した後、いきなりHALTしてしまう。Openfiler側が起動しっぱなりしの場合は、大量のゾンビセッションが残ってしまい 気付かないと大変なことになってしまうという、なかなかスリリングな事象なのでご用心を。
私の場合、停止時のエラーメッセージに気付き、Openfiler側のセッションがゾンビだらけで驚いた!〜っていうとこで気付いた。
ググってみたら、これは、Red hat Linux/CentOS 5.5でのバグということが判明。
暫定的な対処方法はいつくかあるが、私の環境では、/etc/init.d/iscsiを書き換え、run level 0/1/6でなにもしないで抜ける部分をコメントアウトして対処した。
ちなみに、run level 0/1/6以外ならiscsiは正しく動作してます。以下、stop/startで正しくiscsiが実行されてLogout/Logonが成功している状態。
[root@discus164 ˜]# service iscsi stop
Logging out of session [sid: 1, target: iqn.2006-01.com.openfiler:asm1, portal: 192.168.2.92,3260]
Logging out of session [sid: 2, target: iqn.2006-01.com.openfiler:asm2, portal: 192.168.2.92,3260]
Logging out of session [sid: 3, target: iqn.2006-01.com.openfiler:asm4, portal: 192.168.2.92,3260]
Logging out of session [sid: 4, target: iqn.2006-01.com.openfiler:crs2, portal: 192.168.2.92,3260]
Logging out of session [sid: 5, target: iqn.2006-01.com.openfiler:asm3, portal: 192.168.2.92,3260]
Logging out of session [sid: 6, target: iqn.2006-01.com.openfiler:crs1, portal: 192.168.2.92,3260]
Logout of [sid: 1, target: iqn.2006-01.com.openfiler:asm1, portal: 192.168.2.92,3260]: successful
Logout of [sid: 2, target: iqn.2006-01.com.openfiler:asm2, portal: 192.168.2.92,3260]: successful
Logout of [sid: 3, target: iqn.2006-01.com.openfiler:asm4, portal: 192.168.2.92,3260]: successful
Logout of [sid: 4, target: iqn.2006-01.com.openfiler:crs2, portal: 192.168.2.92,3260]: successful
Logout of [sid: 5, target: iqn.2006-01.com.openfiler:asm3, portal: 192.168.2.92,3260]: successful
Logout of [sid: 6, target: iqn.2006-01.com.openfiler:crs1, portal: 192.168.2.92,3260]: successful
Stopping iSCSI daemon:
[root@discus164 ˜]# service iscsi start
iscsid が停止していますが PID ファイルが残っています
Starting iSCSI daemon: [ OK ]
[ OK ]
iSCSI ターゲットを設定中: Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm1, portal: 192.168.2.92,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm2, portal: 192.168.2.92,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm4, portal: 192.168.2.92,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:crs2, portal: 192.168.2.92,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:asm3, portal: 192.168.2.92,3260]
Logging in to [iface: default, target: iqn.2006-01.com.openfiler:crs1, portal: 192.168.2.92,3260]
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm1, portal: 192.168.2.92,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm2, portal: 192.168.2.92,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm4, portal: 192.168.2.92,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:crs2, portal: 192.168.2.92,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:asm3, portal: 192.168.2.92,3260]: successful
Login to [iface: default, target: iqn.2006-01.com.openfiler:crs1, portal: 192.168.2.92,3260]: successful
[ OK ]
[root@discus164 ˜]#
この場合はなんの問題もないわけです。が…
ところが、対処前のCentOS5.5では、shutdown/reboot時に以下のログが表示されLogoutできずOpenfiler側のセッションがゾンビ化する。
Unmounting pipe file systems: [ OK ]
connection2:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352437
connection2:0: detected conn error (1011)
connection1:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352439
connection1:0: detected conn error (1011)
connection4:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352449
connection4:0: detected conn error (1011)
connection3:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352463
connection3:0: detected conn error (1011)
connection5:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352472
connection5:0: detected conn error (1011)
connection6:0: ping timeout of 5 secs expired, recv timeout 5, last rx 4300342437, last ping 4300347437, now 4300352474
connection6:0: detected conn error (1011)
Unmounting file systems: [ OK ]
Halting system...
スクリーンショットは以下
前述の問題の対処として/etc/init.d/iscsiを修正する方法を選択した。diffは以下のとおり。
[root@discus164 ˜]# diff -u /etc/init.d/iscsi.org /etc/init.d/iscsi
--- /etc/init.d/iscsi.org 2010-03-31 22:26:39.000000000 +0900
+++ /etc/init.d/iscsi 2010-10-31 01:33:12.000000000 +0900
@@ -35,10 +35,10 @@
# If this is a final shutdown/halt, do nothing since
# lvm/dm, md, power path, etc do not always handle this
- if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
- success
- return
- fi
+ #if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
+ # success
+ # return
+ #fi
# don't turn off iscsi if root is possibly on a iscsi disk
rootopts=$(awk '{ if ($1 !˜ /^[ \t]*#/ && $2 == "/") { print $4; }}' /etc/mtab)
修正後は以下のとおり問題なくiscsiのセッションがlogoutされている ;)
参考:
Stray Penguin - Linux Memo (iSCSi) - シャットダウン/リブート時のSCSI cache エラー
Red Hat Bugzilla – Bug 583218
これまでのあらずじ
・Mac de Oracle - 10万円未満 de RAC (11g編)#28
・VirtualBox de RAC (Oracle11g R1編) #1
| 固定リンク | 0
コメント