MegaCli introduced by LSI is a command line administration of LSI MegaRaid controllers .
With megacli we can create physical raids, gather info about raids and monitor raids.
MegaCLI provided by LSI is the most cryptic command line utility in existence.
Dell PowerEdge servers uses the LSI MegaRAID controllers
InstallationDownload and Install MegaCli and other supportive tools
Inside the zip file you’ll find an RPM archive which contains the MegaCli and MegaCli64 binaries
wget
http://techedemic.com/wp-content/uploads/2015/10/8-07-14_MegaCLI.zipor
wget
http://mirror.cogentco.com/pub/misc/MegaCli-8.07.14-1.noarch.rpm # rpm -ivh MegaCli-8.07.14-1.noarch.rpmCommand location (will be installed to /opt/MegaRAID/MegaCli)
/opt/MegaRAID/MegaCli/MegaCli64Make an alias for easier use
alias megacli='/opt/MegaRAID/MegaCli/MegaCli64'Extra tools
MegaCli is not providing all the information we need like mapping to linux devices and raid level (readable), so we are going
to use some extra tools.
# yum install sg3_utils Useful Commands for MegacliController information megacli -AdpAllInfo -aALL
megacli -CfgDsply -aALL
megacli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log Enclosure information megacli -EncInfo -aALLVirtual drive information megacli -LDInfo -Lall -aALLPhysical drive information megacli -PDList -aALL
megacli -PDInfo -PhysDrv [E:S] -aALLBattery backup information megacli -AdpBbuCmd -aALLController management Silence active alarm
megacli -AdpSetProp AlarmSilence -aALL Disable alarm
megacli -AdpSetProp AlarmDsbl -aALL Enable alarm
megacli -AdpSetProp AlarmEnbl -aALL
To see information about the patrol read state and the delay between patrol read runs megacli -AdpPR -Info -aALL
To find out the current patrol read rate megacli -AdpGetProp PatrolReadRate -aALL To reduce patrol read resource usage to 2% in order to minimize the performance impact megacli -AdpSetProp PatrolReadRate 2 -aALL To disable automatic patrol read megacli -AdpPR -Dsbl -aALL To start a manual patrol read scan megacli -AdpPR -Start -aALL To stop a patrol read scan megacli -AdpPR -Stop -aALL If your system is not connected to a UPS, you should disable the physical disk cache in order to prevent data loss. megacli -LDGetProp EnDskCache -LAll -aALL To enable it (only do this if you have a UPS and redundant power supplies) megacli -LDGetProp DisDskCache -LAll -aALL Detail about disks megacli -ShowSummary -aALL To Check patrol read warnings megacli -AdpEventLog -GetSinceReboot -warning -fatal -a0