码迷,mamicode.com
首页 > 其他好文 > 详细

megacli 查看Raid卡和硬盘信息

时间:2015-04-28 18:46:41      阅读:698      评论:0      收藏:0      [点我收藏+]

标签:megacli

megacli的安装

通过如下链接

http://down.51cto.com/data/2042596

或者

http://pan.baidu.com/s/1eQ2FeHc

下载至windows本地桌面,然后在linux命令行用命令:rz -be ,在弹出的窗口中选择刚才下载的压缩包(注意不要勾选已ASCII码方式传送文件

tar xf megacli-8.02.21-1-mdv2012.0.x86_64.rpm.tar
rpm -ivh megacli-8.02.21-1-mdv2012.0.x86_64.rpm

默认yum源木有,为了安装方便,可以手工添加到本地yum源,以后安装就可以执行如下命令:

yum install megacli -y (关于本地yum源的搭建,请移步本地yum源搭建)

一、查看Raid卡信息
megacli -LDInfo -Lall -aALL 

[root@ robin]# megacli -LDInfo -Lall -aALL
                                     
OSSpecificInitialize: Failed to load libsysfs.so.2.0.2 Please ensure that libsfs is present in the system.
The dependent library libsysfs.so.2.0.1 not available. Please contact LSI for distribution of the package

Adapter 0 -- Virtual Drive Information:
Virtual Drive: 0 (Target Id: 0)
Name                :
RAID Level          : Primary-1, Secondary-0, RAID Level Qualifier-0
Size                : 930.5 GB
Mirror Data         : 930.5 GB
State               : Optimal  <<<< 这是正常的状态。

Strip Size          : 64 KB
Number Of Drives per span:2  <<<< RAID组包含2块磁盘(但实际是4块500G的SSD做Raid10)。

Span Depth          : 2 <<<< 深度若是1,说明实际只是RAID 1。2表示可以是RAID 10

Default Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Current Cache Policy: WriteBack, ReadAdaptive, Direct, No Write Cache if Bad BBU
Default Access Policy: Read/Write
Current Access Policy: Read/Write
Disk Cache Policy   : Disk‘s Default
Ongoing Progresses:
  Background Initialization: Completed 41%, Taken 190 min.
Encryption Type     : None
Default Power Savings Policy: Controller Defined
Current Power Savings Policy: None
Can spin up in 1 minute: No
LD has drives that support T10 power conditions: No
LD‘s IO profile supports MAX power savings with cached writes: No
Bad Blocks Exist: No
Is VD Cached: No

备注:

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"         #代表Raid10


二、查看硬盘信息:
[root@ robin]# megacli -PDList -aALL

###有如下样式的几段,说明实际有几块硬盘(下面是一块500G的SSD的信息)

Enclosure Device ID: 32
Slot Number: 3
Drive‘s postion: DiskGroup: 0, Span: 1, Arm: 1
Enclosure position: 0
Device Id: 3
WWN: 50025388A0061518
Sequence Number: 2
Media Error Count: 0
Other Error Count: 0
Predictive Failure Count: 0
Last Predictive Failure Event Seq Number: 0
PD Type: SATA
Raw Size: 465.761 GB [0x3a386030 Sectors]
Non Coerced Size: 465.261 GB [0x3a286030 Sectors]
Coerced Size: 465.25 GB [0x3a280000 Sectors]
Firmware state: Online, Spun Up
Device Firmware Level: BB0Q
Shield Counter: 0
Successful diagnostics completion on :  N/A
SAS Address(0): 0x4433221107000000
Connected Port Number: 3(path0)
Inquiry Data: S1DHNSADA04008B     Samsung SSD 840 EVO 500GB               EXT0BB0Q
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: Solid State Device
Drive:  Not Certified
Drive Temperature :32C (89.60 F)
PI Eligibility:  No
Drive is formatted for PI information:  No
PI: No PI
Drive‘s write cache : Disabled
Drive‘s NCQ setting : Disabled
Port-0 :
Port status: Active
Port‘s Linkspeed: 6.0Gb/s
Drive has flagged a S.M.A.R.T alert : No


关于这个工具的更多的使用方法,请移步:

http://www.ttlsa.com/tools/megacli-tool-query-raid-status/

megacli 查看Raid卡和硬盘信息

标签:megacli

原文地址:http://tenderrain.blog.51cto.com/9202912/1639865

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!