跳转至

MegaSAS RAID卡管理程序 MegaCLI


2015-04-20 by dongnan

环境

操作系统: RHEL 6.2 amd64
服务器型号: Dell R410

Raid卡(Dell PERC 6i)

lspci | grep -i raid
01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 1078 (rev 04)

目标

RHEL 6.2系统安装 Raid卡管理程序。

步骤

MegaCLI 程序下载地址

file 8.00.48_Linux_MegaCLI.zip
8.00.48_Linux_MegaCLI.zip: Zip archive data, at least v1.0 to extract

安装程序

# 解压缩
unzip 8.00.48_Linux_MegaCLI.zip
unzip MegaCliLin.zip

# 安装RPM包
rpm -ivh Lib_Utils-1.00-09.noarch.rpm
rpm -ivh MegaCli-8.00.48-1.i386.rpm

# 安装路径
file /opt/MegaRAID/MegaCli/MegaCli64
/opt/MegaRAID/MegaCli/MegaCli64: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.4.0, stripped

示例

查看Raid状态

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -a0

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name:
RAID Level  : Primary-1, Secondary-3, RAID Level Qualifier-0
Size: 836.625 GB
State   : Optimal
Strip Size  : 1.0 MB
Number Of Drives per span:2
Span Depth  : 3
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy   : Read/Write
Disk Cache Policy   : Disk's Default
Ongoing Progresses:
  Background Initialization: Completed 77%, Taken 79 min.  # raid 正在初始化。
Encryption Type : None

# 或者 
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -aall

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name:
RAID Level  : Primary-1, Secondary-3, RAID Level Qualifier-0
Size: 836.625 GB
State   : Optimal
Strip Size  : 1.0 MB
Number Of Drives per span:2
Span Depth  : 3
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy   : Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type : None

Exit Code: 0x00

查看BBU状态

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 3776 mV
Current: -682 mA
Temperature: 24 C

BBU Firmware Status:

  Charging Status  : None
  Voltage : OK
  Temperature : OK
  Learn Cycle Requested      : Yes
  Learn Cycle Active  : Yes
  Learn Cycle Status  : OK
  Learn Cycle Timeout : No
  I2c Errors Detected : No
  Battery Pack Missing: No
  Battery Replacement required: No
  Remaining Capacity Low  : No
  Periodic Learn Required : No
  Transparent Learn   : No
  No space to cache offload   : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required: No

Battery state:

GasGuageStatus:
  Fully Discharged: No
  Fully Charged   : No
  Discharging : Yes
  Initialized : Yes
  Remaining Time Alarm: No
  Remaining Capacity Alarm: No
  Discharge Terminated: No
  Over Temperature: No
  Charging Terminated : No
  Over Charged: No

Relative State of Charge: 83 %
Charger Status: Off
Remaining Capacity: 340 mAh
Full Charge Capacity: 408 mAh
isSOHGood: No

Exit Code: 0x00

Raid 初始化完成后

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -aall
....
Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name:
RAID Level  : Primary-1, Secondary-3, RAID Level Qualifier-0
Size: 836.625 GB
State   : Optimal
Strip Size  : 1.0 MB
Number Of Drives per span:2
Span Depth  : 3
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy   : Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type : None

Exit Code: 0x00

BBU状态

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

BBU status for Adapter: 0
....
BatteryType: BBU
Voltage: 4023 mV
Current: 0 mA
Temperature: 24 C

BBU Firmware Status:

  Charging Status  : None
  Voltage : OK
  Temperature : OK
  Learn Cycle Requested      : No
  Learn Cycle Active  : No
  Learn Cycle Status  : OK
  Learn Cycle Timeout : No
  I2c Errors Detected : No
  Battery Pack Missing: No
  Battery Replacement required: No
  Remaining Capacity Low  : No
  Periodic Learn Required : No
  Transparent Learn   : No
  No space to cache offload   : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required: No

Battery state:

GasGuageStatus:
  Fully Discharged: No
  Fully Charged   : Yes
  Discharging : Yes
  Initialized : Yes
  Remaining Time Alarm: No
  Remaining Capacity Alarm: No
  Discharge Terminated: No
  Over Temperature: No
  Charging Terminated : Yes
  Over Charged: No

Relative State of Charge: 99 %
Charger Status: Complete
Remaining Capacity: 483 mAh
Full Charge Capacity: 489 mAh
isSOHGood: Yes

Exit Code: 0x00

设置BBU Learn

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL

BBU Properties for Adapter: 0

