首页 > 其他分享 >阵列故障排查MegaCli

阵列故障排查MegaCli

时间:2024-02-20 16:25:33浏览次数:28  
标签:opt aALL MegaCli 32 阵列 排查 MegaRAID MegaCli64

阵列故障排查

MegaCli8.07.10.tar.gz 该压缩包包含Linux和Windows的程序,如需请下载这个 (访问密码: 2344)
MegaRAID.zip 点击下载: (访问密码: 2344)

unzip  /opt/MegaRAID.zip -d /opt
ln -s /opt/MegaRAID/MegaCli/MegaCli64 /bin/MegaCli64
chmod +x /bin/MegaCli64

以上是安装命令

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL

查看所有阵列卡的所有阵列逻辑卷的所有信息

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -a0 | grep -i "Virtual Disk"

查看第1张阵列卡上一共有多少个raid阵列组(默认从0开始计数)

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -L0 -a0

查看第1张阵列卡上的第0个raid阵列组的信息(默认从0开始计数)

/opt/MegaRAID/MegaCli/MegaCli64 -LDPdInfo -aAll

查看所有阵列卡的所有阵列逻辑卷的所有信息(包括阵列逻辑卷对应的物理硬盘)

/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL

显示所有阵列卡信息,可以查看机器上一共有多少张阵列卡以及每张卡的详细信息

/opt/MegaRAID/MegaCli/MegaCli64 -PDList -aALL

查看所有阵列卡上的所有物理硬盘信息,包括型号、接口、SN码、部分SMART信息等

/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [32:2,32:3,32:4] WB Direct -Hsp[32:4] -a0

在第1张阵列卡上创建一个 raid5 阵列,由物理盘 1,2,3 构成,该阵列的热备盘是物理盘 4

注意这里的32:2指的是使用eID和slot ID对一个阵列卡下的硬盘进行定位(默认从0开始计数)

/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [32:2,32:3,32:4] WB Direct -a0

同上,创建一个 raid5 阵列,但是不指定热备盘

/opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[32:5] -L1 -a0

在线添加物理硬盘到某个阵列中

/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a0

删除第1张阵列卡上的第2个raid阵列(默认从0开始计数)

/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ShowProg -LALL -aALL

阵列创建完后,会有一个初始化同步块的过程,可以看看其进度

/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ProgDsply -LALL -aALL

同上,但是以动态可视化文字界面显示进度信息

/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ShowProg -LALL -aALL

查看阵列后台初始化进度

/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ProgDsply -LALL -aALL

同上,以动态可视化文字界面显示

/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[32:7] -a0

指定第1张阵列卡的第8块盘作为全局热备 (默认从0开始计数)

/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[32:7] -a0

同上,指定为某个阵列的专用热备

/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[32:7] -a0

删除全局热备盘

/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [32:2] -a0

将某块物理盘下线(offline)

/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv [32:2] -a0

将某块物理盘下线(online)

/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ShowProg -PhysDrv [32:2] -a0

换盘后查看物理磁盘重建进度

/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -ProgDsply -PhysDrv [32:2] -a0

以动态可视化界面查看物理磁盘重建进度

/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL

查看raid卡日志,注意日志的输出量可能较大,阵列卡对应的组建阵列等操作的详细信息都可以在日志中查看

/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL

显示Raid卡型号,Raid设置,Disk相关信息

/opt/MegaRAID/MegaCli/MegaCli64 -adpCount

显示适配器个数,只能查看机器上一共有多少张阵列卡,不能查看详细信息

/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime –aALL

显示适配器时间

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll

查看BBU的详细信息

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus - aALL |grep 'Charger Status' 

查看BBU电池的充电状态

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL

显示BBU状态信息

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL

显示BBU容量信息

/opt/MegaRAID/MegaCli/ MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL

显示BBU设计参数

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL

显示当前BBU属性

