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

安装MegaCli,查看linux服务器raid信息的更多相关文章

  1. 查看Linux服务器各种信息方法

    有的时候需要搜集服务器的各种信息,比如cpu信息,内存信息,linux版本信息,安装的各种软件信息等等.下面总结几种主要指标的查看方法. 1. 查看Linux发行版信息 [root@pcmweb ~] ...

  2. Megacli查看Dell服务器Raid状态

    通常我们使用的DELL/HP/IBM三家的机架式PC级服务器阵列卡是从LSI的卡OEM出来的,DELL和IBM两家的阵列卡原生程度较高,没有做太多封装,可以用原厂提供的阵列卡管理工具进行监控:而HP的 ...

  3. 查看linux服务器内存信息

    查看服务器内存信息 dmidecode|grep -P -A5 "Memory\s+Device"|grep Size [root@localhost home]# dmideco ...

  4. 使用 dmidecode 查看Linux服务器信息

    使用 dmidecode 查看Linux服务器信息 来源  http://www.laozuo.org/6682.html 对于大部分普通服务器用户来说,我们选择VPS.服务器产品的时候比较关心的是产 ...

  5. Linux 服务器的网络配置 - 2. 查看 Linux 服务器的进程

    2. 查看 Linux 服务器的进程 1)ps [主要选项] -a  显示系统中所有进程的信息 -e  显示所有进程的信息 -f  显示进行的所有信息 -l   以长格式显示进程信息 -r  只显示正 ...

  6. Linux 服务器的网络配置 - 1. 查看 Linux 服务器的网络连接

    1. 查看 Linux 服务器的网络连接 1)查看主机名: liuqian@ubuntu:~$ hostname ubuntu 2)查看 ip 地址: 用 ifconfig 即可,这里介绍命令组合用法 ...

  7. 如何使用Linux命令行查看Linux服务器内存使用情况?

    一个服务器,最重要的资源之一就是内存,内存够不够用,是直接关系到系统性能的关键所在. 本文介绍如何查看Linux服务器内存使用情况, 1.free命令 free -m [root@localhost ...

  8. 全面了解 Linux 服务器 - 2. 查看 Linux 服务器的内存使用情况

    2. 查看 Linux 服务器的内存使用情况 liuqian@ubuntu:~$ free -m total used free shared buffers cached Mem: 1983 186 ...

  9. 全面了解 Linux 服务器 - 1. 查看 Linux 服务器的 CPU 详细情况

    1. 查看 Linux 服务器的 CPU 详细情况 判断依据: 具有相同的 core id 的 CPU 是同意个 core 超线程. 具有相同的 physical id 的 CPU 是同一个 CPU ...

随机推荐

  1. 截图保存 matlab

    file=dir('D:\Program Files\MATLAB\R2014a\bin\MyPro\OCR\图像中时间识别\')for i=3:length(file) path= strcat(' ...

  2. HTML5和CSS3阶段,我是如何学习的?

    经过一个月的学习,我收获了许多,今天的测验是做一个企业中文网站,令我自己感到吃惊的是,我前前后后用了4个小时就完成了,这在一个月前根本不可能,因为对布局属性的理解还不够深刻,常常会在调试中浪费大量时间 ...

  3. dice 概率论 概率DP

    题目链接: http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1010&cid=459 找出公式,公式有实际意义,某种情形当 ...

  4. Linux regulator系统

    1. 概念:Regulator : 电源芯片, 比如电压转换芯片Consumer : 消费者,使用电源的部件, Regulator是给Consumer供电的machine : 单板,上面焊接有Regu ...

  5. MySQL--Alter Table注意事项

    ======================================================================== ALTER TABLE 和FLUSH TABLE导致的 ...

  6. mac下hbase安装

    出处:https://www.jianshu.com/p/510e1d599123 安装到的路径:/usr/local/Cellar/hbase/1.2.6 linux操作: linux命令 作用 . ...

  7. tomcat下安装jenkins

    参考网址:http://www.cnblogs.com/edward2013/p/5269465.html 5.安装Jenkins 方法1: jenkins.war下载地址:   http://mir ...

  8. FineUI 单击菜单页面内容完全刷新,关闭Tab

    res/js/main.js  修改initTreeabStrip 中    refreshWhenExist.refreshWhenTabChang两参数值 // 初始化主框架中的树(或者Accor ...

  9. Thinkphp自动验证规则

    其实说白了,这篇文章就是转给自己看的,省的下次用的时候满网络找了.有需要的同学也可以看看.自动验证是非常有用的一个技术.平常的验证基本就是,用户名是否为空,用户名是否重复,密码,重复密码是否一致.官方 ...

  10. ES(1): Creat linux VM on Azure

    本章记录在ES集群之前的环境准备工作,主要包含的内容如下: 目录: 创建linux虚拟机 启用root用户 创建linux虚拟机 首先创建一个云服务 按向导创建云服务名称,如下 创建虚拟机, 第二步: ...