Common commands: (c stands for Controller, e stands for Enclosure, s stands for Slot or PD, v stands for ld)
/opt/MegaRAID/storcli/storcli64 -v Display software version information
/opt/MegaRAID/storcli/storcli64 -h View help information
/opt/MegaRAID/storcli/storcli64 show View RAID card, system kernel, host name and other information
/opt/MegaRAID/storcli/storcli64 /c0 show View detailed information about RAID cards, physical disks, logical disks, etc.
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set jbod Set slot x physical disk status to JBOD
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set good force Set the physical disk status of slot x to UGood
/opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show all View detailed information of all physical disks on the RAID card
/opt/MegaRAID/storcli/storcli64 /c0 /vall show all View the detailed information of all logical disks on the RAID card, and you can also specify a logical disk v0, v1, etc.
/opt/MegaRAID/storcli/storcli64 /c0 /v0 show Display the information of the first logical disk on the first RAID card
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s0 start locate Locate a physical disk on the first RAID, and the green location light of the physical disk will be on.
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx stop locate Stop locating, and the locating light stops flashing.
/opt/MegaRAID/storcli/storcli64 /c0 download file=mr3108fw.rom Upgrade the firmware of the first RAID card
/opt/MegaRAID/storcli/storcli64 /c0 restart Restart the RAID card after upgrading the firmware so that the new firmware will take effect in time
/opt/MegaRAID/storcli/storcli64 /c0 add vd r0 size=all name=R0 drives=217:3,13 awb nora cached strip=256 Create a full-capacity Raid 0 with physical disks with slot numbers 3 and 13, read and write The strategy is no read ahead/ always writeback, the IO strategy is Cached, and the stripe size is 256k (you can use storcli64 /c0 add vd help to view and use detailed parameters)
/opt/MegaRAID/storcli/storcli64 /c0 add vd r10 size=10gb name=R10 drives=217:2-3,13,34 pdperarray=2 wb direct strip=64 Use Slot No. 2, 3, 13, 34 Create a RAID 10 with a capacity of 10gb on the physical disk, the read/write strategy is read ahead/writeback, the IO strategy is Direct, and the stripe size is 64k (Note: LSI SAS3108 supports up to 64 RAIDs. When creating 10/50/60, you must specify pdperarray Parameter. Without this parameter, the creation is unsuccessful.)
/opt/MegaRAID/storcli/storcli64 /c0 add vd r10 size=10gb,11gb name=R10-1,R10-2 drives=217:2-3,13,34 pdperarray=2 wb direct strip=64 One time in Slot Create two raid10 logical disks named R10-1 with a capacity of 10gb and named R10-2 with a capacity of 11gb on physical disks numbered 2, 3, 13, and 34
/opt/MegaRAID/storcli/storcli64 /c0 /v0 del [force] Delete logical disk with ID 0
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx add hotsparedrive dgs=0 Set a physical disk as the hot spare drive of disk group 0. If dgs is not specified, it will be the global hot spare drive on the RAID card.
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx delete hotsparedrive delete hot spare drive
/opt/MegaRAID/storcli/storcli64 /c0 /vx set wrcache=wt/wb/awb Set Vx logical disk write strategy
/opt/MegaRAID/storcli/storcli64 /c0 /vx set rdcache=ra/nora Set Vx logical disk read strategy
/opt/MegaRAID/storcli/storcli64 /c0 /vx set accesspolicy=rw/ro/blocked set access permissions
/opt/MegaRAID/storcli/storcli64 /c0 /vx set iopolicy=cached/direct Set IO policy
/opt/MegaRAID/storcli/storcli64 /c0 show rebuildrate View the rebuildrate speed of the first RAID card
/opt/MegaRAID/storcli/storcli64 /c0 flushcache Clear the cache of the first RAID card
/opt/MegaRAID/storcli/storcli64 /c0 /e217 /sall show rebuild View disk rebuild progress
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx start rebuild Start rebuilding
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx stop rebuild Stop rebuilding
/opt/MegaRAID/storcli/storcli64 /c0 /bbu show all Display bbu information
/opt/MegaRAID/storcli/storcli64 /c0 show alarm View alarm information
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=silence Temporarily turn off the alarm sound
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=off always turn off alarm chirping
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 start initialization Initialize a physical disk
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 show initialization View the progress of an initialized physical disk
/opt/MegaRAID/storcli/storcli64 /c0 set eghs state=on eug=off smarter=on Set the effective type of the emergency policy, state=on means hot disk is effective, eug=on means UGood disk is effective, smarter means copyback
/opt/MegaRAID/storcli/storcli64 /c0 /fall show View foreign information
/opt/MegaRAID/storcli/storcli64 /c0 /fall import Import foreign
/opt/MegaRAID/storcli/storcli64 /c0 /fall del Clear foreign
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents View logs online
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents | grep "rebuild" Online view log extraction keywords
/opt/MegaRAID/storcli/storcli64 /c0 show termlog >filename.txt Save the FW log to the specified file
/opt/MegaRAID/storcli/storcli64 /c0 show events >filename.txt Save the event log to the specified file
Reposted from: How to use the storcli tool_Server_Someone Wu.-HUAWEI CLOUD DEVELOPER ALLIANCE