2010/08/02

標準構成のPowerEdge R200でIPMI Serial Over LAN

このエントリーをブックマークに追加 このエントリーを含むはてなブックマーク
遠隔地でシリアルコンソールを使う

遠隔地でBIOSをいじる


何のオプションもつけていない素のdell PowerEdge R200で
Serial Over LANできたのでメモしておきます。
dellの1Uサーバで最も安いPowerEdge R200は
dellがキャンペーンをやっているときに買えばかなり安いし
quadコアxeon,メモリ8Gまでのせられるのでwebサーバ用なら十分かと。
DRACカード(サーバ全部につけたら結構な金額になってしまう)
を付けないとIPMI Serial Over LANできないらしいという雰囲気だったが、
がんばってみたら動いたので設定などをさらしておきます。

環境はCentos5.5 64bit

DELL OMSA(OpenManage Server Administrator)を導入する
#リポジトリの追加
sudo su -
wget -q -O - http://linux.dell.com/repo/hardware/latest/bootstrap.cgi | bash

#インストール
yum install srvadmin-all

service instsvcdrv start
service dsm_sa_ipmi start
service dsm_om_connsvc start
service dsm_om_shrsvc start
service dataeng start

chkconfig --add instsvcdrv
chkconfig --add dsm_sa_ipmi
chkconfig --add dsm_om_connsvc
chkconfig --add dsm_om_shrsvc
chkconfig --add dataeng
chkconfig --add dsm_bmu_solproxy32

chkconfig instsvcdrv on
chkconfig dsm_sa_ipmi on
chkconfig dsm_om_connsvc on
chkconfig dsm_om_shrsvc on
chkconfig dsm_bmu_solproxy32 on
chkconfig dataeng on



このままでは再起動したときに全部が動かなかったので
再起動して100秒たったらデーモンを再起動するようにして回避した
以下を作成する
vim /root/omsa.sh
#!/bin/sh
sleep 100
/sbin/service instsvcdrv stop
/sbin/service dsm_sa_ipmi stop
/sbin/service dsm_om_connsvc stop
/sbin/service dsm_om_shrsvc stop
/sbin/service dataeng stop

/sbin/service instsvcdrv start
/sbin/service dsm_sa_ipmi start
/sbin/service dsm_om_connsvc start
/sbin/service dsm_om_shrsvc start
/sbin/service dataeng start

chmod a+x /root/omsa.sh

vim /etc/cron.d/omsa
-----------------------------------------
@reboot root /root/omsa.sh > /dev/null
-----------------------------------------


再起動してチェックする


https://サーバアドレス:1311/にアクセスしてrootでログインします。
※デフォルトではSSLで接続してポート1311です。

遠隔地からログインしたい場合は
自分のマシンの~/.ssh/configに
Host proxy
HostName 同じサブネットのサーバのグローバルIP
DynamicForward 1080
User sshユーザ名

と書いておいて
masa-thinkpad% ssh proxy

して以下の設定をすればよい。
クライアントマシンがwindows環境の場合はportfowarderに上のconfigファイルを食わせればよい。

次にfirefoxを以下のように設定

https://サーバアドレスのローカルIP:1311/

でfirefoxでつながります。

早速ブラウザでつないでみると、
user名とパスワードを聞かれるので
root rootのパスワードをいれる。


ストレージ>SAS 6/iR Integrated(RAIDコントローラ)で警告がでている。
masterdbサーバだけはraidカードをdellから買った。
しかし、ドライバが古すぎるようだ。
このままでも基本機能は使えるしアップデートするとカーネルアップデートのたびに
毎回手作業で組み込まなければいけないのでRAIDコントローラドライバのアップデートは問題がおきるまでしない方針とした


IPMI Serial Over LAN を設定する
リモートアクセス設定ユーティリティ(起動時にBIOS画面でctrl+e)か
https://サーバアドレス:1311/から
IPMI Over LANのリモートアクセス用のIPアドレスを設定
IPMI Over LANのリモートアクセス用のIPアドレスはサーバのIPと同じにしてはいけない。(以下の対応表参照)
IPMI Over LANをONに設定