Adapter#0 —–raid卡控制器编号
EnclosureDevice ID: 252 —–外壳设备ID,也就是raid卡的ID号
SlotNumber: 4 ——槽号
Enclosureposition: 0 ——外壳位置
DeviceId: 49 —–设备ID
SequenceNumber: 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:3.638 TB [0x1d1c0beb0 Sectors] —–磁盘原始大小
NonCoerced Size: 3.637 TB [0x1d1b0beb0 Sectors] —–磁盘标准大小
CoercedSize: 3.637 TB [0x1d1b00000 Sectors] ——磁盘最大可用大小
Firmware state: Unconfigured(good),Spun down —–固件状态:未配置(好的),未连接
SASAddress(0): 0x4433221107000000
ConnectedPort Number: 3(path0) ——连接端口号
InquiryData: Z1ZBBJWWST4000NM0033-9ZM170 SN06 —–硬盘的序列号、型号、固件版本
FDECapable: Not Capable
FDEEnable: Disable
Secured:Unsecured
Locked:Unlocked
Needs EKMAttention: No
ForeignState: None
DeviceSpeed: 6.0Gb/s
LinkSpeed: 6.0Gb/s
MediaType: Hard Disk Device
Drive: Not Certified
DriveTemperature : N/A —-设备温度

需要特别关注这几个指标:Media Error / Other Error / Predictive Failure Count / LastPredictive Failure Event Seq Number

/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aALL  | grep "Firmware state" | awk -F : '{print $2}' | awk -F , '{print $1}'
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aALL  | grep -E "Media Error" | awk -F : '{print $2}'

1,Media Error
磁盘存在错误,可能是磁盘有坏道。值越大,越危险。根据磁盘状况,一般大于100报修更换。
2,Other Error
磁盘存在未知的错误,可能是磁盘松动,需要重新再插入。根据磁盘状况,一般大于100报修更换。
3,Predictive Failure Count
磁盘的预警数。一般大于0,就报修更换。
4,Last Predictive Failure Event Seq Number
最后一条预警的时间序列号。这个值不为0,肯定Predictive Failure Count也不为0
5,Firmware state
磁盘目前的状态。一般有9种,即
(1)Unconfigured Good – A drive accessible to the RAID controller but not configured as a part of
a virtual drive or as a hot spare.
(2)Online – A drive that can be accessed by the RAID controller and will be part of the virtual
drive.
(3)Rebuild – A drive to which data is being written to restore full redundancy for a virtual drive.
(4)Failed – A drive that was originally configured as Online or Hot Spare, but on which the
firmware detects an unrecoverable error.
(5)Unconfigured Bad – A drive on which the firmware detects an unrecoverable error; the drive
was Unconfigured Good or the drive could not be initialized.
(6)Missing – A drive that was Online, but which has been removed from its location.
(7)Offline – A drive that is part of a virtual drive but which has invalid data as far as the RAID
configuration is concerned.
(8)Hot Spare – A drive that is configured as a hot spare.
(9)None – A drive with an unsupported flag set. An Unconfigured Good or Offline drive that has
completed the prepare for removal operation.
(10)还有一种特殊的状态copyback:
从磁盘组中把数据复制到非磁盘组的磁盘中,然后等failed的盘更换之后,再从这个非磁盘组的磁盘中把数据给copyback回来。
做hot spare的盘,会出现这种情况:即原来的hot spare盘只是临时存放了数据,等failed的盘更换之后,把数据从hotspare的盘中复制回来,正常使用的还是新更换的盘,hot spare的盘永久做hot spare。

标签:opt,aALL,MegaCli,32,阵列,排查,MegaRAID,MegaCli64
From: https://www.cnblogs.com/suixinnan/p/18023332

