Linux环境Dell服务器查raid卡电池情况

执行

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

 

返回类似

Adapter 0: Get BBU Status Failed.

Exit Code: 0x01

那raid卡的BBU电池模块就有问题,或者就没电池。

返回类似

BBU status for Adapter: 0

BatteryType: BBU

Voltage: 3919 mV

Current: 0 mA

Temperature: 47 C

Battery State     : Operational

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 featurerequired  : No

  Module microcode updaterequired        : No

 

 

GasGuageStatus:

  Fully Discharged       : Yes

  Fully Charged          : Yes

  Discharging            : No

  Initialized            : No

  Remaining Time Alarm   : No

  Remaining Capacity Alarm: Yes

  Discharge Terminated   : No

  Over Temperature       : No

  Charging Terminated    : No

  Over Charged           : No

Relative State of Charge: 100 %

Charger Status: Complete

Remaining Capacity: 555 mAh

Full Charge Capacity: 555 mAh

isSOHGood: Yes

Exit Code: 0x00

新版本的 MegaCli-1.01.24-0.i386.rpm (下载地址:http://www.lsi.com/Pages/user/eula.aspx?file=http%3a%2f%2fwww.lsi.com%2fdownloads%2fPublic%2fMegaRAID%2520Common%2520Files%2f8.00.46_Linux_MegaCLI.zip&Source=http%3a%2f%2fblog.chinaunix.net%2fuid-28705339-id-3760426.html)该包会把程序安装在/opt下,当然也可以自定义安装目录,例如:rpm--relocate /opt/=/usr/sbin/ -i MegaCli-1.01.24-0.i386.rpm (即把安装目录 /opt 替换成/usr/sbin)。

(linux文件夹下有个MegaCli文件里面有I386RPM64位环境的话,是MegeCli64命令

相关命令及其解析: 

查看机器型号    # dmidecode | grep"Product" 

查看厂商    # dmidecode| grep "Manufacturer" 

查看序列号    # dmidecode | grep "Serial Number" 

查看CPU信息    # dmidecode | grep "CPU" 

查看CPU个数    # dmidecode | grep "Socket Designation: CPU" |wc –l 

查看出厂日期    # dmidecode | grep"Date" 

查看充电状态    # MegaCli -AdpBbuCmd-GetBbuStatus -aALL |grep "Charger Status" 

显示BBU状态信息    # MegaCli -AdpBbuCmd-GetBbuStatus –aALL 

显示BBU容量信息    # MegaCli -AdpBbuCmd-GetBbuCapacityInfo –aALL 

显示BBU设计参数    # MegaCli -AdpBbuCmd-GetBbuDesignInfo –aALL 

显示当前BBU属性    # MegaCli -AdpBbuCmd-GetBbuProperties –aALL 

查看充电进度百分比    # MegaCli -AdpBbuCmd-GetBbuStatus -aALL |grep "Relative State of Charge" 

查询Raid阵列数    # MegaCli -cfgdsply -aALL|grep "Number of DISK GROUPS:" 

显示Raid卡型号,Raid设置,Disk相关信息      # MegaCli-cfgdsply –aALL 

显示所有物理信息    # MegaCli -PDList-aALL 

显示所有逻辑磁盘组信息    # MegaCli -LDInfo -LALL–aAll 

查看物理磁盘重建进度(重要)    # MegaCli -PDRbld-ShowProg -PhysDrv [1:5] -a0 

查看适配器个数    #MegaCli –adpCount 

查看适配器时间    #MegaCli -AdpGetTime–aALL 

显示所有适配器信息    #MegaCli -AdpAllInfo–aAll 

查看Cache 策略设置    # MegaCli -cfgdsply -aALL|grep Polic

硬盘方面:

1、查看所有物理磁盘信息 

MegaCli -PDList-aALL

Adapter #0

Enclosure Number:1 

Slot Number: 5 

Device Id: 5 

Sequence Number:2 

Media Error Count:0 

Other Error Count:0 

Predictive FailureCount: 0 

Last PredictiveFailure Event Seq Number: 0 

Raw Size: 140014MB[0x11177328 Sectors] 

Non Coerced Size:139502MB [0x11077328 Sectors] 

Coerced Size:139392MB [0x11040000 Sectors] 

Firmware state:Hotspare 

SAS Address(0):0x5000c50008e5cca9 

SAS Address(1):0x0 

Inquiry Data:SEAGATE ST3146855SS     S5273LN4Y1X0 

..... 

2、查看磁盘缓存策略 

MegaCli -LDGetProp-Cache -L0 -a0

Adapter 0-VD 0:Cache Policy:WriteBack, ReadAheadNone, Direct 

or 

MegaCli -LDGetProp-Cache -L1 -a0

Adapter 0-VD 1:Cache Policy:WriteBack, ReadAheadNone, Direct 

or 

MegaCli -LDGetProp-Cache -LALL -a0

Adapter 0-VD 0:Cache Policy:WriteBack, ReadAheadNone, Direct 

Adapter 0-VD 1:Cache Policy:WriteBack, ReadAheadNone, Direct 

or 

MegaCli -LDGetProp-Cache -LALL -aALL

Adapter 0-VD 0:Cache Policy:WriteBack, ReadAheadNone, Direct 

Adapter 0-VD 1:Cache Policy:WriteBack, ReadAheadNone, Direct 

or 

MegaCli -LDGetProp-DskCache -LALL -aALL

Adapter 0-VD 0: DiskWrite Cache : Disk's Default 

Adapter 0-VD 1: DiskWrite Cache : Disk's Default 

3、设置磁盘缓存策略 

缓存策略解释: 

WT   (Write through 

WB   (Write back) 

NORA  (No readahead) 

RA   (Read ahead) 

ADRA  (Adaptiveread ahead) 

Cached 

Direct 

例子: 

MegaCli -LDSetPropWT|WB|NORA|RA|ADRA -L0 -a0 

or 

MegaCli -LDSetProp-Cached|-Direct -L0 -a0 

or 

enable / disabledisk cache 

MegaCli -LDSetProp-EnDskCache|-DisDskCache -L0 -a0 

4、创建/删除 阵列 

   4.1 创建一个 raid5 阵列,由物理盘 2,3,4 构成,该阵列的热备盘是物理盘

MegaCli -CfgLdAdd-r5 [1:2,1:3,1:4] WB Direct -Hsp[1:5] –a0 

   4.2 创建阵列,不指定热备 

MegaCli -CfgLdAdd-r5 [1:2,1:3,1:4] WB Direct –a0 

   4.3 删除阵列 

MegaCli -CfgLdDel-L1 –a0 

   4.4 在线添加磁盘 

MegaCli -LDRecon-Start -r5 -Add -PhysDrv[1:4] -L1 -a0 

意思是,重建逻辑磁盘组1raid级别是5,添加物理磁盘号:1:4。重建完后,新添加的物理磁盘会自动处于重建(同步)状态,这个 时候 fdisk -l是看不到阵列的空间变大的,只有在系统重启后才能看见。 

5、查看阵列初始化信息 

   5.1 阵列创建完后,会有一个初始化同步块的过程,可以看看其进度。 

MegaCli -LDInit-ShowProg -LALL -aALL 

或者以动态可视化文字界面显示 

MegaCli -LDInit-ProgDsply -LALL –aALL 

   5.2 查看阵列后台初始化进度 

MegaCli -LDBI-ShowProg -LALL -aALL 

或者以动态可视化文字界面显示 

MegaCli -LDBI-ProgDsply -LALL -aALL 

6、创建全局热备 

指定第 5 块盘作为全局热备 

MegaCli -PDHSP -Set[-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0 

也可以指定为某个阵列的专用热备 

MegaCli -PDHSP -Set[-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0 

7、删除全局热备 

MegaCli -PDHSP -Rmv-PhysDrv[1:5] -a0 

8、将某块物理盘下线/上线 

MegaCli -PDOffline-PhysDrv [1:4] -a0 

MegaCli -PDOnline-PhysDrv [1:4] -a0 

9、查看物理磁盘重建进度 

MegaCli -PDRbld-ShowProg -PhysDrv [1:5] -a0

 

PERC H700/800 

MegaRAID SAS 9260-8i/MegaRAID SAS 9260DE-8i

PERC 6/I

MegaRAID SAS 8888ELP

SAS6/ir

LSI SAS 1068E

PERC H200

LSI SAS 2008

 

你可能感兴趣的:(Linux)