Dado que el BIOS del servidor no integra la rom opcional, Raid no se puede configurar gráficamente en el BIOS y
MegaCli solo se puede usar en el sistema operativo
1. #Ver información del disco
[root@localhost ~]# megacli -PDList -aALL |egrep 'Adapter|Enclosure|Slot|Firmware state'
Adapter #0
Enclosure Device ID: 252
Slot Number: 4
Enclosure position: N/A
Firmware state: Unconfigured(good), Spun Up
Enclosure Device ID: 252
Slot Number: 5
Enclosure position: N/A
Firmware state: Unconfigured(good), Spun Up
[root@localhost ~]#
2. #Build Raid1
#megacli -CfgLdAdd -r1 [252: 4,252: 5] WB -a0 compone datos de
acuerdo con el Id. De dispositivo del gabinete 252 y el número de ranura 4 5, r1 es el raid 1 y a0 es el número de adaptador para
construir Raid5
megacli -CfgLdAdd -r5 [41: 0,41: 1,41: 2,41: 3,41: 4,41: 5,41: 6,41: 7,41: 8,41: 9,41: 10,41: 11 ] WB en caché -a0
[root@localhost ~]# megacli -CfgLdAdd -r1 [252:4,252:5] WB -a0
Adapter 0: Created VD 0
Adapter 0: Configured the Adapter!!
Exit Code: 0x00
3. #Ver el estado de la tarjeta de incursión de la incursión 1 después de la formación
[root@localhost ~]# megacli -ShowSummary -aALL
System
Operating System: Linux version 4.19.90.S001.64.200410
Driver Version: 07.706.03.00-rc1
CLI Version: 8.07.14
Hardware
Controller
ProductName : AVAGO MegaRAID SAS 9361-8i(Bus 0, Dev 0)
SAS Address : 500605b010384be0
FW Package Version: 24.21.0-0017
Status : Need Attention
Enclosure
Product Id : SGPIO
Type : SGPIO
Status : OK
PD
Connector : Port 4 - 7<Internal>: Slot 4
Vendor Id : ATA
Product Id : HGST HUS722T2TAL
State : Online
Disk Type : SATA,Hard Disk Device
Capacity : 1.818 TB
Power State : Active
Connector : Port 4 - 7<Internal>: Slot 5
Vendor Id : ATA
Product Id : HGST HUS722T2TAL
State : Rebuild
Disk Type : SATA,Hard Disk Device
Capacity : 1.818 TB
Power State : Active
Operation In Progress : Rebuild
Storage
Virtual Drives
Virtual drive : Target Id 0 ,VD name
Size : 1.818 TB
State : Degraded
RAID Level : 1
Exit Code: 0x00
4. # Ver y activar el modo JBOD:
##megacli -AdpGetProp -enablejbod -aALL #查看JBOD是否开启
[root@localhost ~]# megacli -AdpGetProp -enablejbod -aALL
Adapter 0: JBOD: Disabled
Exit Code: 0x00
##megacli -AdpSetProp -EnableJBOD -0 -aALL #关闭JBOD
[root@localhost ~]# megacli -AdpSetProp -EnableJBOD -0 -aALL
Adapter 0: Set JBOD to Disable success.
Exit Code: 0x00
##megacli -AdpSetProp -EnableJBOD -1 -aALL #打开JBOD
[root@localhost ~]# megacli -AdpSetProp -EnableJBOD -1 -aAlL
Adapter 0: Set JBOD to Enable success.
Exit Code: 0x00
5. # Estado del firmware: solución
no configurada (mala) megacli -PDMakeGood -PhysDrv [E: S] -a0 El estado del firmware cambiará de No configurado (malo) a No configurado (bueno), Spun Up
[root@localhost ~]# megacli -PDList -aALL |egrep 'Adapter|Enclosure|Slot|Firmware state'
Adapter #0
Enclosure Device ID: 252
Slot Number: 4
Enclosure position: N/A
Firmware state: Online, Spun Up
Enclosure Device ID: 252
Slot Number: 5
Enclosure position: N/A
Firmware state: Unconfigured(bad)
[root@localhost ~]# megacli -PDMakeGood -PhysDrv[252:5] -a0
Adapter: 0: EnclId-252 SlotId-5 state changed to Unconfigured-Good.
Exit Code: 0x00
[root@localhost ~]# megacli -PDList -aALL |egrep 'Adapter|Enclosure|Slot|Firmware state'
Adapter #0
Enclosure Device ID: 252
Slot Number: 4
Enclosure position: N/A
Firmware state: Online, Spun Up
Enclosure Device ID: 252
Slot Number: 5
Enclosure position: N/A
Firmware state: Unconfigured(good), Spun Up
[root@localhost ~]#
6. #Ver el progreso de la reconstrucción del disco
[root@localhost ~]# megacli -PDRbld -showprog -physDrv [252:5] -a0
Rebuild Progress on Device at Enclosure 252, Slot 5 Completed 1% in 2 Minutes.
Exit Code: 0x00
7. #Apaga la alarma del timbre
megacli -AdpSetProp AlarmDsbl -aALL #永久关闭,重启后还是关闭
megacli -AdpSetProp -AlarmDsbl –a0 #永久关闭,重启后还是关闭
megacli -AdpSetProp -AlarmSilence –a0 #临时关闭,重启又变成开启
megacli -AdpSetProp -Alarmenbl –a0 #开启
megacli -AdpgetProp -Alarmdsply –a0 #查看告警的状态
8. #Borrar la configuración del grupo raid
megacli -cfgclr -a0 #清除所有的raid组的配置
9. #Ver estado de RAID
megacli -LDInfo -Lall -aALL #查看RAID的状态
10. #Ver información de la tarjeta de incursión
megacli -adpallinfo -a0
11. # Ver información del disco físico
megacli -pdlist --aall
12. #Ver información del disco físico y del disco lógico
megacli -LdPdInfo -aALL