{{tag>raid megacli}} ====== megacli commands ====== ===== Info ===== megacli -LDInfo -Lall -aAll megacli -AdpAllInfo -aALL megacli -PDList -aALL ===== Check disk for predictive error count ===== megacli -PDList -aAll | egrep "Enclosure Device ID:|Slot Number:|Inquiry Data:|Error Count:|state|Device Id:" ===== Rebuild drive ===== megacli -PDRbld -ShowProg -PhysDrv[252:1] -a0 ===== Check battery (BBU) ===== megacli -AdpBbuCmd -aALL ===== Delete virtual drive 1 ===== megacli -CfgLdDel -L1 -a0 ===== No writeback cache ===== megacli -LDSetProp -NoCachedBadBBU -Immediate -Lall -aAll ===== ROM flash ===== megacli -adpfwflash -f imr_fw.rom -a0 ===== Create raid 1 ===== megacli -CfgLdAdd -r1 [32:0,32:1] WB NORA Direct NoCachedBadBBU -strpsz64 -a0 ===== Create raid 10 ===== megacli -CfgSpanAdd -R10 -Array0 [252:4,252:5] -Array1 [252:6,252:7] WB NORA Direct -strpsz64 -a0 ===== raid 1 from 4 disks ===== megacli -CfgLdAdd -r1 [32:2,32:3] WB RA Direct CachedBadBBU -a0 In square brackets are Enclosure Id:Slot Id. Check those with megaCli -PDList -aALL ====== Tested on ====== * ====== See also ====== * [[wiki:create_raid_5_4_disks_encryption_hetzner|Create RAID 5 from 4 disks with encryption on Hetzner]] ====== References ====== * https://globalroot.wordpress.com/2013/06/18/megacli-raid-levels/ * https://supportforums.cisco.com/document/62901/megacli-common-commands-and-procedures * https://www.thomas-krenn.com/en/wiki/Smartmontools_with_MegaRAID_Controller * https://www.thomas-krenn.com/de/wiki/MegaCLI_Optionen * http://www.advancedclustering.com/act_kb/replacing-a-disk-with-megacli/ * http://pleiades.ucsc.edu/doc/lsi/MegaRAID_SAS_Software_User_Guide.pdf