LSI StorCLI64 博通阵列卡工具安装和使用教程

LSI StorCLI64 工具安装和使用教程

确认硬件类型

确认当前Raid卡是否可以通过 StorCLI64 来管理,先使用 lspci 查看当前设备的描述信息

lspci -k


01:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS-3 3108 [Invader] (rev 02)
       Subsystem: Super Micro Computer Inc Device 0809
       Kernel driver in use: megaraid_sas
       Kernel modules: megaraid_sas

可以看到使用硬件类型为 LSI Logic / Symbios Logic MegaRAID SAS-3 3108, 系统使用的内核驱动为 megaraid_sas



下载安装包

从 https://www.broadcom.com 官网下载对应工具即可,也可以上服务器品牌官网支持页下载该工具, 比如联想官网https://download.lenovo.com/pccbbs/thinkservers/ul_avago_storcli_1.18.11_anyos.zip


安装 LSI StorCLI64

这里下载下来的文件是 ul_avago_storcli_1.18.11_anyos.zip, 操作步骤如下:

unzip ul_avago_storcli_1.18.11_anyos.zip Archive:  ul_avago_storcli_1.18.11_anyos.zip

  creating: storcli_all_os/
  creating: storcli_all_os/EFI/
 inflating: storcli_all_os/EFI/license.txt  
 inflating: storcli_all_os/EFI/storcli.efi  
  creating: storcli_all_os/EFI/UDK/
 inflating: storcli_all_os/EFI/UDK/license.txt  
 inflating: storcli_all_os/EFI/UDK/storcli.efi  
  creating: storcli_all_os/Linux/
 inflating: storcli_all_os/Linux/license.txt  
 inflating: storcli_all_os/Linux/LINUX_Readme.txt  
 inflating: storcli_all_os/Linux/storcli-1.18.11-1.noarch.rpm  
  creating: storcli_all_os/Ubuntu/
 inflating: storcli_all_os/Ubuntu/read_me.txt  
 inflating: storcli_all_os/Ubuntu/storcli_1.18.11_all.deb  
  creating: storcli_all_os/Vmware/
  creating: storcli_all_os/Vmware-MN/
 inflating: storcli_all_os/Vmware-MN/license.txt  
 inflating: storcli_all_os/Vmware-MN/vmware-esx-storcli-1.18.11.vib  
 inflating: storcli_all_os/Vmware-MN/VMWARE_MN_Readme.txt  
  creating: storcli_all_os/Vmware-NDS/
 inflating: storcli_all_os/Vmware-NDS/license.txt  
 inflating: storcli_all_os/Vmware-NDS/vmware-esx-storcli-1.18.11.vib  
 inflating: storcli_all_os/Vmware-NDS/VMWARE_MN_NDS_Readme.txt  
 inflating: storcli_all_os/Vmware/license.txt  
 inflating: storcli_all_os/Vmware/read_me.txt.txt  
 inflating: storcli_all_os/Vmware/storcli.zip  
  creating: storcli_all_os/Windows/
 inflating: storcli_all_os/Windows/license.txt  
 inflating: storcli_all_os/Windows/storcli.exe  
 inflating: storcli_all_os/Windows/storcli64.exe  
 inflating: storcli_all_os/Windows/WIN_ReadMe.txt

# cd storcli_all_os/Linux# rpm -ivh storcli-1.18.11-1.noarch.rpm

安装完成之后, 为了便于使用, 链接到常用path下

ln -s /opt/MegaRAID/storcli/storcli64 /usr/bin/storcli64

LSI StorCLI64 常见使用

LSI StorCLI64的帮助信息非常完善, 查看下帮助信息:


storcli64 -h

    Storage Command Line Tool  Ver 1.14.12 Nov 25, 2014
    (c)Copyright 2014, LSI Corporation, All Rights Reserved.
