资讯专栏INFORMATION COLUMN

raid卡的常用命令

mayaohua / 1609人阅读

手动创建 raid
##删除raid
root@scaler:~# /opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L2 -A0

##创建raid
root@scaler:~# /opt/MegaRAID/MegaCli/MegaCli64 CfgLDAdd -r5 [41:5,41:6,41:7,41:8,41:9,41:10,41:11,41:12,41:13,41:14] -strpsz128 -A0 
raid 卡日志,保存到文件

/opt/MegaRAID/MegaCli/MegaCli64 -AdpEventLog -GetEvents -f raid.envent.log -a0

新加入硬盘,重新插拔硬盘
清除foreign key 
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Scan -aALL 
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -Clear -aALL

如何查看和清除 raid的 cache ##删除,重建raid时可能需要
/opt/MegaRAID/MegaCli/MegaCli64 -GetPreservedCacheList -aALL 
/opt/MegaRAID/MegaCli/MegaCli64 -DiscardPreservedCache -L7 -aall


/opt/MegaRAID/MegaCli/MegaCli64 -PDMakeGood -PhysDrv[8:1] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgForeign -import -a0
常用检查 磁盘erro

/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0|grep -Ei "enc|Slot Number|Firmware stat|media error |other error"

raid一致性检查
禁用一直性 检查
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -Dsbl -Aall
启用一致性检查,
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -ModeConc -Aall
查看一直性检查 信息
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -info -Aall
在pdlist 中可以看到 硬盘类型

Media Type: Hard Disk Device,,如果是固态盘,会显示 solid state device
PD Type: SAS,,这个应该可以判断是 sata盘 还是sas盘。。

flush raid cache

/opt/MegaRAID/MegaCli/MegaCli64 -AdpCacheFlush -Aall

闪烁硬盘

MegaCli -PdLocate -start -physdrv [E:S] -aALL

write back 只对写有用。
BBu状态 会影响到 write back 模式 是否开启。

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -Aall
对某一个具体的 logic disk 查看 all 改成 对应0,1,

物理盘,逻辑盘一起看

megacli -LdPdInfo -aALL

关闭raid组的告警

-AdpSetProp AlarmDsbl -aALL

/opt/MegaRAID/MegaCli/MegaCli64 ldpdinfo -aall |egrep "Slot |Firmware"

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

检查BBBU 状态,期望 optima

root@host185:~# /opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll |grep -Ei battery

检查cache policy
/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -Aall
Current Cache Policy 期望Current Cache Policy No Write Cache if Bad BBU
Disk Cache Policy 期望 disable

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

设置cache

./MegaCli -LDSetProp NOCachedBadBBU -Lall -aALL
./MegaCli -LDSetProp CachedBadBBU -Lall -aALL

检查RAId 初始化进度

/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -a0

raid 跟换硬盘后,判断状态
 1417  /opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -a0|less
 1418  /opt/MegaRAID/MegaCli/MegaCli64 -ldpdinfo -a0|less
查看每个物理硬盘状态
 1419  /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -a0|egrep "Slot Number|Firmware stat"
write through 改成 write back
/opt/MegaRAID/MegaCli/MegaCli64 LDSetProp WB -Lall -Aall
##更改1个logic disk

 /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WB -L3 -A0
 /opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WB -L4 -A0
查看电池状态
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL
-AdpBbuCmd -GetBbuCapacityInfo -A0
换硬盘 ,查看rebuild进度

/opt/MegaRAID/MegaCli/MegaCli64 -PDRbld -showprog -physDrv [40:7] -a0

关闭 读的cache

/opt/MegaRAID/MegaCli/MegaCli64 LDSetProp Direct -Lall -Aall

关闭 disk cache

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -DisDskCache -Lall -Aall

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/9850.html

相关文章

  • mysql优化

    摘要:显示处于不可中断的休眠的进程数量。在等待显示被交换到磁盘的数据块的数量。服务器硬件优化物理状态灯自带管理设备远程控制卡设备,开关机硬件监控。 数据库层面问题解决思路 一般应急调优的思路:针对突然的业务办理卡顿,无法进行正常的业务处理!需要立马解决的场景! 1、show processlist 2、explain select id ,name from stu where name=...

    yvonne 评论0 收藏0
  • mysql优化

    摘要:显示处于不可中断的休眠的进程数量。在等待显示被交换到磁盘的数据块的数量。服务器硬件优化物理状态灯自带管理设备远程控制卡设备,开关机硬件监控。 数据库层面问题解决思路 一般应急调优的思路:针对突然的业务办理卡顿,无法进行正常的业务处理!需要立马解决的场景! 1、show processlist 2、explain select id ,name from stu where name=...

    elisa.yang 评论0 收藏0
  • mysql优化

    摘要:显示处于不可中断的休眠的进程数量。在等待显示被交换到磁盘的数据块的数量。服务器硬件优化物理状态灯自带管理设备远程控制卡设备,开关机硬件监控。 数据库层面问题解决思路 一般应急调优的思路:针对突然的业务办理卡顿,无法进行正常的业务处理!需要立马解决的场景! 1、show processlist 2、explain select id ,name from stu where name=...

    Aceyclee 评论0 收藏0
  • 性能优化之MySQL调优篇

    摘要:显示处于不可中断的休眠的进程数量。我们可以实用内存数据库,替代他的功能。 MySQL对于很多Linux从业者而言,是一个非常棘手的问题,多数情况都是因为对数据库出现问题的情况和处理思路不清晰。在进行MySQL的优化之前必须要了解的就是MySQL的查询过程,很多的查询优化工作实际上就是遵循一些原则让MySQL的优化器能够按照预想的合理方式运行而已。 showImg(https://seg...

    NervosNetwork 评论0 收藏0
  • 美高森美推出适用于数据中心的 全新智能存储 HBA 和 RAID 阵列卡

    摘要:美高森美的智能存储解决方案针对性能进行了性能优化,并针对基于的冷存储进行了功耗优化。美高森美和均采用统一的智能存储堆栈。产品供应美高森美的统一智能存储堆栈以及第四代和系列板级产品系列现可批量生产。Adaptec 智能存储解决方案可以为 SDS、冷存储和企业应用提供高性能、低功耗且可靠的解决方案致力于在功耗、安全、可靠性和性能方面提供差异化半导体技术方案的领先供应商美高森美公司, 宣布全新智能...

    lemanli 评论0 收藏0

发表评论

0条评论

最新活动
阅读需要支付1元查看
<