Megacli Cheat Sheet

Reading time ~1 minute

Check Disks Status

# check disk status
MegaCli -PDlist -aALL -NoLog | egrep 'Slot|state' | awk '/Slot/{if (x)print x;x="";}{x=(!x)?$0:x" -"$0;}END{print x;}' | sed 's/Firmware state://g'
  

Bring Bad Disk to Good


MegaCli -PDMakeGood -PhysDrv[E:S] -aN

Bring Unconfiguration(good) to Online

MegaCli -PDOnline -PhysDrv [E:S] -aN 

Scan and Clear Foreign

#Bring bad to good
MegaCli -CfgForeign -Scan -aALL 
MegaCli -CfgForeign -Clear -aALL

Import Foreign

megacli -CfgForeign -Import -a0

Check Disk Information

MegaCli -PDList -aALL
MegaCli -PDInfo -PhysDrv [E:S] -aALL 

MegaCli64 -AdpAllInfo -aAll
MegaCli64 -LDInfo -Lall -aALL

Upgrade Firmware with local file

MegaCli -adpfwflash -f mr2208fw.rom -a0

Raid0 & Raid 1

Megacli -cfgldadd -r1[252:0,252:1] -a0

Megacli -cfgldadd -r0[252:2] -a0
Megacli -cfgldadd -r0[252:3] -a0
Megacli -cfgldadd -r0[252:4] -a0
Megacli -cfgldadd -r0[252:5] -a0

Disk Cache

Megacli -LDSetProp -WT -Immediate -L[1-2-3-4] -aAll
Megacli -LDSetProp EnDskCache -L[1-2-3-4] -aAll

Kubernetes Tutorials (1)

Published on June 16, 2017

Kubernetes How It Works

Published on January 22, 2017