相关文章

  • 【性能测试】MYSQL锁和mysql事务问题排查04
    一、MYSQL锁目的:解决客户端并发访问冲突问题查看死锁showOPENTABLESwhereIn_use>0案例登录接口 #锁定表LOCKTABLESlitemall.litemall_userREAD;#睡眠160秒SELECTSLEEP(160);#解锁表UNLOCKTABLES;当用户表被锁定时,接口无法登录访问,解锁后可以正......
  • 【性能测试】MySQL连接数及连接异常排查
    一、mysql连接数1、Mysql连接数,是服务器和数据库建立连接时,使用的连接数量。利用Mysql的SQL语句监控Mysql的连接数:showvariableslike'%connections%';max_connections:所有与数据库建立连接的最大数量max_user_connections:每个用户与数据库建立连接的最大数量2、......
  • 如何利用内核跟踪点排查短时进程问题?
    在排查系统CPU使用率高的问题时,很可能遇到过这样的困惑:明明通过 top 命令发现系统的CPU使用率(特别是用户CPU使用率)特别高,但通过 ps、pidstat 等工具都找不出CPU使用率高的进程。这是什么原因导致的呢?一般情况下,这类问题很可能是以下两个原因导致的:第一,应用程序里面......
  • SPI多个从设备问题排查
    记SPI问题排查 SPI电路挂载了2个从设备,S1和S2,其中S2前加了一个隔离器g,电路结构如下图:  问题发现:其它同事已经开发了S2驱动,我在开发S1驱动时发现S1无响应。 排查是软件问题还是硬件问题:检查代码SPI初始化(时钟等)片选信号的处理(多从设备做冲突处理)没有问题后S1还是无......
  • kubernetes集群故障排查的几种方法
    1.kubectldescribe查看资源的详细信息,根据事件信息获取当前资源的状态,从而给出解决方案。[root@master231pod]#kubectlgetpodsNAMEREADYSTATUSRESTARTSAGEimage-resources-stress-040/1Pending02m13s[root@mas......
  • kubelet 组件内存高排查方法
    1、查看服务进程,并跟踪程序系统调用pgrep kubelet#查看资源占用情况top-p 95786strace-cp95786#显示时间戳strace-tt-p95786 2、用pprof性能分析工具排查#安装go环境#启动代理kubectlproxy--port=8001--address=0.0.0.0curl-sK-vhttp://127.0.0.1:8001/......
  • raid 磁盘冗余阵列
    什么是raid磁盘冗余阵列这是由多块独立磁盘(多为硬盘)组合的一个超大容量磁盘组。大白话的解释磁盘冗余阵列,就是将很多块硬盘组合成一个整体,不同的RAID级别,可以实现不同的功能如加速数据读写、如实现数据备份。raid技术的作用-提高IO能力,磁盘并行读写-提高耐用性,磁......
  • 如何排查常规软件问题 - 面向 Linux 初级用户的教程
    笔者从14年做开源软件以来,接触了众多Linux新手用户,这里我为这类用户总结了一些常见的问题排查方法,希望能帮助到大家。如果你已经工作多年,对于下面提到的思路和方法应该非常熟悉,如果对某一条感到陌生,咳咳,真的不太应该,赶紧补补吧。1.软件资料获取第一条是告诉大家去哪里获取......
  • 主从同步问题排查常用sql
    我们在配置mysql主从的时候经常会遇到一些问题,同步延迟、定位binlog错误、查看binlog等等问题,一般大家可能会用到其他方式或者命令,我一般都是采用纯sql的方式进行排查,这里把我常用的一些方法分享给大家:1.查询master和slave的状态showmasterstatus;showslavestatus;2.通过......
  • 一次因PageHelper引起的多线程复用问题的排查和解决 | 京东物流技术团队
    A、ProblemDescription1\.PageHelper方法使用了静态的ThreadLocal参数,在startPage()调用紧跟MyBatis查询方法后,才会自动清除ThreadLocal存储的对象。2\.当一个线程先执行了A方法的PageHelper.startPage(intpageNum,intpageSize)后,在未执行到SQL语句前,因为代码抛异常而提前结束......