MegaCLI CheatSheet


How to show all LSI RAID info with MegaCLI:

Show basic configuration:

/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aAll

Detailed RAID card settings:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -a0

Configure Forced Write Bank Cache (To enable cache without BBU, you would need to force it)

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -ForcedWB -Immediate -Lall -aAll

Configure Normal Write Back Cache mode 

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -WB -Immediate -Lall -aAll

Configure LSI to use cache even with bad BBU (To enable cache without BBU, you would need to first force the LSI to use cache, then enable it with CachedBadBBU attribute

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -CachedBadBBU -Immediate -Lall -aAll

Configure LSI to disable cache with a badBBU

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -NoCachedBadBBU -Immediate -Lall -aAll

Enable writethrough cache (Cache, that ensures the write to the original data is completed after writing in cache before serving it. No additional benefit in using WT cache, important when data integrity is more important.

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -WT -Immediate -Lall -aAll

Disable LSI Read Ahead Caching

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -NORA -Immediate -Lall -aAll

Enable LSI Read Ahead Caching

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -RA -Immediate -Lall -aAll

Enabled Cached I/O, in writeback mode, the cached stored in LSI cache can be used to serve I/O request first before hitting the backend disk by enabling cached I/O

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -Cached -Immediate -Lall -aAll

Enable Direct I/O

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -Direct -Immediate -Lall -aAll

How to enable Drive Cache, you may enable drive cache that comes with your disk to improvise the cache usage using the RAID command line tool:

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -EnDskCache -Immediate -Lall -aAll

How to disable drive cache

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -DisDskCache -Immediate -Lall -aAll

NCQ is a kind of automatic IO ordering available in RAID cards. To check the status of NCQ, run

/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetProp -NCQDsply -aALL

To Enable NCQ:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp -NCQEnbl -aALL

To disable NCQ:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp -NCQDsbl -aALL

To find BBU Information:

/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll
/opt/MegaRAID/MegaCli/MegaCli64 -PDList -a0

To find physical disk information using MegaCLI:

/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -CachedBadBBU -Immediate -Lall -aAll


Please enter your comment!
Please enter your name here