storcli -v
storcli -h| -help| ?
storcli -h| -help| ? legacy
storcli show
storcli show all
storcli show ctrlcount
storcli show file=<filepath>
storcli /cx add vd r[0|1|5|6|00|10|50|60]
       [Size=<VD1_Sz>,<VD2_Sz>,..|all] [name=<VDNAME1>,..]
       drives=e:s|e:s-x|e:s-x,y,e:s-x,y,z [PDperArray=x][SED]
       [pdcache=on|off|default][pi][DimmerSwitch(ds)=default|automatic(auto)|
       none|maximum(max)|MaximumWithoutCaching(maxnocache)][WT|WB|AWB][nora|ra]
       [direct|cached] [cachevd] [Strip=<8|16|32|64|128|256|512|1024>]
        [AfterVd=X] [EmulationType=0|1|2] [Spares = [e:]s|[e:]s-x|[e:]s-x,y]
       [force][ExclusiveAccess] [Cbsize=0|1|2 Cbmode=0|1|2|3|4|7]
storcli /cx add vd each r0 [name=<VDNAME1>,..] [drives=e:s|e:s-x|e:s-x,y]
       [SED] [pdcache=on|off|default][pi] [DimmerSwitch(ds)=default|
       automatic(auto)|none|maximum(max)|MaximumWithoutCaching(maxnocache)]
       [WT|WB|AWB] [nora|ra] [direct|cached] [EmulationType=0|1|2]
       [Strip=<8|16|32|64|128|256|512|1024>] [ExclusiveAccess]
       [Cbsize=0|1|2 Cbmode=0|1|2|3|4|7]
storcli /cx add VD cachecade|nytrocache r[aid][0,1,10, 1EC]
       drives = [e:]s|[e:]s-x|[e:]s-x,y [WT|WB] [assignvds = 0,1,2]
       [BOOTVOLSIZE=x]
storcli /cx add VD cachecade|nytrocache slice r[aid][0,1]
       size=<x> [name=<NytroCacheName>] drives= [e:]s|[e:]s-x|[e:]s-x,y
       [WT|WB][assignvds = 0,1,2]
       size=[<VD1_Sz>,<VD2_Sz>,..] [name=<VDNAME1>,..] [WT|WB] [nora|ra]
       [direct|cached] [CachedBadBBU|NoCachedBadBBU]
       [Strip=<8|16|32|64|128|256|512|1024>] [AfterVd=X]
       [Spares = [e:]s|[e:]s-x|[e:]s-x,y] [force]
