高性能硬件 raid 控制器 三.安装StorCLI: To install StorCLI, perform the following steps:1. Unzip the StorCLI package.2. To install the StorCLI RPM, run the rpm -ivh command.3. To upgrade the StorCLI RPM, run the rpm -Uvh command. 说明:安装完毕之后storcli64所在路径为/opt/MegaRAID/storcli/storcli64,在此路径下可以运行storcli64工具,切换到其它路径下则不能执行,此时为了使用方便,可以考虑将/opt/MegaRAID/storcli追加到系统PATH变量,或者像下面这样做(建议): ln -s /opt/MegaRAID/storcli/storcli64 /bin/storcliln -s /opt/MegaRAID/storcli/storcli64 /sbin/storcli
Ssh-安全壳 四.StorCLI基本使用: #Raid数量及当前状态[root@localhost Linux]# storcli show ctrlcountStatus Code = 0Status = SuccessDescription = NoneController Count = 1#查询虚拟磁盘大小,raid结构等[root@localhost Linux]# storcli /c0 /v0 showController = 0Status = SuccessDescription = NoneVirtual Drives :==============———————————————————-DG/VD TYPE State Access Consist Cache sCC Size Name ———————————————————-0/0 RAID10 Optl RW No RWTD – 1.089 TB ———————————————————-Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=DegradedOptl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|B=Blocked|Consist=Consistent|R=Read Ahead Always|NR=No Read Ahead|WB=WriteBack|AWB=Always WriteBack|WT=WriteThrough|C=Cached IO|D=Direct IO|sCC=ScheduledCheck Consistency#可以看出此为RAID10,一个虚拟磁盘,大小为1.089 TB#查看物理硬盘[root@localhost Linux]# storcli /c0 /eall /sall showController = 0Status = SuccessDescription = Show Drive Information Succeeded.Drive Information :=================————————————————————————-EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ————————————————————————-252:4 12 Onln 0 558.406 GB SAS HDD N N 512B ST3600057SS U 252:5 13 Onln 0 558.406 GB SAS HDD N N 512B ST3600057SS U 252:6 14 Onln 0 558.406 GB SAS HDD N N 512B ST3600057SS U 252:7 15 Onln 0 558.406 GB SAS HDD N N 512B ST3600057SS U ————————————————————————-EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroupDHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global HotspareUBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-InterfaceMed-Media Type|SED-Self Encryptive Drive|PI-Protection InfoSeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-ForeignUGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shieldedCFShld-Configured shielded#可以看到总计有四颗硬盘,每一颗大小448.406GB,是否在线等#查看StorCLI帮助信息[root@localhost Linux]# storcli -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| ? legacystorcli show storcli show allstorcli show ctrlcountstorcli show file=storcli /cx add vd r[0|1|5|6|00|10|50|60] [Size=,,..|all] [name=,..] 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=,..] [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= [name=] drives= [e:]s|[e:]s-x|[e:]s-x,y [WT|WB][assignvds = 0,1,2] size=[,,..] [name=,..] [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 eventsstorcli /cx show events [[type= ] filter=<[info],[warning],[critical],[fatal]>file=storcli /cx show eventloginfostorcli /cx show health [all]storcli /cx delete securitykeystorcli /cx set securitykey=xxxxxxxx {passphrase=xxxx} {keyid=xxx}storcli /cx start Diag Duration= storcli /cx set securitykey keyid=xxxstorcli /cx compare securitykey=xxxxxxxxxxstorcli /cx set termlog[=on|off|offthisboot]storcli /cx show termlog [type=config|contents]storcli /cx delete termlogstorcli /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= [force] storcli /cx show freespacestorcli /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|offstorcli /cx/vx set hidden=on|offstorcli /cx/dx set hidden=on|offstorcli /cx/dx set security=onstorcli /cx/vx show expansionstorcli /cx show fshintingstorcli /cx/vx set fshinting=storcli /cx/vx expand Size= [expandarray]storcli /cx[/ex]/sx show storcli /cx[/ex]/sx show allstorcli /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=] [enclaffinity] [nonrevertible]storcli /cx[/ex]/sx delete hotsparedrivestorcli /cx[/ex]/sx spinupstorcli /cx[/ex]/sx spindownstorcli /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|2storcli /cx/vx set cbsize=0|1|2 cbmode=0|1|2|3|4|7 storcli /cx/vx set wrcache=WT|WB|AWBstorcli /cx/vx set rdcache=RA|NoRAstorcli /cx/vx set iopolicy=Cached|Directstorcli /cx/vx set accesspolicy=RW|RO|Blocked|RmvBlkdstorcli /cx/vx set pdcache=On|Off|Defaultstorcli /cx/vx set name=storcli /cx/vx set HostAccess=ExclusiveAccess|SharedAccessstorcli /cx/vx set ds=Default|Auto|None|Max|MaxNoCachestorcli /cx/vx set autobgi=On|Offstorcli /cx/vx set pi=Offstorcli /cx/vx showstorcli /cx/vx show allstorcli /cx/vx show initstorcli /cx/vx show ccstorcli /cx/vx show erasestorcli /cx/vx show migratestorcli /cx/vx show bgistorcli /cx/vx show autobgistorcli /cx/vx show trimstorcli /cx set consistencycheck|cc=[off|seq|conc] [delay=value] starttime=yyyy/mm/dd hh] [excludevd=x-y,z]storcli /cx show cc|consistencycheckstorcli /cx show ocr storcli /cx set ocr=storcli /cx/vx start init[Full][Force]storcli /cx/vx start erase [simple|normal|thorough|standard][patternA=][patternB=]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 initstorcli /cx/vx stop erasestorcli /cx/vx stop ccstorcli /cx/vx stop bgistorcli /cx/vx pause ccstorcli /cx/vx pause bgistorcli /cx/vx resume ccstorcli /cx/vx resume bgistorcli /cx show storcli /cx show all storcli /cx show preservedcache storcli /cx/vx delete preservedcache[force] storcli /cx[/ex]/sx download src= [satabridge] [mode= 5|7]storcli /cx/ex download src= [forceActivate] storcli /cx[/ex]/sx secureerase [force] storcli /cx[/ex]/sx start erase [simple| normal| thorough | standard| threepass] [patternA=] [patternB=]storcli /cx[/ex]/sx stop erase storcli /cx[/ex]/sx show erase storcli /cx[/ex]/sx show rawdata pageaddr=file= storcli /cx[/ex]/sx set bootdrive= storcli /cx/vx set bootdrive=storcli /cx show bootdrivestorcli /cx show bootwithpinnedcachestorcli /cx set bootwithpinnedcache=storcli /cx show activityforlocatestorcli /cx set activityforlocate=storcli /cx show copybackstorcli /cx set copyback= type=smartssd|smarthdd|all storcli /cx show jbodstorcli /cx set jbod= storcli /cx set autorebuild= storcli /cx set ldlimit= storcli /cx show autorebuildstorcli /cx set autopdcache= [immediate]storcli /cx show autopdcachestorcli /cx show cachebypassstorcli /cx set cachebypass= storcli /cx show usefdeonlyencryptstorcli /cx set usefdeonlyencrypt=storcli /cx show prcorrectunconfiguredareasstorcli /cx set prcorrectunconfiguredareas= storcli /cx show batterywarningstorcli /cx set batterywarning= storcli /cx show abortcconerrorstorcli /cx set abortcconerror= storcli /cx show ncqstorcli /cx show configautobalance storcli /cx set ncq= storcli /cx set configautobalance= storcli /cx show maintainpdfailhistorystorcli /cx set maintainpdfailhistory= storcli /cx show restorehotsparestorcli /cx set restorehotspare= storcli /cx set bios [state=] [Mode=] [abs=] [DeviceExposure=]storcli /cx show bios storcli /cx show alarmstorcli /cx set alarm= storcli /cx show foreignautoimportstorcli /cx set foreignautoimport= storcli /cx show directpdmappingstorcli /cx set directpdmapping= storcli /cx show rebuildratestorcli /cx set rebuildrate= storcli /cx show loadbalancemodestorcli /cx set loadbalancemode= storcli /cx show eghsstorcli /cx set eghs [state=] [eug=] [smarter=] storcli /cx show cacheflushintstorcli /cx set cacheflushint= storcli /cx show prratestorcli /cx set prrate= storcli /cx show ccratestorcli /cx set ccrate= storcli /cx show bgiratestorcli /cx set bgirate = storcli /cx show dpm storcli /cx set dpm = storcli /cx show sgpioforce storcli /cx set sgpioforce = storcli /cx set supportssdpatrolread = storcli /cx show migrateratestorcli /cx set migraterate= storcli /cx show spinupdrivecountstorcli /cx show wbsupportstorcli /cx set spinupdrivecount= storcli /cx show spinupdelaystorcli /cx set spinupdelay= storcli /cx show coercionstorcli /cx set coercion= storcli /cx show limitMaxRateSATAstorcli /cx set limitMaxRateSATA=on|off storcli /cx show HDDThermalPollIntervalstorcli /cx set HDDThermalPollInterval= storcli /cx show SSDThermalPollIntervalstorcli /cx set SSDThermalPollInterval= storcli /cx show smartpollintervalstorcli /cx set smartpollinterval= storcli /cx show eccbucketsizestorcli /cx set eccbucketsize= storcli /cx show eccbucketleakratestorcli /cx set eccbucketleakrate= storcli /cx show backplanestorcli /cx set backplane mode= expose= storcli /cx show perfmodestorcli /cx set perfmode= [maxflushlines= numiostoorder=]storcli /cx show perfmodevaluesstorcli /cx show pistorcli /cx set pi [state=] [import=]storcli /cx show timestorcli /cx set time= storcli /cx show dsstorcli /cx set ds=OFF type=1|2|3|4storcli /cx set ds=ON type=1|2 [properties]storcli /cx set ds=ON type=3|4 DefaultLdType= [properties]storcli /cx set ds [properties] storcli /cx show safeidstorcli /cx show rehostinfostorcli /cx show pcistorcli /cx show ASOstorcli /cx set aso key= previewstorcli /cx set aso key=storcli /cx set aso transfertovaultstorcli /cx set aso rehostcompletestorcli /cx set aso deactivatetrialkeystorcli /cx set factory defaultsstorcli /cx download file= [fwtype=] [ResetNow] [nosigchk] [noverchk] [force]storcli /cx flush|flushcachestorcli /cx [start] flush|flushcache [cachecade | nytrocache | ALL]storcli /cx stop flush|flushcache cachecade|nytrocachestorcli /cx show flush|flushcache cachecade|nytrocache storcli /cx/px show storcli /cx/px show allstorcli /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= | bbuMode= |learnStartTime=[DDD HH | off] | autolearnmode= | powermode=sleep | writeaccess=sealed ] storcli /cx/cv set SCAPVPD file= VPDPage=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=