Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: MegaCli  (Read 5347 times)

0 Members and 1 Guest are viewing this topic.

jamesj

  • Guest
MegaCli
« on: May 10, 2017, 02:59:41 am »
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

Installation

Download 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.zip
or
wget http://mirror.cogentco.com/pub/misc/MegaCli-8.07.14-1.noarch.rpm


    # rpm -ivh MegaCli-8.07.14-1.noarch.rpm


Command location (will be installed to /opt/MegaRAID/MegaCli)


    /opt/MegaRAID/MegaCli/MegaCli64


Make 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 Megacli

Controller information


    megacli -AdpAllInfo -aALL
    megacli -CfgDsply -aALL
    megacli -AdpEventLog -GetEvents -f events.log -aALL && cat events.log


 

Enclosure information


    megacli -EncInfo -aALL


Virtual drive information


    megacli -LDInfo -Lall -aALL


Physical drive information


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



Battery backup information


    megacli -AdpBbuCmd -aALL


Controller 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