サーバの対応表
一番右がIPMI Over LANのリモートアクセス用のIPアドレス。ただしこのIPにpingをうっても反応はない。真ん中がリアルIPアドレス。
example-lvs 192.168.1.1 192.168.1.101
example-masterdb 192.168.1.2 192.168.1.102
example-slavedb 192.168.1.3 192.168.1.103
example-web2 192.168.1.4 192.168.1.104
example-web1 192.168.1.5 192.168.1.105
example-lvs2 192.168.1.10 192.168.1.110




BIOS画面でF2か
https://サーバアドレス:1311/
から入って Serial を BMC NIC にする
Serial Port を Serial 1 にし、 19200を指定




yum install osabmcutil9g



serial consoleの設定をする
vim /etc/inittab
co:2345:respawn:/sbin/agetty -h 19200 ttyS0 vt100

init q



rootでシリアルログインできるようにする
vim /etc/securetty
以下を追記する
ttyS0


ブート中のカーネルメッセージをみる場合
vim /etc/grub.conf
default=0
timeout=5
serial --unit=0 --speed=19200 --word=8 --parity=no --stop=1←追加
terminal --timeout=5 console serial←追加
#splashimage=(hd0,2)/grub/splash.xpm.gz←コメントアウト
hiddenmenu
title CentOS (2.6.18-194.8.1.el5)
root (hd0,2)
kernel /vmlinuz-2.6.18-194.8.1.el5 ro root=/dev/VolGroup00/LogVol00 console=tty0 console=ttyS0,19200n8←console=tty0 console=ttyS0,19200n8追加
initrd /initrd-2.6.18-194.8.1.el5.img


いったんリブートする
reboot


######## IPMI Over LANの使い方 ##########
どこのサーバでもいいので
とりあえずexample-lvsサーバで
telnet localhost 623
------------------以下出力-------------------------------
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.


Powered by Avocent
BMC Management Utility - SOLProxy v4.2 Release 1
Copyright 2009 - Avocent Corporation(http://www.avocent.com/dell/bmu/ng)


No connection

1:Connect to the Remote Server's BMC
2:Configure the Serial-Over-LAN for the Remote Server
3:Activate Console Redirection
4:Reboot and Activate Console Redirection
5:Help
6:Exit

Please select the item(press 1, 2, 3, 4, 5, 6):
-------------------------------------------------------------
ここで1を選ぶ
---------------以下出力-------------------------------------
Server Address:192.168.1.102 ←リモートアクセス用のIP(example-masterdbにつなぐ場合)
Username:root
Password:calvin←dellのデフォルトパスワード(変更しておくのが望ましい)
Key: ←空でenter

SOLProxy Status:Connected.



Powered by Avocent
BMC Management Utility - SOLProxy v4.2 Release 1
Copyright 2009 - Avocent Corporation(http://www.avocent.com/dell/bmu/ng)


Current connection:192.168.1.102:root←example-masterdbサーバに入った

1:Connect to the Remote Server's BMC
2:Configure the Serial-Over-LAN for the Remote Server
3:Activate Console Redirection
4:Reboot and Activate Console Redirection
5:Help
6:Exit

Please select the item(press 1, 2, 3, 4, 5, 6):
------------------------------------------------------------
3を選ぶ
サーバをリブートしたければここで4を選択する
--------------------以下出力--------------------------------
Activating remote console now.
Remote console is now active and ready for user input.
------------------------------------------------------------
enterキーを押す
--------------------以下出力--------------------------------

login:root
Password: ←example-masterdbのrootパスワード
[07-07 14:51:44 root@example-masterdb /root] ←シリアルログイン成功
------------------------------------------------------------


# IPMI Over LAN接続を切る
ctrl-d か exitコマンド でログアウトしたあと
ctrl+] を入力(だめなら~.をタイプする)

関連する記事

0 コメント:

関連記事