storcli /cx/ex show
storcli /cx/ex show all
storcli /cx/ex show status
storcli /cx/ex show phyerrorcounters
storcli /cx/vx del [cachecade] [discardcache] [force]
storcli /cx delete events
storcli /cx show events [[type= <sincereboot| sinceshutdown| includedeleted|
latest=x| ccincon vd=<0,1,...>] filter=<[info],[warning],[critical],[fatal]>
file=<filepath>
storcli /cx show eventloginfo
storcli /cx show health [all]
storcli /cx delete securitykey
storcli /cx set securitykey=xxxxxxxx {passphrase=xxxx} {keyid=xxx}
storcli /cx start Diag Duration=<Val>
storcli /cx set securitykey keyid=xxx
storcli /cx compare securitykey=xxxxxxxxxx
storcli /cx set termlog[=on|off|offthisboot]
storcli /cx show termlog [type=config|contents]
storcli /cx delete termlog
storcli /cx set securitykey=xxxxxxxx oldsecuritykey=xxxxxxxx
       {passphrase=xxxx} {keyid=xxx}
storcli /cx set sesmonitoring[=on|off]
storcli /cx show sesmonitoring
storcli /cx/dx show
storcli /cx/dall show cachecade
storcli /cx/dx show all
storcli /cx/dall show mirror
storcli /cx/dall split mirror
storcli /cx/dall add mirror src=<val> [force]
storcli /cx show freespace
storcli /cx/fall show [all] [securityKey = xxx]
storcli /cx/fall del|delete [securityKey = xxx]
storcli /cx/fall import [preview] [securityKey = xxx]
storcli /cx/vx set ssdcaching=on|off
storcli /cx/vx set hidden=on|off
storcli /cx/dx set hidden=on|off
storcli /cx/dx set security=on
storcli /cx/vx show expansion
storcli /cx show fshinting
storcli /cx/vx set fshinting=<value>
storcli /cx/vx expand Size=<xx> [expandarray]
storcli /cx[/ex]/sx show
storcli /cx[/ex]/sx show all
storcli /cx[/ex]/sx start rebuild
storcli /cx[/ex]/sx stop rebuild
storcli /cx[/ex]/sx pause rebuild
storcli /cx[/ex]/sx resume rebuild
storcli /cx[/ex]/sx show rebuild
storcli /cx[/ex]/sx show health
storcli /cx[/ex]/sx show smart
storcli /cx[/ex]/sx start copyback target=e:s
storcli /cx[/ex]/sx stop copyback
storcli /cx[/ex]/sx pause copyback
storcli /cx[/ex]/sx resume copyback
storcli /cx[/ex]/sx reset phyerrorcounters
storcli /cx[/ex]/sx show copyback
storcli /cx[/ex]/sx show phyerrorcounters
storcli /cx[/ex]/sx start initialization  
storcli /cx[/ex]/sx stop initialization  
storcli /cx[/ex]/sx show initialization  
storcli /cx[/ex]/sx start locate  
storcli /cx[/ex]/sx stop locate  
storcli /cx[/ex]/sx show securitykey keyid
storcli /cx[/ex]/sx add hotsparedrive [DGs=<N|0,1,2...>] [enclaffinity]
       [nonrevertible]
storcli /cx[/ex]/sx delete hotsparedrive
storcli /cx[/ex]/sx spinup
storcli /cx[/ex]/sx spindown
storcli /cx[/ex]/sx set online
storcli /cx[/ex]/sx set offline
storcli /cx[/ex]/sx set missing
storcli /cx[/ex]/sx set jbod
storcli /cx[/ex]/sx set security=on
storcli /cx[/ex]/sx set good [force]  
storcli /cx[/ex]/sx insert dg=A array=B row=C
storcli /cx/vx set emulationType=0|1|2
storcli /cx/vx set cbsize=0|1|2 cbmode=0|1|2|3|4|7
storcli /cx/vx set wrcache=WT|WB|AWB
storcli /cx/vx set rdcache=RA|NoRA
storcli /cx/vx set iopolicy=Cached|Direct
storcli /cx/vx set accesspolicy=RW|RO|Blocked|RmvBlkd
storcli /cx/vx set pdcache=On|Off|Default
storcli /cx/vx set name=<NameString>
storcli /cx/vx set HostAccess=ExclusiveAccess|SharedAccess
storcli /cx/vx set ds=Default|Auto|None|Max|MaxNoCache
storcli /cx/vx set autobgi=On|Off
storcli /cx/vx set pi=Off
storcli /cx/vx show
storcli /cx/vx show all
storcli /cx/vx show init
storcli /cx/vx show cc
storcli /cx/vx show erase
storcli /cx/vx show migrate
storcli /cx/vx show bgi
storcli /cx/vx show autobgi
storcli /cx/vx show trim
storcli /cx set consistencycheck|cc=[off|seq|conc] [delay=value]
       starttime=yyyy/mm/dd hh] [excludevd=x-y,z]
storcli /cx show cc|consistencycheck
storcli /cx show ocr
storcli /cx set ocr=<on|off>
storcli /cx/vx start init[Full][Force]
storcli /cx/vx start erase [simple|normal|thorough|standard][patternA=<val>]
[patternB=<val>]
storcli /cx/vx start cc[Force]
storcli /cx/vx start migrate type=raidx [option=add|remove
       drives=[e:]s|[e:]s-x|[e:]s-x,y] [Force]
storcli /cx/vx stop init
storcli /cx/vx stop erase
storcli /cx/vx stop cc
storcli /cx/vx stop bgi
storcli /cx/vx pause cc
storcli /cx/vx pause bgi
storcli /cx/vx resume cc
storcli /cx/vx resume bgi
storcli /cx show
storcli /cx show all
storcli /cx show preservedcache
storcli /cx/vx delete preservedcache[force]
storcli /cx[/ex]/sx download src=<filepath> [satabridge] [mode= 5|7]
storcli /cx/ex download src=<filepath> [forceActivate]
storcli /cx[/ex]/sx secureerase [force]  
storcli /cx[/ex]/sx start erase [simple| normal| thorough | standard| threepass]
  [patternA=<val>] [patternB=<val>]
