安装MegaCli,查看linux服务器raid信息

1、下载安装包

下载地址:https://raw.githubusercontent.com/crazy-zhangcong/tools/master/MegaCli8.07.10.tar.gz

 

2、安装软件包

复制代码
[root@web-01_zw_119 install]# tar -zxf MegaCli8.07.10.tar.gz 
[root@web-01_zw_119 install]# tree MegaCli8.07.10
MegaCli8.07.10
├── Linux
│   ├── Lib_Utils-1.00-09.noarch.rpm   # 需要安装这两个 rpm 包
│   ├── MegaCli-8.02.21-1.noarch.rpm
│   ├── readme.txt
│   └── Run-Linux-PERC.sh
└── WINDOWS
    ├── MegaCli64.exe
    ├── MegaCli.exe
    ├── readme.txt
    ├── X64.bat
    └── X86.bat

[root@web-01_zw_119 install]# cd MegaCli8.07.10/Linux/
[root@web-01_zw_119 Linux]# rpm -ivh Lib_Utils-1.00-09.noarch.rpm
[root@web-01_zw_119 Linux]# rpm -ivh MegaCli-8.02.21-1.noarch.rpm
[root@web-01_zw_119 Linux]# ln -s /opt/MegaRAID/MegaCli/MegaCli64 /usr/local/bin/MegaCli 
[root@web-01_zw_119 Linux]# MegaCli -v
                                     

      MegaCLI SAS RAID Management Tool  Ver 8.02.21 Oct 21, 2011

    (c)Copyright 2011, LSI Corporation, All Rights Reserved.

Exit Code: 0x00


一、查看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 <<<< 这是正常的状态。Degraded 代表raid组有硬盘故障,raid组降级。

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 <<< Online 代表磁盘正常;若为 Failed 代表硬盘故障。
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/

raid卡的数据在硬盘上有一份,在raid卡中有一份,当逻辑有错误的时候,可以重新从硬盘把逻辑数据导入,这个时候会做一些检验和检查

raid卡的盘有4种基本状态。

Failed 基本无救,联系dell保修。

Online 正常装填。

Foreign 逻辑有错误,这个盘未识别,解决方法:从硬盘重新导入raid卡的逻辑数据。

Unconfigd 第一种情况就是这个盘没有配置在raid中,第二种情况就是逻辑有错误,这个盘未识别。解决方法:从硬盘重新导入raid卡的逻辑数据。第一种情况下,重新从硬盘导入逻辑数据也没办法,第二种情况下是可以的。

spans值 1,2,3,4做raid0,八块盘做raid1形成1、2、3、4

Drive’s position: DiskGroup: 0, Span: 0, Arm: 1

如果盘坏在不同的raid1上,就可以,如果坏在相同的raid1上数据就完了,所以最大可以坏4块盘。

PD值 0、1、2、3、4、5、6、7、

mt检测:

dmidecode |grep -i ser

MegaCli -pdlist -aall

MegaCli -pdlist -aall |grep ‘Firmware state’

MegaCli -LDInfo -Lall -aALL

MegaCli -h

MegaCli -CfgForeign -Import -aall

MegaCli -pdlist -aall |grep ‘Firmware state’

MegaCli -pdlist -aall

MegaCli -LdPdInfo -aALL

MegaCli -LdPdInfo -aALL|more

MegaCli -LdPdInfo -aALL >

vim aaaa

MegaCli -pdlist -aall

MegaCli -pdlist -aall |grep ‘Firmware state’

MegaCli -FwTermLog -Dsply -aALL

转载于:https://www.cnblogs.com/chenjw-note/p/10316197.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
包含如下操作系统版本 FreeBSD Linux Solaris Windows 分别对应如下目录 MegaCLI for DOS MegaCLI for Linux MegaCLI for Solaris MegaCLI for FreeBSD MegaCLI for Windows ********************************************* LSI Corp. MegaRAID MegaCLI Release ********************************************* Release Date: 01/20/14 ======================== Supported Controllers ================== MegaRAID SAS 9270-8i MegaRAID SAS 9271-4i MegaRAID SAS 9271-8i MegaRAID SAS 9271-8iCC MegaRAID SAS 9286-8e MegaRAID SAS 9286CV-8e MegaRAID SAS 9286CV-8eCC MegaRAID SAS 9265-8i MegaRAID SAS 9285-8e MegaRAID SAS 9240-4i MegaRAID SAS 9240-8i MegaRAID SAS 9260-4i MegaRAID SAS 9260CV-4i MegaRAID SAS 9260-8i MegaRAID SAS 9260CV-8i MegaRAID SAS 9260DE-8i MegaRAID SAS 9261-8i MegaRAID SAS 9280-4i4e MegaRAID SAS 9280-8e MegaRAID SAS 9280DE-8e MegaRAID SAS 9280-24i4e MegaRAID SAS 9280-16i4e MegaRAID SAS 9260-16i MegaRAID SAS 9266-4i MegaRAID SAS 9266-8i MegaRAID SAS 9285CV-8e MegaRAID SAS 8704ELP MegaRAID SAS 8704EM2 MegaRAID SAS 8708ELP MegaRAID SAS 8708EM2 MegaRAID SAS 8880EM2 MegaRAID SAS 8888ELP MegaRAID SAS 8308ELP* MegaRAID SAS 8344ELP* MegaRAID SAS 84016E* MegaRAID SAS 8408E* MegaRAID SAS 8480E* MegaRAID SATA 300-8ELP* *These older controllers should work but have not been tested. Component: ========= SAS MegaRAID MegaCLI Release Date: 01/20/14 Version Numbers: MegaCLI =============== =========== Current Version 8.07.14 Previous Version 8.07.07 Contents: ========= This package contains MegaCLI for the following OSes: DOS FreeBSD Linux Solaris Windows Use the MegaCLI components from the folder that matches your OS. Enhancements and Bug Fixes ========================== SCGCQ00393585 (DFCT) - VD creation from MegaCli fails on Solaris Sparc 10u9 operating system. SCGCQ00413883 (DFCT) - "megacli -version -pd -a0" Segmentation Faults if PDs are missing SCGCQ00445356 (CSET) - Megacli crashes after invoking any command in SGI system with one 9280-8e and 2 quad port qlogic FC cards. SCGCQ
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值