Auto Learn Period: 7776000 Sec
Next Learn time: 470946851 Sec
Learn Delay Interval:0 Hours
Auto-Learn Mode: Enabled

Exit Code: 0x00

强制 Raid Learn Cycle

Raid卡状态

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -a0

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name:
RAID Level  : Primary-1, Secondary-3, RAID Level Qualifier-0
Size: 836.625 GB
State   : Optimal
Strip Size  : 1.0 MB
Number Of Drives per span:2
Span Depth  : 3
Default Cache Policy: WriteBack, ReadAheadNone, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteThrough, ReadAheadNone, Direct, No Write Cache if Bad BBU
Access Policy   : Read/Write
Disk Cache Policy   : Disk's Default
Encryption Type : None

Exit Code: 0x00

BBU状态

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 3997 mV
Current: 0 mA
Temperature: 23 C

BBU Firmware Status:

  Charging Status  : None
  Voltage : OK
  Temperature : OK
  Learn Cycle Requested      : No
  Learn Cycle Active  : No
  Learn Cycle Status  : OK
  Learn Cycle Timeout : No
  I2c Errors Detected : No
  Battery Pack Missing: No
  Battery Replacement required: No
  Remaining Capacity Low  : No
  Periodic Learn Required : No
  Transparent Learn   : No
  No space to cache offload   : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required: No

Battery state:

GasGuageStatus:
  Fully Discharged: No
  Fully Charged   : No
 Discharging : Yes
  Initialized : Yes
  Remaining Time Alarm: No
  Remaining Capacity Alarm: No
  Discharge Terminated: No
  Over Temperature: No
  Charging Terminated : No
  Over Charged: No

Relative State of Charge: 91 %
Charger Status: Complete
Remaining Capacity: 423 mAh
Full Charge Capacity: 464 mAh
isSOHGood: No

Exit Code: 0x00

注意,isSOHGood: No 字段。

Learn Cycle

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -BbuLearn -aALL

Adapter 0: BBU Learn Succeeded.

Exit Code: 0x00

2小时:Relative State of Charge: 19 %

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 3940 mV
Current: 584 mA
Temperature: 23 C

BBU Firmware Status:

 Charging Status  : Charging
  Voltage : OK
  Temperature : OK
  Learn Cycle Requested      : No
  Learn Cycle Active  : No
  Learn Cycle Status  : OK
  Learn Cycle Timeout : No
  I2c Errors Detected : No
  Battery Pack Missing: No
  Battery Replacement required: No
  Remaining Capacity Low  : Yes
  Periodic Learn Required : No
  Transparent Learn   : No
  No space to cache offload   : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required: No

Battery state:

GasGuageStatus:
  Fully Discharged: No
  Fully Charged   : No
  Discharging : No
  Initialized : Yes
  Remaining Time Alarm: No
  Remaining Capacity Alarm: Yes
  Discharge Terminated: No
  Over Temperature: No
  Charging Terminated : No
  Over Charged: No

Relative State of Charge: 19 %
Charger Status: In Progress
Remaining Capacity: 105 mAh
Full Charge Capacity: 556 mAh
isSOHGood: Yes

Exit Code: 0x00

完成后

# 执行命令
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

BBU status for Adapter: 0

BatteryType: BBU
Voltage: 3996 mV
Current: 0 mA
Temperature: 22 C

BBU Firmware Status:

  Charging Status  : None
  Voltage : OK
  Temperature : OK
  Learn Cycle Requested      : No
  Learn Cycle Active  : No
  Learn Cycle Status  : OK
  Learn Cycle Timeout : No
  I2c Errors Detected : No
  Battery Pack Missing: No
  Battery Replacement required: No
  Remaining Capacity Low  : No
  Periodic Learn Required : No
  Transparent Learn   : No
  No space to cache offload   : No
  Pack is about to fail & should be replaced : No
  Cache Offload premium feature required  : No
  Module microcode update required: No

Battery state:

GasGuageStatus:
  Fully Discharged: No
  Fully Charged   : No
  Discharging : Yes
  Initialized : Yes
  Remaining Time Alarm: No
  Remaining Capacity Alarm: No
  Discharge Terminated: No
  Over Temperature: No
  Charging Terminated : No
  Over Charged: No

Relative State of Charge: 94 %
Charger Status: Complete
Remaining Capacity: 520 mAh
Full Charge Capacity: 556 mAh
isSOHGood: Yes

Exit Code: 0x00

注意,isSOHGood: Yes 字段。

参考

回到页面顶部