ipmitool SOL(Serial Over LAN) 사용하기.

IPMI(Intellient Platform Management Interface) SOL 사용하기.

대상 서버: NEC Express5800/E120d-M
IPMI ip address: 10.17.123.212

참고문서: http://pic.dhe.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai.ipmi%2Fliaaiipmitoolsol.htm

IPMI는 표준화된 메시지기반의 하드웨어 관리 인터페이스이다. BMC(Baseboard Management Controller)또는 MC(Management Controller)로 알려진 하드웨어 칩은 IPMI의 core를 구현한다.

ipmitool 은 ipmi 를 지원하는 장치의 구성, 모니터링, 관리를 가능하게 하는 유틸리티다.

이 글의 주 목적은 ipmitool을 사용하여 원격지에서 대상 서버의 serial console에 접속하는 것이다.

서버의 ipmi 버전을 확인하기 위해 아래 커맨드를 사용한다.

# ipmitool mc info
Device ID : 131
Device Revision : 1
Firmware Revision : 1.3
IPMI Version : 2.0
Manufacturer ID : 119
Manufacturer Name : NEC
Product ID : 1522 (0x05f2)
Product Name : Unknown (0x5F2)
Device Available : yes
Provides Device SDRs : no
Additional Device Support :
Sensor Device
SDR Repository Device
SEL Device
FRU Inventory Device
IPMB Event Receiver
Chassis Device
Aux Firmware Rev Info :
0x00
0x30
0xff
0xff

channel 정보 확인

# ipmitool channel info 2
Channel 0x2 info:
Channel Medium Type : 802.3 LAN
Channel Protocol Type : IPMB-1.0
Session Support : multi-session
Active Session Count : 0
Protocol Vendor ID : 7154
Volatile(active) Settings
Alerting : enabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available
Non-Volatile Settings
Alerting : enabled
Per-message Auth : enabled
User Level Auth : enabled
Access Mode : always available

1. IPMI-Based Serial Over LAN(IPMI SOL)

ipmi mc info 커맨드로 ipmi 버전을 확인한다. 1.5라면, 2.0으로 ipmi 펌웨어를 업그레이드 해야한다.

1.1 BIOS 설정(F2)
Advanced -> Serial Port Configuration -> Consol Redirection Setting
server_bios_1   server_bios_2

1.2 . IPMI 설정(F4) : IPMI ip address 와 사용자 계정, Role을 설정한다.
Keyboard-> English
Offline Tool Menu -> BMC Configuration -> Network

nec_ipmi_1

Offline Tool Menu -> BMC Configuration -> User Account

nec_ipmi_2

2. sol을 사용하기 위한 설정.(centos 6.5 기준, ipmitool 이 설치된 os 설정)

2.1 grub.conf 수정
아래에서, 115200n8은 1.1에서 설정한 serial port관련 설정이다. 속도와 parity bit, 등의 사항을 맞추어주면 된다.

kernel /boot/vmlinuz-2.6.32-431.3.1.el6.x86_64 ro root=UUID=f7157c76-12c8-4f83-a9d3-8a01fc3d7508 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM console=tty0 console=ttyS1,115200n8
initrd /boot/initramfs-2.6.32-431.3.1.el6.x86_64.img

2.2 /etc/securetty 에 아래 내용을 추가한다.

ttyS1

2.3 접속 확인
아래 커맨드로 접속이 되는지 확인해 본다. -e 옵션 뒤에 #은 escape 문자다. 접속후, #?를 누르면 아래와 같은 도움말이 나온다. sol 접속을 끝내기 위해서는 , #. 을 입력한다.  -I 는 인터페이스로, open, lan, lanplus 세가지가 지원된다. -H 옵션 뒤에는 호스트네임 또는 IP 주소가 온다.  -U 뒤에는 1.2  에서 설정한 사용자 계정을 적는다.  -a 옵션은 비밀번호를 물어보도록 하는 옵션이며 이 옵션 대신 -P ‘password’를 사용하면 비밀번호를 묻는 프롬프트가 나오지 않는다.

# ipmitool -e\#. -I lanplus -H 10.17.123.212 -U snowfox -a sol activate
Password:
[SOL Session operational. Use #? for help]
#?
Supported escape sequences:
#. - terminate connection
#^Z - suspend ipmitool
#^X - suspend ipmitool, but don't restore tty on restart
#B - send break
#? - this message
## - send the escape character by typing it twice
(Note that escapes are only recognized immediately after newline.)
#. [terminated ipmitool]
#

정상적이라면, 1번에서 처럼, 대상 서버의 부팅 화면을 볼 수 있다.

3. 기타 ipmi 관련 명령어.

서버 켜고 끄기.

# ipmitool -I lanplus -H 10.17.123.212 -U snowfox -a power status
Password:
Chassis Power is off
# ipmitool -I lanplus -H 10.17.123.212 -U snowfox -a power on
Password:
Chassis Power Control: Up/On
# ipmitool -I lanplus -H 10.17.123.212 -U snowfox -a power status
Password:
Chassis Power is on
# ipmitool -I lanplus -H 10.17.123.212 -U snowfox -a power off
Password:
Chassis Power Control: Down/Off

온도 체크

# ipmitool -I lanplus -H 10.17.123.212 -U snowfox -a sdr list | grep -i temp

 

주의)
ipmi 디바이스가 없을때 아래와 같은 오류 발생. kernel에 관련 모듈을 loading해 주면 해결됨.

# ipmitool sol info 1
Could not open device at /dev/ipmi0 or /dev/ipmi/0 or /dev/ipmidev/0: No such file or directory

# ls -al /dev/ipmi*
ls: cannot access /dev/ipmi*: 그런 파일이나 디렉터리가 없습니다
# modprobe ipmi_msghandler
FATAL: Module ipmi_msghandler not found.
# modprobe ipmi_devintf
# modprobe ipmi_si
FATAL: Module ipmi_si not found.
# ls -al /dev/ipmi*
crw-rw---- 1 root root 245, 0 2014-02-03 01:12 /dev/ipmi0
# sync;

답글 남기기

Your email address will not be published.