R710

image.png

image.png
image.png
image.png
image.png

image.png
image.png

MegaCli 简单介绍

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

它一款用于管理维护硬件RAID软件,可以查看当前raid卡的所有信息:raid卡的型号,raid的阵列类型,raid 的磁盘状态;
可以对raid进行管理:在线添加磁盘,创建磁盘阵列、删除阵列等。

磁盘状态

Unconfigured Good :未配置好。 RAID控制器可访问的驱动器,但未配置为虚拟驱动器或热备分
Online:在线
Rebuild :重建。写入数据的驱动器,以恢复虚拟驱动器的完全冗余
Failed :失败
Unconfigured Bad:未配置的坏-驱动器上的固件检测不可恢复的错误;驱动器无法初始化Unconfigured Good或驱动器
Missing:失踪。在线驱动,但已从其位置移除
Offline:脱机-驱动器是虚拟驱动器的一部分,但在RAID中具有无效数据或未配置。
Hot Spare:热备份
None:具有不支持标志集的驱动器。具有未配置的良好或离线驱动器,完成了搬迁作业的准备工作。

RAID 级别对应关系

RAID Level : Primary-1, Secondary-0, RAID Level Qualifier-0 RAID 1

RAID Level : Primary-0, Secondary-0, RAID Level Qualifier-0 RAID 0

RAID Level : Primary-5, Secondary-0, RAID Level Qualifier-3 RAID 5

RAID Level : Primary-1, Secondary-3, RAID Level Qualifier-0 RAID 10

安装 MegaRAID

【1】下载安装包

wget ftp://download2.boulder.ibm.com/ecc/sar/CMA/XSA/ibm_utl_sraidmr_megacli-8.00.48_linux_32-64.zip

【2】 安装

 unzip ibm_utl_sraidmr_megacli-8.00.48_linux_32-64.zip

 cd linux

yum localinstall Lib_Utils-1.00-09.noarch.rpm  MegaCli-8.00.48-1.i386.rpm

常见参数

一般通过 MegaCli 的Media Error Count 、Other Error Count、Predictive Failure Count来确定阵列中磁盘是否有问题

Slot Number:slot号,应该跟机器外观上的标识一致。(磁盘位置)

Inquiry Data: 磁盘的序列号,跟磁盘标签上一致。(磁盘标签需要拔盘才能看到)

Firmware state: 这磁盘的状态,Online是最好的状态,除此之外还有 Unconfigured Offline Failed

Medai Error Count 不为0,表示磁盘可能错误,可能是磁盘有坏道,数值越大,危险系数越高

Other Error Count 不为0,表示磁盘可能存在松动,可能需要重新再插入

Predictive Failure Count:表示监控硬盘的预报错误数量,不为0要更换

Last Predictive Failure Event Seq Number:最后一条预警的时间序列号

Raw Size:磁盘大小

Firmware state:磁盘目前的状态。

MegaCli常用命令
【1】查raid级别
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL



Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 00
RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
Size                : 1.818 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 3
Span Depth          : 1
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   : Enabled
Encryption Type     : None


Number of Dedicated Hot Spares: 1
    0 : EnclId - 32 SlotId - 3

Exit Code: 0x00

MegaCli64 -LdPdInfo -aALL 级别和磁盘
MegaCli64 -PDList -aALL


Adapter #0

Number of Virtual Disks: 1
Virtual Drive: 0 (Target Id: 0)
Name                :Virtual Disk 00
RAID Level          : Primary-5, Secondary-0, RAID Level Qualifier-3
Size                : 1.818 TB
State               : Optimal
Strip Size          : 64 KB
Number Of Drives    : 3
Span Depth          : 1
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   : Enabled
Encryption Type     : None
Number of Spans: 1
Span: 0 - Number of PDs: 3

PD: 0 Information
Enclosure Device ID: 32
Slot Number: 0
Enclosure position: 0
Device Id: 0
Sequence Number: 2
Media Error Count: 0
Other Error Count: 13
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Firmware state: Online, Spun Up
SAS Address(0): 0x1221000000000000
Connected Port Number: 0(path0)
Inquiry Data:             Z9AE3WLXST1000DM010-2EP102                      CC43
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature : N/A




