目前LSI RAID卡使用的配置工作主要有:Megaraid Storage Manager(MSM,圖形環境)、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
五、邏輯磁盤命令
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屬性的命令:
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
./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)
八、其他常用命令
./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 設置寫策略