Ibm服务器raid卡通过linux进行管理

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/firehadoop/article/details/84038016

     有几台ibm-x3550服务器使用了ServeRAID M1115系列阵列卡,配置或查看阵列信息以前都是通过开机选择阵列卡管理程序完成,无法直接通过linux的命令行实现对阵列卡信息的管理,无法有效发现阵列中磁盘的的信息。

1、查看服务器阵列卡基本信息

cat /proc/scsi/scsi

2、MegaCli在linux系统下的Raid管理命令行工具

MegaCli 是LSI公司官方提供的SCSI卡管理工具,由于LSI被收购变成了现在的Broadcom,所以现在想下载MegaCli,需要去Broadcom官网查找Legacy产品支持,搜索MegaRAID即可。

3、下载MegaCli软件

wget http://delivery04.dhe.ibm.com/sar/CMA/XSA/ibm_utl_sraidmr_megacli-8.02.21_linux_32-64.zip

4、解压安装MegaCli

unzip ibm_utl_sraidmr_megacli-8.02.21_linux_32-64.zip 

rpm -ivh Lib_Utils-1.00-09.noarch.rpm 
rpm -ivh MegaCli-8.02.21-1.noarch.rpm 

安装完成后系统自动装到/opt/MegaRAID/MegaCli目录下

5、查看Adapter 信息:

./MegaCli64 -AdpAllInfo -aALL
MegaCli64很多命令都要在最后用-a指定Adapter,我只有Adapter #0 所以今后都写-a0就行,还可以-a0,1,2或-aALL

 

6、查看阵列卡具体业务配置

./MegaCli64 -CfgDsply -aALL

输出信息显示有一个磁盘组,2块物理磁盘,做了raid1,磁盘组的容量为300G,磁盘类型为SAS磁盘

Encryption Type     : None
Is VD Cached: No
Physical Disk Information:
Physical Disk: 0--------------------第一块物理磁盘信息
Enclosure Device ID: 64
Slot Number: 0
Drive's postion: DiskGroup: 0, Span: 0, Arm: 0
Enclosure position: 0
Device Id: 9
WWN: 5000039478307F7D
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 6
Last Predictive Failure Event Seq Number: 108493
PD Type: SAS
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SC27
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x5000039478307f7e
SAS Address(1): 0x0
Connected Port Number: 1(path0) 
Inquiry Data: IBM-ESXSMK3001GRRB      SC27Z2N08G92SC27SC27SC27
IBM FRU/CRU: 81Y9671     
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive Temperature :28C (82.40 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : Yes

Physical Disk: 1----------第二块物理磁盘
Enclosure Device ID: 64
Slot Number: 1
Drive's postion: DiskGroup: 0, Span: 0, Arm: 1
Enclosure position: 0
Device Id: 11
WWN: 500003947830A5B9
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SAS
Raw Size: 279.396 GB [0x22ecb25c Sectors]
Non Coerced Size: 278.896 GB [0x22dcb25c Sectors]
Coerced Size: 278.464 GB [0x22cee000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: SC27
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x500003947830a5ba
SAS Address(1): 0x0
Connected Port Number: 0(path0) 
Inquiry Data: IBM-ESXSMK3001GRRB      SC27Z2N0BF92SC27SC27SC27
IBM FRU/CRU: 81Y9671     
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None 
Device Speed: 6.0Gb/s 
Link Speed: 6.0Gb/s 
Media Type: Hard Disk Device
Drive Temperature :28C (82.40 F)
PI Eligibility:  No 
Drive is formatted for PI information:  No
PI: No PI
Drive's write cache : Disabled
Port-0 :
Port status: Active
Port's Linkspeed: 6.0Gb/s 
Port-1 :
Port status: Active
Port's Linkspeed: Unknown 
Drive has flagged a S.M.A.R.T alert : No


Exit Code: 0x00

 7、查看每块物理盘的信息和状态,跟前面一样

./MegaCli64 -PDList -a0

 8、如何查找磁盘故障

a、 ./MegaCli64 -PDList -a0 | grep Failure 

Predictive Failure中已经涵盖media error,而且比media error的范围更广、更全面。

b、./MegaCli64 -PDList -a0 | grep Firmware

磁盘的状态,Online是我们期望看到的最好状态,除此之外还有 Unconfigured Offline Failed等等,除了online之外的状态均表示磁盘退出服务,需要更换,这个标准没有a标准严格,有可能a已经报错但磁盘还没有退服,但是数据已经不能同步会丢失,只有一块盘可用了。

c、查看阵列中有那块盘已经退服

./MegaCli64 -pdgetmissing -a0

d、查看磁阵运行状态

 ./MegaCli64  -LDInfo -L0 -a0

e、查看raid卡支持的插槽信息

./MegaCli64 -EncInfo -a0

9、查看阵列日志

a、查看固件日志

./MegaCli64 -FwTermLog dsply -a0

 

 b、查看全部日志信息

./MegaCli64  -AdpAliLog -a0 > alllog.txt

最后在给出一个关于MegaCli的操作手册下载链接地址:

https://docs.broadcom.com/docs-and-downloads/advanced-software/advanced-software-common-files/MegaRAIDSAS_VMware_UserGuide_RevB_51530-00.pdf

猜你喜欢

转载自blog.csdn.net/firehadoop/article/details/84038016
今日推荐