PD: 1 Information
Enclosure Device ID: 32
Slot Number: 1
Enclosure position: 0
Device Id: 1
Sequence Number: 2
Media Error Count: 0
Other Error Count: 13
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Firmware state: Online, Spun Up
SAS Address(0): 0x1221000001000000
Connected Port Number: 1(path0)
Inquiry Data:             Z9AE3WRXST1000DM010-2EP102                      CC43
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature : N/A




PD: 2 Information
Enclosure Device ID: 32
Slot Number: 2
Enclosure position: 0
Device Id: 2
Sequence Number: 2
Media Error Count: 0
Other Error Count: 13
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 931.512 GB [0x74706db0 Sectors]
Non Coerced Size: 931.012 GB [0x74606db0 Sectors]
Coerced Size: 931.0 GB [0x74600000 Sectors]
Firmware state: Online, Spun Up
SAS Address(0): 0x1221000002000000
Connected Port Number: 2(path0)
Inquiry Data:             Z9AE1RN0ST1000DM010-2EP102                      CC43
FDE Capable: Not Capable
FDE Enable: Disable
Secured: Unsecured
Locked: Unlocked
Needs EKM Attention: No
Foreign State: None
Device Speed: Unknown
Link Speed: Unknown
Media Type: Hard Disk Device
Drive Temperature : N/A




Exit Code: 0x00

相关参数

Enclosure Device过滤出raid卡的ID;
Slot Number过滤出磁盘的槽号;
Raw Size过滤出磁盘的大小;
Inquiry Data 过滤出磁盘的序列号、型号固件版本;
Firmware state过滤出磁盘的状态



Adapter 0-- Virtual Drive Information:

VirtualDrive: 0 (Target Id: 0)   ----设备VD号

Name                :

RAIDLevel          : Primary-5, Secondary-0,RAID Level Qualifier-3  ----raid级别

Size                : 7.276 TB   -----逻辑磁盘大小

State               : Optimal   -----状态:最佳

StripSize          : 256 KB   -----簇的大小

Number OfDrives    : 3  

SpanDepth          : 1

DefaultCache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU   ----默认缓存策略

CurrentCache Policy: WriteThrough, ReadAhead, Direct, No Write Cache if Bad BBU  -----当前缓存策略

AccessPolicy       : Read/Write    -----存取策略

DiskCache Policy   : Disk's Default    -----磁盘缓存策略

EncryptionType     : None

BadBlocks Exist: No

 

RAID Level对应关系:RAID级别一般通过 Primary 字段值来判断

还需要结合Span Depth的值来判断值为1表示为 RAID-1,不为1表示 RAID-10; 还有一种情况:Primary-1, Secondary-3, RAID LevelQualifier-0 也是表示 RAID-10;

RAIDLevel : Primary-0, Secondary-0, RAID Level Qualifier-0    对应RAID 0

RAIDLevel : Primary-1, Secondary-0, RAID Level Qualifier-0    对应RAID 1

RAIDLevel : Primary-5, Secondary-0, RAID Level Qualifier-3    对应RAID 5

RAIDLevel : Primary-1, Secondary-3, RAID Level Qualifier-0    对应RAID 10

【2】查raid卡信息
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL

【3】查看硬盘信息
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL
MegaCli64 -PDList -aALL

【4】查看raid卡日志
/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL

【5】显示Raid卡型号,Raid设置,Disk相关信息
/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL

【6】显示所有逻辑磁盘组信息
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll

1.查看RAID控制器的数量:-----raid卡管理要用到

MegaCli64 -adpCount

图中看出RAID控制器的数量为1

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 158,425评论 4 361
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 67,058评论 1 291
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 108,186评论 0 243
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 43,848评论 0 204
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 52,249评论 3 286
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 40,554评论 1 216
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 31,830评论 2 312
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 30,536评论 0 197
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 34,239评论 1 241
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 30,505评论 2 244
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 32,004评论 1 258
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 28,346评论 2 253
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 32,999评论 3 235
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 26,060评论 0 8
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 26,821评论 0 194
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 35,574评论 2 271
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 35,480评论 2 267

推荐阅读更多精彩内容