storcli /cx[/ex]/sx stop erase
storcli /cx[/ex]/sx show erase
storcli /cx[/ex]/sx show rawdata pageaddr=<pageaddress in hex> file=<filename>
storcli /cx[/ex]/sx set bootdrive=<on|off>
storcli /cx/vx set bootdrive=<on|off>
storcli /cx show bootdrive
storcli /cx show bootwithpinnedcache
storcli /cx set bootwithpinnedcache=<on|off>
storcli /cx show activityforlocate
storcli /cx set activityforlocate=<on|off>
storcli /cx show copyback
storcli /cx set copyback=<on|off> type=smartssd|smarthdd|all
storcli /cx show jbod
storcli /cx set jbod=<on|off>
storcli /cx set autorebuild=<on|off>
storcli /cx set ldlimit=<default|max>
storcli /cx show autorebuild
storcli /cx set autopdcache=<off|[on|sscr0]|r0> [immediate]
storcli /cx show autopdcache
storcli /cx show cachebypass
storcli /cx set cachebypass=<on|off>
storcli /cx show usefdeonlyencrypt
storcli /cx set usefdeonlyencrypt=<on|off>
storcli /cx show prcorrectunconfiguredareas
storcli /cx set prcorrectunconfiguredareas=<on|off>
storcli /cx show batterywarning
storcli /cx set batterywarning=<on|off>
storcli /cx show abortcconerror
storcli /cx set abortcconerror=<on|off>
storcli /cx show ncq
storcli /cx show configautobalance
storcli /cx set ncq=<on|off>
storcli /cx set configautobalance=<on|off>
storcli /cx show maintainpdfailhistory
storcli /cx set maintainpdfailhistory=<on|off>
storcli /cx show restorehotspare
storcli /cx set restorehotspare=<on|off>
storcli /cx set bios [state=<on|off>] [Mode=<SOE|PE|IE|SME>] [abs=<on|off>]
      [DeviceExposure=<value>]
storcli /cx show bios
storcli /cx show alarm
storcli /cx set alarm=<on|off|silence>
storcli /cx show foreignautoimport
storcli /cx set foreignautoimport=<on|off>
storcli /cx show directpdmapping
storcli /cx set directpdmapping=<on|off>
storcli /cx show rebuildrate
storcli /cx set rebuildrate=<value>
storcli /cx show loadbalancemode
storcli /cx set loadbalancemode=<on|off>
storcli /cx show eghs
storcli /cx set eghs [state=<on|off>] [eug=<on|off>] [smarter=<on|off>]
storcli /cx show cacheflushint
storcli /cx set cacheflushint=<value>
storcli /cx show prrate
storcli /cx set prrate=<value>
storcli /cx show ccrate
storcli /cx set ccrate=<value>
storcli /cx show bgirate
storcli /cx set bgirate =<value>
storcli /cx show dpm
storcli /cx set dpm =<on|off>
storcli /cx show sgpioforce
storcli /cx set sgpioforce =<on|off>
storcli /cx set supportssdpatrolread =<on|off>
storcli /cx show migraterate
storcli /cx set migraterate=<value>
storcli /cx show spinupdrivecount
storcli /cx show wbsupport
storcli /cx set spinupdrivecount=<value>
storcli /cx show spinupdelay
storcli /cx set spinupdelay=<value>
storcli /cx show coercion
storcli /cx set coercion=<value>
storcli /cx show limitMaxRateSATA
storcli /cx set limitMaxRateSATA=on|off
storcli /cx show HDDThermalPollInterval
storcli /cx set HDDThermalPollInterval=<value>
storcli /cx show SSDThermalPollInterval
storcli /cx set SSDThermalPollInterval=<value>
storcli /cx show smartpollinterval
storcli /cx set smartpollinterval=<value>
storcli /cx show eccbucketsize
storcli /cx set eccbucketsize=<value>
storcli /cx show eccbucketleakrate
storcli /cx set eccbucketleakrate=<value>
storcli /cx show backplane
storcli /cx set backplane mode=<value> expose=<on/off>
storcli /cx show perfmode
storcli /cx set perfmode=<value> [maxflushlines=<value> numiostoorder=<value>]
storcli /cx show perfmodevalues
storcli /cx show pi
storcli /cx set pi [state=<on|off>] [import=<on|off>]
storcli /cx show time
storcli /cx set time=<yyyymmdd hh:mm:ss | systemtime>
storcli /cx show ds
storcli /cx set ds=OFF type=1|2|3|4
storcli /cx set ds=ON type=1|2 [properties]
storcli /cx set ds=ON type=3|4 DefaultLdType=<val> [properties]
storcli /cx set ds [properties]
storcli /cx show safeid
storcli /cx show rehostinfo
storcli /cx show pci
storcli /cx show ASO
storcli /cx set aso key=<key value> preview
storcli /cx set aso key=<key value>
storcli /cx set aso transfertovault
storcli /cx set aso rehostcomplete
storcli /cx set aso deactivatetrialkey
storcli /cx set factory defaults
storcli /cx download file=<filepath> [fwtype=<val>] [ResetNow] [nosigchk]
       [noverchk] [force]
