VMware ESXi MegaCLI StorCLI Enable Cache Write Back

You have two options for managing the LSI Logic, Dell PERC, etc. from the ESXi CLI: StorCLI or MegaCLI.

You can download MegaCLI for VMware here: 8.04.07_MegaCLI

You can download StorCLI from the LSI website and here: CLI_VMWare_MN_8.04.07

MegaCLI:

esxi1# ./MegaCli -LDSetProp -Cached -LAll -aAll

Set Cache Policy to Cached on Adapter 0, VD 0 (target id: 0) success
Set Cache Policy to Cached on Adapter 1, VD 0 (target id: 0) success

esxi1# ./MegaCli -LDSetProp EnDskCache -LAll -aAll

Set Disk Cache Policy to Enabled on Adapter 0, VD 0 (target id: 0) success
Set Disk Cache Policy to Enabled on Adapter 1, VD 0 (target id: 0) success

esxi1# ./MegaCli -LDSetProp RA -LALL -aALL

Set Read Policy to ReadAhead on Adapter 0, VD 0 (target id: 0) success

For those who have good power:

esxi1# ./MegaCli -LDSetProp WB -LALL -aALL

Set Write Policy to WriteBack on Adapter 0, VD 0 (target id: 0) success
Set Write Policy to WriteBack on Adapter 1, VD 0 (target id: 0) success

For those that live in fear, run the above command and also:

esxi1# ./MegaCli -LDSetProp NoCachedBadBBU -LALL -aALL

Set No Write Cache if bad BBU on Adapter 0, VD 0 (target id: 0) success
Set No Write Cache if bad BBU on Adapter 1, VD 0 (target id: 0) success

StorCLI:

Show all:

./storcli /c0 show all

Enable WriteBack Cache:
./storcli /c0/v0 set wrcache=AWB

Enable IOCache:
./storcli /c0/v0 set iopolicy=cached

Not recommended see:

Enable Physical Disk Drive Cache:

./storcli /c0/v0 set pdcache=On

Read Ahead

./storcli /c0/v0 set rdcache=RA  or  NoRA