1,查看Adapter
/opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL
指定硬盘做raid 查看新加盘的Enclosure ID 和Slot号 /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall | egrep "Raw|Enclosure|Slot|Firmware" Slot Number: 3 Enclosure position: 0 Raw Size: 558.911 GB [0x45dd2fb0 Sectors] Firmware state: Online, Spun Up Device Firmware Level: AD02 Enclosure Device ID: 10 Slot Number: 4 Enclosure position: 0 Raw Size: 447.130 GB [0x37e436b0 Sectors] Firmware state: Online, Spun Up Device Firmware Level: 0100 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0(raid级别) [10(Enclosure Device ID):4(Slot Number)] WB Direct -a0(Enclosure position) raid使用 https://www.cnblogs.com/zhangxinglong/p/5983425.html https://idc.wanyunshuju.com/cym/646.html https://github.com/XANi/toolbox/blob/master/doc/RAID.md # /opt/MegaRAID/MegaCli/MegaCli64 -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-0, Secondary-0, RAID Level Qualifier-0 Size : 557.861 GB State : Optimal Strip Size : 128 KB Number Of Drives : 1 Span Depth : 1 Default Cache Policy: WriteBack, ReadAhead, Direct, Write Cache OK if Bad BBU Current Cache Policy: WriteBack, ReadAhead, Direct, Write Cache OK if Bad BBU Access Policy : Read/Write Disk Cache Policy : Disk's Default Encryption Type : None 查看raid和磁盘关系 /opt/MegaRAID/MegaCli/MegaCli64 -cfgdsply -aALL /opt/MegaRAID/MegaCli/MegaCli64 -LdPDList -aALL /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0(raid级别) [10(Enclosure Device ID):4(Slot Number)] WB Direct -a0(Enclosure position) /opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall | egrep "Enclosure Device ID|Slot Number|Raw Size|Enclosure position" /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:1] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:2] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:3] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:4] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:5] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:6] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:7] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:8] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:9] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:10] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:11] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL https://blog.51cto.com/jiayimeng/2650619 /opt/MegaRAID/MegaCli/MegaCli64 -cfglddel -L1 -a0 a0:表示raid卡信息中的Adapter #0适配器编号 L1:表示Virtual Drive 1虚拟设备编号 /opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL MegaCli -CfgLdAdd -r5 [8:0, 8:1, 8:3, 8:4, 8:5, 8:6, 8:7, 8:8, 8:9, 8:10, 8:11] -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd --r5 [8:0, 8:1, 8:3, 8:4, 8:5, 8:6, 8:7, 8:8, 8:9] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:10] WB Direct -a0 /opt/MegaRAID/MegaCli/MegaCli64 -cfgldadd -r0 [8:11] WB Direct -a0 RAID卡知識 https://www.cnblogs.com/dexter-wang/articles/12235881.html https://www.cnblogs.com/dexter-wang/articles/12235881.html https://javaforall.cn/124772.html https://www.cnblogs.com/kxln/p/15790533.html http://t.zoukankan.com/lixinliang-p-11196622.html http://t.zoukankan.com/easonscx-p-10438053.html https://www.cnblogs.com/xingxiz/p/10411248.html https://github.com/XANi/toolbox/blob/master/doc/RAID.md https://www.jianshu.com/p/551ce3a92061 https://www.shnne.com/post/344.html 1,确定坏盘 2,找到raid和targetid 相关参考 ./MegaCli64 -CfgDsply -a0 ./storcli64 -adpalilog -aALL >log MegaCli -CfgLdAdd -r5 [8:0, 8:1, 8:2,8:3, 8:4, 8:5, 8:6, 8:7, 8:8, 8:9, 8:10, 8:11] -a0
标签:opt,RAID,MegaCli,处理,Direct,a0,MegaRAID,MegaCli64 From: https://www.cnblogs.com/tiantao36/p/18657579