Storcli常用命令


目前LSI RAID卡使用的配置工作主要有:Megaraid Storage ManagerMSM,图形环境)MegaCLI(字符界面)、StorCLI(字符界面)。其中StorCLI整合了LSI和原来3ware的产品支持,相对MegaCLI命令更加简洁,并且兼容MegaCLI的命令,估计不久的将来两者会统一


一、环境

Manufacturer: Dell Inc.

Product Name:PowerEdge R720

Model = PERCH710 Mini

Centos6.4 x64,2.6.32-358.el6.x86_64

Storage Command Line Tool Ver 1.03.46 Aug 16, 2013


二、句法

The StorCLI syntax uses thefollowing general format:

[object identifier]> <verb><[adverb | attributes | properties] > <[key=value]>


三、Raid卡命令

cd /opt/MegaRAID/storcli/

./storcli64 show [all]显示raid卡相关信息、raid卡高级软件信息

./storcli64 /cx show all 显示某一块raid卡的版本、功能、状态、以及raid卡下的物理磁、逻辑盘信息

./storcli64 /cx show freespace 显示剩下的磁盘空间

./storcli64 /cx set rebuildrate=x 整数,设置rebuildrate速度

./storcli64 /cx show rebuildrate

./storcli64 /cx set patrolread=on or off 开启或关闭patrolread

./storcli64 /cx show patrolread

./storcli64 /cx set cc=on or off 开启或关闭rate

./storcli64 /cx show cc

./storcli64 /cx show ccrate

./storcli64 /cx download file=filepath 升级raid卡固件,需要重启

./storcli64 /cx flushcache 清除raid卡、物理磁盘cache


四、物理磁盘命令

./storcli64 /cx/eall/sall show 显示物理磁盘信息

./storcli64 /cx/eall/sall show all 显示详细物理磁盘信息

./storcli64 /cx/ex/sx set good/offline/online/missing 设置某块磁盘的状态

./storcli64 /cx/ex/sx start locate 定位某块磁盘

./storcli64 /cx/ex/sx stop locate

./storcli64 /cx/ex/sx show rebuild 查看rebild

./storcli64 /cx/ex/sx start rebuild

./storcli64 /cx/ex/sx stop rebuild

./storcli64 /cx/ex/sx add hostsparedrive dgs=x 设置模块磁盘为diskgroup x 的热备盘

./storcli64 /cx/ex/sx delete hostsparedrive

五、逻辑磁盘命令

增加逻辑磁盘的命令:(选项很多,较复杂)163844779.png



163930776.png

163932433.png



Eg./storcli64 /c0 add vd type=raid5 size=all names=tmp1 drives=32:2-4

./storcli64/c0 add vd type=raid10 size=all names=tmp1 drives=32:2-7 pdperarray=2 创建10/50/60时,必须制定pdperarray参数

创建多个逻辑分区时:./storcli64/c0 add vd type=raid10 size=100GB,200GB names=tmp1,tmp2 drives=32:2-7pdperarray=2;剩下的空间:./storcli64 /c0 add vd type=raid10 size=all names=tmp3 drives=32:2-7pdperarray=2,需要注意,此时其余的参数要和之前的一致,否则报错

./storcli64 /c0/v1set wrcache=wt

./storcli64 /cx/vx/vallshow 显示逻辑磁盘信息

./storcli64 /cx/vx/vall show all 显示逻辑磁盘信息

./storcli64 /cx/vx/valldel 删除逻辑磁盘,此命令会等待cache中的数据写入磁盘

./storcli64 /cx/vx/vall del force删除逻辑磁盘,此命令不会等待cache中的数据写入磁盘

设置vd属性的命令:

163934490.png


Raid 转换命令:(集成的raid卡不支持该命令)

./storcli64 /cx/vx/vall show migrate

./storcli64 /cx/vx/vall start migrate type=raid x [option=add/removedisk=xx]

Eg: ./storcli64 /c0/v1 start migrate type=r5 option=removedisk=e32:s6,e32:s7


164004513.png

./storcli64 /cx/vx/vall show cc 一致性检查

./storcli64 /cx/vx/vall start cc

./storcli64 /cx/vx/vall stop cc


./storcli64 /cx/vx/vall set wrcache=wt/wb/awb 设置写策略



六、外部磁盘命令

./storcli64 /cx/fx/fall del

./storcli64 /cx/fx/fall import

./storcli64 /cx/fx/fall show


七、BBU命令

./storcli64 /cx/bbu show

./storcli64 /cx/bbu show all

./storcli64 /cx/bbu set bbumode=x (默认为0

164027643.png

八、其他常用命令

./storcli64 -v 显示版本

./storcli64 -h 显示帮助信息

./storcli64 show [all] 显示raid卡信息

./storcli64 /cx show freespace 显示剩余空间

./storcli64/cx/vx/vall show[all] 显示逻辑磁盘信息

./storcli64 /cx/vx/vall set wrcache=wt/wb/awb 设置写策略


你可能感兴趣的:(raid,lsi,StorCLI)