storcli工具的使用方法
个人博客:点击这里进入
常用命令:(c代表Controller, e代表Enclosure,s代表Slot或PD,v代表ld)
/opt/MegaRAID/storcli/storcli64 -v 显示软件版本信息
/opt/MegaRAID/storcli/storcli64 -h 查看帮助信息
/opt/MegaRAID/storcli/storcli64 show 查看RAID卡、系统内核、主机名等信息
/opt/MegaRAID/storcli/storcli64 /c0 show 查看RAID卡、物理盘、逻辑盘等详细信息
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set jbod 设置slot x物理盘状态为JBOD
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set good force 设置slot x物理盘状态为UGood
/opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show all 查看RAID卡上所有物理磁盘详细信息
/opt/MegaRAID/storcli/storcli64 /c0 /vall show all查看RAID卡上所有逻辑盘详细信息,也可指定某个逻辑磁盘v0,v1等
/opt/MegaRAID/storcli/storcli64 /c0 /v0 show 显示第一块RAID卡上第一个逻辑磁盘信息
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s0 start locate 定位第一块RAID上某块物理磁盘,物理磁盘的绿色的定位灯会被点亮。
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx stop locate 停止定位,定位灯停止闪烁。
/opt/MegaRAID/storcli/storcli64 /c0 download file=mr3108fw.rom 升级第一块RAID卡固件
/opt/MegaRAID/storcli/storcli64 /c0 restart 升级固件后重启RAID卡以便新固件及时生效
/opt/MegaRAID/storcli/storcli64 /c0 add vd r0 size=all name=R0 drives=217:3,13 awb nora cached strip=256 用Slot号为3和13的物理盘创建全容量Raid 0,读写策略为no read ahead/ always writeback,IO策略为Cached,条带大小为256k(详细参数可以使用storcli64 /c0 add vd help查看及使用)
/opt/MegaRAID/storcli/storcli64 /c0 add vd r10 size=10gb name=R10 drives=217:2-3,13,34 pdperarray=2 wb direct strip=64 用Slot号为2、3、13、34的物理盘创建10gb容量的raid 10,读写策略为read ahead/ writeback,IO策略为Direct,条带大小为64k(注意:LSI SAS3108最多支持64个RAID,创建10/50/60时,必须指定pdperarray参数。如果没有这个参数,是创建不成功的。)
/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 一次性在Slot号为2、3、13、34的物理盘上创建容量为10gb名为R10-1、容量为11gb名为R10-2的两个raid10逻辑盘
/opt/MegaRAID/storcli/storcli64 /c0 /v0 del [force] 删除ID为0的逻辑盘
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx add hotsparedrive dgs=0 设置某块物理磁盘为磁盘组0的热备盘,如果不指定dgs,则为该RAID卡上全局热备盘。
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx delete hotsparedrive 删除热备磁盘
/opt/MegaRAID/storcli/storcli64 /c0 /vx set wrcache=wt/wb/awb 设置Vx逻辑盘写策略
/opt/MegaRAID/storcli/storcli64 /c0 /vx set rdcache=ra/nora 设置Vx逻辑盘读策略
/opt/MegaRAID/storcli/storcli64 /c0 /vx set accesspolicy=rw/ro/blocked 设置访问权限
/opt/MegaRAID/storcli/storcli64 /c0 /vx set iopolicy=cached/direct 设置IO策略
/opt/MegaRAID/storcli/storcli64 /c0 show rebuildrate 查看第一块RAID卡rebuildrate速度
/opt/MegaRAID/storcli/storcli64 /c0 flushcache 清除第一块RAID卡缓存
/opt/MegaRAID/storcli/storcli64 /c0 /e217 /sall show rebuild 查看磁盘重建进度
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx start rebuild 开始重建
/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx stop rebuild 停止重建
/opt/MegaRAID/storcli/storcli64 /c0 /bbu show all 显示bbu信息
/opt/MegaRAID/storcli/storcli64 /c0 show alarm 查看报警器信息
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=silence 暂时关闭报警器鸣叫
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=off 始终关闭报警器鸣叫
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 start initialization 初始化某个物理磁盘
/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 show initialization 查看某个初始化的物理磁盘进度
/opt/MegaRAID/storcli/storcli64 /c0 set eghs state=on eug=off smarter=on 设置紧急策略生效类型,state=on代表热配盘生效,eug=on代表UGood盘生效,smarter代表回拷
/opt/MegaRAID/storcli/storcli64 /c0 /fall show 查看foreign信息
/opt/MegaRAID/storcli/storcli64 /c0 /fall import 导入foreign
/opt/MegaRAID/storcli/storcli64 /c0 /fall del 清除foreign
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents 在线查看日志
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents | grep "rebuild" 在线查看日志抽取关键字
/opt/MegaRAID/storcli/storcli64 /c0 show termlog >filename.txt 保存FW日志到指定文件
/opt/MegaRAID/storcli/storcli64 /c0 show events >filename.txt 保存事件日志到指定文件
下载地址:
[c-downbtn type="bd" url="https://pan.baidu.com/s/1rk-oBxCT5DgUI810wJQr1w" pwd="c9ig"]storcli工具下载[/c-downbtn]