storcli /cx flush|flushcache
storcli /cx [start] flush|flushcache [cachecade | nytrocache | ALL]
storcli /cx stop flush|flushcache cachecade|nytrocache
storcli /cx show flush|flushcache cachecade|nytrocache
storcli /cx/px show
storcli /cx/px show all
storcli /cx/px set linkspeed=0|1.5|3|6|12
storcli /cx/bbu show
storcli /cx/bbu show all
storcli /cx/bbu show status
storcli /cx/bbu show properties
storcli /cx/bbu show learn
storcli /cx/bbu show gasgauge Offset=xxxx Numbytes=n
storcli /cx/bbu start learn
storcli /cx/bbu show modes
storcli /cx/bbu set [ learnDelayInterval=<val> | bbuMode=<val>  
       |learnStartTime=[DDD HH | off] | autolearnmode=<val> |
       powermode=sleep | writeaccess=sealed ]
storcli /cx/cv set SCAPVPD file=<input file path> VPDPage=<SCapVPDFixed>
storcli /cx/cv show
storcli /cx/cv show all
storcli /cx/cv show status
storcli /cx/cv show learn
storcli /cx/cv show SCAPVPD file=<output file path> VPDPage=<SCapVPDFixed>
storcli /cx/cv start learn
storcli /cx show securitykey keyid
storcli /cx start patrolread
storcli /cx stop patrolread
storcli /cx pause patrolread
storcli /cx resume patrolread
storcli /cx show patrolRead
storcli /cx show powermonitoringinfo
storcli /cx show ldlimit
storcli /cx set patrolread = {{on mode=<auto|manual> }|{off}}
storcli /cx set patrolread [starttime=< yyyy/mm/dd hh>]
       [maxconcurrentpd =<value>] [includessds=<on|onlymixed|off>]
       [uncfgareas=on|off]
storcli /cx set patrolread delay = <value>
storcli /cx[/ex]/sx show diag paniclog [Query] | [ExtractSlot=x]
                                        | [EraseSlot=x] [file=filepath]
storcli /cx[/ex]/sx show diag smartlog [file=filepath]
storcli /cx[/ex]/sx show diag errorlog [file=filepath]
storcli /cx del Nytrocache [force]
storcli /cx show badblocks
storcli /cx flasherase
storcli /cx shutdown
storcli /cx/mx set mode=<Internal | External | Auto>
storcli /cx/mx show
storcli /cx transform iMR
storcli /cx restart
storcli /cx/vx show BBMT
storcli /cx/vx delete BBMT
storcli /cx[/ex]/sx start format [thorough]
storcli /cx show dequeuelog file=<filepath>
storcli /cx show maintenance
storcli /cx set maintenance mode=normal|nodevices
storcli /cx show personality
storcli /cx set personality=RAID|HBA
storcli /cx show immediateio
storcli /cx show driveactivityled
storcli /cx set immediateio=<on|off>
storcli /cx set driveactivityled=<on|off>
Note:Use 'page=[x]'as the last option in all the commands to set the page break.
     X=lines per page. E.g. 'storcli help page=10'

常用指令说明

storcli show all 显示raid卡相关信息、raid卡高级软件信息

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

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

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

storcli64 /cx show rebuildrate

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

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

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