找回密码
 立即注册

微信扫码登录

使用验证码登录

QQ登录

只需一步,快速开始

搜索
查看: 52|回复: 2

storcli工具的使用方法

[复制链接]

1

主题

25

回帖

53

积分

注册会员

积分
53
发表于 2026-7-8 11:15:18 |中国| 显示全部楼层 |阅读模式
常用命令:(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]


1

主题

25

回帖

53

积分

注册会员

积分
53
 楼主| 发表于 2026-7-8 11:17:08 |中国| 显示全部楼层
我用夸克网盘给你分享了「storcli64」,点击链接或复制整段内容,打开「夸克APP」即可获取。 /~bde03ZSGtr~:/ 链接:https://pan.quark.cn/s/86b5d0ace305

7

主题

1495

回帖

6046

积分

论坛元老

积分
6046
发表于 2026-7-8 21:48:31 |中国| 显示全部楼层
进来看看
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|管理员邮箱|QQ微信群|肖琪模拟游戏站 ( 沪ICP备2023018581号-5|沪公网安备31011702888952号 )

GMT+8, 2026-7-19 18:16 , Processed in 0.407565 second(s), 5 queries , Redis On.

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表