LSI MegaRAID controller cards are widly used in servers. Provides lots of raid features, also offers great realiability as well as performance. On the other hand, lots of people quite offten get confused and discouraged by its complex command tool usage.

I have an article described MegaCli useful commands with examples, help people to start with, or as a reference. In this article, I'll be focusing it's background patrol read and consistency check features.

I'll contnue use linux command line as example below, surely there is according function available on other OS. And, according to your machine platform, use Megacli(32) or Megacli64(64 bit )



Set MegaRAID controller time


To set MegaRAID card time

#MegaCli64 -AdpSetTime `date +%Y%m%d` `date +%H:%M:%S` -aALL -NoLog

To get MegaRAID card time

MegaCli -AdpGetTime -aALL


Patrol read

 More detail in MegaRAID Patrol Read in Detail

Patrol read is a feature which tries to discover disk error before it is too late and data is lost. By default it is done automatically (with a delay of 168 hours between different patrol reads) and will take up to 30% of IO resources.

Note: Use the below commands to run patrol read in off-peak times.

To see information about the patrol read state and the delay between patrol read runs:

# MegaCli64 -AdpPR -Info -aALL

To find out the current patrol read rate, execute

# MegaCli64 -AdpGetProp PatrolReadRate -aALL

To reduce patrol read resource usage to 2% in order to minimize the performance impact:

# MegaCli64 -AdpSetProp PatrolReadRate 2 -aALL

To disable automatic patrol read:

# MegaCli64 -AdpPR -Dsbl -aALL

To enable automatic patrol read:

#MegaCli64 -AdpPR -EnblAuto -aALL

To start a manual patrol read scan:

# MegaCli64 -AdpPR -Start -aALL

To stop a patrol read scan:

# MegaCli64 -AdpPR -Stop -aALL

To correct media error during patrol read

#MegaCli -AdpSetProp -PrCorrectUncfgdAreas -1 -aALL 


MegaRAID consistency check

More detail in MegaRAID Consistency Check in Detail

To see next scheduled consistency check time

#MegaCli64 -AdpCcSched -Info -aALL

To change scheduled consistency check time

#MegaCli64 -AdpCCSched -SetSTartTime 20141028 02 -aALL

Set next scheduled consistency check at 02:00am 20141028

To disable consistency check

#MegaCli64 -AdpCcSched -Dsbl -aALL

To change consistency check mode, concurrent mode

#MegaCli64 -AdpCcSched -ModeConc -aALL

To change consistency check mode, Sequencial mode

#MegaCli64 -AdpCcSched  -ModeSeq -aALL

Note: After change mode from disable to concurrent/sequencial, the next scheduled CC time will become year 2135, you have to set next scheduled run time again.

Operation Mode: Concurrent
Execution Delay: 168
Next start time: 07/28/2135, 02:00:00
Current State: Stopped
Number of iterations: 118
Number of VD completed: 1
Excluded VDs          : None
Exit Code: 0x00

At the end, if you want check Adapter properties, here is it

# MegaCli64 -AdpAllInfo -aALL

Comments powered by CComment