MegaCLI Merkblatt

From Bitbull Wiki
Jump to navigation Jump to search

1 Status Auslesen

1.1 Zeige alle Logischen Devices

megacli -LDInfo -Lall -Aall

1.2 Zeige Zustand aller Festplatten

megacli -PDList -Aall
megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state"

1.3 Ersetzen einer HD im Array

[root@kvm1 ~]# megacli -PDList -a0 | egrep 'Enclosure Device ID|Error|Firmware state|Slot Number'
   Enclosure Device ID: 252
   Slot Number: 0
   Media Error Count: 0
   Other Error Count: 0
   Firmware state: Online, Spun Up
   Enclosure Device ID: 252
   Slot Number: 1
   Media Error Count: 0
   Other Error Count: 0
   Firmware state: Online, Spun Up
   Enclosure Device ID: 252     <----- NOTE
   Slot Number: 2               <----- NOTE
   Media Error Count: 0
   Other Error Count: 0
   Firmware state: Unconfigured(bad)
   Enclosure Device ID: 252
   Slot Number: 3
   Media Error Count: 0
   Other Error Count: 0
   Firmware state: Online, Spun Up
   Enclosure Device ID: 252
   Slot Number: 4
   Media Error Count: 0
   Other Error Count: 0
   Firmware state: Online, Spun Up

[root@kvm1 ~]# megacli -CfgForeign -Scan -a0
   There is no foreign configuration on controller 0.
   Exit Code: 0x00

[root@kvm1 ~]# megacli -CfgForeign -Clear -a0
   There is no foreign configuration on controller 0.
   Exit Code: 0x00

[root@kvm1 ~]#  megacli -PDMakeGood -PhysDrv [252:2] -a0
   Adapter: 0: EnclId-252 SlotId-2 state changed to Unconfigured-Good.
   Exit Code: 0x00

[root@kvm1 ~]#  megacli -CfgDsply -a0 | grep -A2 "Physical Disk:"
   Physical Disk: 0
   Enclosure Device ID: 252
   Slot Number: 0
   --
   Physical Disk: 1
   Enclosure Device ID: 252
   Slot Number: 1
   --
   Physical Disk: 2
                            <--- MISSING DISK
   --
   Physical Disk: 3
   Enclosure Device ID: 252
   Slot Number: 3
   --
   Physical Disk: 4
   Enclosure Device ID: 252
   Slot Number: 4

[root@kvm1 ~]# megacli -PdReplaceMissing -PhysDrv[252:2] -array0 -row2 -a0
   Adapter: 0: Missing PD at Array 0, Row 2 is replaced.
   Exit Code: 0x00

[root@kvm1 ~]# megacli -PDRbld -Start -PhysDrv[252:2] -a0
   Started rebuild progress on device(Encl-252 Slot-2)
   Exit Code: 0x00

[root@kvm1 ~]# megacli -PDRbld -ShowProg -PhysDrv [252:2] -aAll
   Rebuild Progress on Device at Enclosure 252, Slot 2 Completed 0% in 0 Minutes.
   Exit Code: 0x00

[root@kvm1 ~]# megacli -PDList -a0 | grep Firmware
   Firmware state: Online, Spun Up
   Device Firmware Level: 0003
   Firmware state: Online, Spun Up
   Device Firmware Level: 0003
   Firmware state: Rebuild
   Device Firmware Level: 0003
   Firmware state: Online, Spun Up
   Device Firmware Level: 0003
   Firmware state: Online, Spun Up
   Device Firmware Level: 0003