Linux系统下安装 LSI StorCLI64工具查看和管理raid卡

OS环境:CentOS 6.3/CentOS 7.1

一.可用如下命令查询服务器raid卡硬件相关信息:

[root@localhost/]#dmesg|grepraidmegaraid_sas0000:04:00.0:PCIINTA->GSI30(level,low)->IRQ30megaraid_sas0000:04:00.0:settinglatencytimerto64megaraid_sas0000:04:00.0:irq49forMSI/MSI-X[root@localhost/]#cat/proc/scsi/scsiAttacheddevices:Host:scsi4Channel:02Id:00Lun:00Vendor:LSIModel:MR9260-8iRev:2.70Type:Direct-AccessANSISCSIrevision:05#可以看出,此为LSIMR9660-8iraid卡

二.去LSI官网下载Latest MegaRAID StorCLI,Version: 1.14.12 Size: 32.4M:

下载地址:%20Controllers/RAID%20Controllers%20Common%20Files/1.14.12_StorCLI.zip

三.安装StorCLI:

ToinstallStorCLI,performthefollowingsteps:1.UnziptheStorCLIpackage.2.ToinstalltheStorCLIRPM,runtherpm-ivh<StorCLI-x.xx-x.noarch.rpm>command.3.ToupgradetheStorCLIRPM,runtherpm-Uvh<StorCLI-x.xx-x.noarch.rpm>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

四.StorCLI基本使用:

#Raid数量及当前状态[root@localhostLinux]#storclishowctrlcountStatusCode=0Status=SuccessDescription=NoneControllerCount=1#查询虚拟磁盘大小,raid结构等[root@localhostLinux]#storcli/c0/v0showController=0Status=SuccessDescription=NoneVirtualDrives:==============———————————————————-DG/VDTYPEStateAccessConsistCachesCCSizeName———————————————————-0/0RAID10OptlRWNoRWTD-1.089TB———————————————————-Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=PartiallyDegraded|dgrd=DegradedOptl=Optimal|RO=ReadOnly|RW=ReadWrite|HD=Hidden|B=Blocked|Consist=Consistent|R=ReadAheadAlways|NR=NoReadAhead|WB=WriteBack|AWB=AlwaysWriteBack|WT=WriteThrough|C=CachedIO|D=DirectIO|sCC=ScheduledCheckConsistency#可以看出此为RAID10,,一个虚拟磁盘,大小为1.089TB#查看物理硬盘[root@localhostLinux]#storcli/c0/eall/sallshowController=0Status=SuccessDescription=ShowDriveInformationSucceeded.DriveInformation:=================————————————————————————-EID:SltDIDStateDGSizeIntfMedSEDPISeSzModelSp————————————————————————-252:412Onln0558.406GBSASHDDNN512BST3600057SSU252:513Onln0558.406GBSASHDDNN512BST3600057SSU252:614Onln0558.406GBSASHDDNN512BST3600057SSU252:715Onln0558.406GBSASHDDNN512BST3600057SSU————————————————————————-EID-EnclosureDeviceID|Slt-SlotNo.|DID-DeviceID|DG-DriveGroupDHS-DedicatedHotSpare|UGood-UnconfiguredGood|GHS-GlobalHotspareUBad-UnconfiguredBad|Onln-Online|Offln-Offline|Intf-InterfaceMed-MediaType|SED-SelfEncryptiveDrive|PI-ProtectionInfoSeSz-SectorSize|Sp-Spun|U-Up|D-Down|T-Transition|F-ForeignUGUnsp-Unsupported|UGShld-UnConfiguredshielded|HSPShld-HotspareshieldedCFShld-Configuredshielded#可以看到总计有四颗硬盘,每一颗大小448.406GB,是否在线等#查看StorCLI帮助信息[root@localhostLinux]#storcli-hStorageCommandLineToolVer1.14.12Nov25,2014(c)Copyright2014,LSICorporation,AllRightsReserved.storcli-vstorcli-h|-help|?storcli-h|-help|?legacystorclishowstorclishowallstorclishowctrlcountstorclishowfile=<filepath>storcli/cxaddvdr[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|2Cbmode=0|1|2|3|4|7]storcli/cxaddvdeachr0[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|2Cbmode=0|1|2|3|4|7]storcli/cxaddVDcachecade|nytrocacher[aid][0,1,10,1EC]drives=[e:]s|[e:]s-x|[e:]s-x,y[WT|WB][assignvds=0,1,2][BOOTVOLSIZE=x]storcli/cxaddVDcachecade|nytrocacheslicer[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/exshowstorcli/cx/exshowallstorcli/cx/exshowstatusstorcli/cx/exshowphyerrorcountersstorcli/cx/vxdel[cachecade][discardcache][force]storcli/cxdeleteeventsstorcli/cxshowevents[[type=<sincereboot|sinceshutdown|includedeleted|latest=x|ccinconvd=<0,1,…>]filter=<[info],[warning],[critical],[fatal]>file=<filepath>storcli/cxshoweventloginfostorcli/cxshowhealth[all]storcli/cxdeletesecuritykeystorcli/cxsetsecuritykey=xxxxxxxx{passphrase=xxxx}{keyid=xxx}storcli/cxstartDiagDuration=<Val>storcli/cxsetsecuritykeykeyid=xxxstorcli/cxcomparesecuritykey=xxxxxxxxxxstorcli/cxsettermlog[=on|off|offthisboot]storcli/cxshowtermlog[type=config|contents]storcli/cxdeletetermlogstorcli/cxsetsecuritykey=xxxxxxxxoldsecuritykey=xxxxxxxx{passphrase=xxxx}{keyid=xxx}storcli/cxsetsesmonitoring[=on|off]storcli/cxshowsesmonitoringstorcli/cx/dxshowstorcli/cx/dallshowcachecadestorcli/cx/dxshowallstorcli/cx/dallshowmirrorstorcli/cx/dallsplitmirrorstorcli/cx/dalladdmirrorsrc=\’#'” /cxshowfreespacestorcli/cx/fallshow[all][securityKey=xxx]storcli/cx/falldel|delete[securityKey=xxx]storcli/cx/fallimport[preview][securityKey=xxx]storcli/cx/vxsetssdcaching=on|offstorcli/cx/vxsethidden=on|offstorcli/cx/dxsethidden=on|offstorcli/cx/dxsetsecurity=onstorcli/cx/vxshowexpansionstorcli/cxshowfshintingstorcli/cx/vxsetfshinting=<value>storcli/cx/vxexpandSize=<xx>[expandarray]storcli/cx[/ex]/sxshowstorcli/cx[/ex]/sxshowallstorcli/cx[/ex]/sxstartrebuildstorcli/cx[/ex]/sxstoprebuildstorcli/cx[/ex]/sxpauserebuildstorcli/cx[/ex]/sxresumerebuildstorcli/cx[/ex]/sxshowrebuildstorcli/cx[/ex]/sxshowhealthstorcli/cx[/ex]/sxshowsmartstorcli/cx[/ex]/sxstartcopybacktarget=e:sstorcli/cx[/ex]/sxstopcopybackstorcli/cx[/ex]/sxpausecopybackstorcli/cx[/ex]/sxresumecopybackstorcli/cx[/ex]/sxresetphyerrorcountersstorcli/cx[/ex]/sxshowcopybackstorcli/cx[/ex]/sxshowphyerrorcountersstorcli/cx[/ex]/sxstartinitializationstorcli/cx[/ex]/sxstopinitializationstorcli/cx[/ex]/sxshowinitializationstorcli/cx[/ex]/sxstartlocatestorcli/cx[/ex]/sxstoplocatestorcli/cx[/ex]/sxshowsecuritykeykeyidstorcli/cx[/ex]/sxaddhotsparedrive[DGs=<N|0,1,2…>][enclaffinity][nonrevertible]storcli/cx[/ex]/sxdeletehotsparedrivestorcli/cx[/ex]/sxspinupstorcli/cx[/ex]/sxspindownstorcli/cx[/ex]/sxsetonlinestorcli/cx[/ex]/sxsetofflinestorcli/cx[/ex]/sxsetmissingstorcli/cx[/ex]/sxsetjbodstorcli/cx[/ex]/sxsetsecurity=onstorcli/cx[/ex]/sxsetgood[force]storcli/cx[/ex]/sxinsertdg=Aarray=Brow=Cstorcli/cx/vxsetemulationType=0|1|2storcli/cx/vxsetcbsize=0|1|2cbmode=0|1|2|3|4|7storcli/cx/vxsetwrcache=WT|WB|AWBstorcli/cx/vxsetrdcache=RA|NoRAstorcli/cx/vxsetiopolicy=Cached|Directstorcli/cx/vxsetaccesspolicy=RW|RO|Blocked|RmvBlkdstorcli/cx/vxsetpdcache=On|Off|Defaultstorcli/cx/vxsetname=<NameString>storcli/cx/vxsetHostAccess=ExclusiveAccess|SharedAccessstorcli/cx/vxsetds=Default|Auto|None|Max|MaxNoCachestorcli/cx/vxsetautobgi=On|Offstorcli/cx/vxsetpi=Offstorcli/cx/vxshowstorcli/cx/vxshowallstorcli/cx/vxshowinitstorcli/cx/vxshowccstorcli/cx/vxshowerasestorcli/cx/vxshowmigratestorcli/cx/vxshowbgistorcli/cx/vxshowautobgistorcli/cx/vxshowtrimstorcli/cxsetconsistencycheck|cc=[off|seq|conc][delay=value]starttime=yyyy/mm/ddhh][excludevd=x-y,z]storcli/cxshowcc|consistencycheckstorcli/cxshowocrstorcli/cxsetocr=<on|off>storcli/cx/vxstartinit[Full][Force]storcli/cx/vxstarterase[simple|normal|thorough|standard][patternA=<val>][patternB=<val>]storcli/cx/vxstartcc[Force]storcli/cx/vxstartmigratetype=raidx[option=add|removedrives=[e:]s|[e:]s-x|[e:]s-x,y][Force]storcli/cx/vxstopinitstorcli/cx/vxstoperasestorcli/cx/vxstopccstorcli/cx/vxstopbgistorcli/cx/vxpauseccstorcli/cx/vxpausebgistorcli/cx/vxresumeccstorcli/cx/vxresumebgistorcli/cxshowstorcli/cxshowallstorcli/cxshowpreservedcachestorcli/cx/vxdeletepreservedcache[force]storcli/cx[/ex]/sxdownloadsrc=\’#'” /cx/exdownloadsrc=\’#'” /cx[/ex]/sxsecureerase[force]storcli/cx[/ex]/sxstarterase[simple|normal|thorough|standard|threepass][patternA=<val>][patternB=<val>]storcli/cx[/ex]/sxstoperasestorcli/cx[/ex]/sxshowerasestorcli/cx[/ex]/sxshowrawdatapageaddr=<pageaddressinhex>file=<filename>storcli/cx[/ex]/sxsetbootdrive=<on|off>storcli/cx/vxsetbootdrive=<on|off>storcli/cxshowbootdrivestorcli/cxshowbootwithpinnedcachestorcli/cxsetbootwithpinnedcache=<on|off>storcli/cxshowactivityforlocatestorcli/cxsetactivityforlocate=<on|off>storcli/cxshowcopybackstorcli/cxsetcopyback=<on|off>type=smartssd|smarthdd|allstorcli/cxshowjbodstorcli/cxsetjbod=<on|off>storcli/cxsetautorebuild=<on|off>storcli/cxsetldlimit=<default|max>storcli/cxshowautorebuildstorcli/cxsetautopdcache=<off|[on|sscr0]|r0>[immediate]storcli/cxshowautopdcachestorcli/cxshowcachebypassstorcli/cxsetcachebypass=<on|off>storcli/cxshowusefdeonlyencryptstorcli/cxsetusefdeonlyencrypt=<on|off>storcli/cxshowprcorrectunconfiguredareasstorcli/cxsetprcorrectunconfiguredareas=<on|off>storcli/cxshowbatterywarningstorcli/cxsetbatterywarning=<on|off>storcli/cxshowabortcconerrorstorcli/cxsetabortcconerror=<on|off>storcli/cxshowncqstorcli/cxshowconfigautobalancestorcli/cxsetncq=<on|off>storcli/cxsetconfigautobalance=<on|off>storcli/cxshowmaintainpdfailhistorystorcli/cxsetmaintainpdfailhistory=<on|off>storcli/cxshowrestorehotsparestorcli/cxsetrestorehotspare=<on|off>storcli/cxsetbios[state=<on|off>][Mode=<SOE|PE|IE|SME>][abs=<on|off>][DeviceExposure=<value>]storcli/cxshowbiosstorcli/cxshowalarmstorcli/cxsetalarm=<on|off|silence>storcli/cxshowforeignautoimportstorcli/cxsetforeignautoimport=<on|off>storcli/cxshowdirectpdmappingstorcli/cxsetdirectpdmapping=<on|off>storcli/cxshowrebuildratestorcli/cxsetrebuildrate=<value>storcli/cxshowloadbalancemodestorcli/cxsetloadbalancemode=<on|off>storcli/cxshoweghsstorcli/cxseteghs[state=<on|off>][eug=<on|off>][smarter=<on|off>]storcli/cxshowcacheflushintstorcli/cxsetcacheflushint=<value>storcli/cxshowprratestorcli/cxsetprrate=<value>storcli/cxshowccratestorcli/cxsetccrate=<value>storcli/cxshowbgiratestorcli/cxsetbgirate=<value>storcli/cxshowdpmstorcli/cxsetdpm=<on|off>storcli/cxshowsgpioforcestorcli/cxsetsgpioforce=<on|off>storcli/cxsetsupportssdpatrolread=<on|off>storcli/cxshowmigrateratestorcli/cxsetmigraterate=<value>storcli/cxshowspinupdrivecountstorcli/cxshowwbsupportstorcli/cxsetspinupdrivecount=<value>storcli/cxshowspinupdelaystorcli/cxsetspinupdelay=<value>storcli/cxshowcoercionstorcli/cxsetcoercion=<value>storcli/cxshowlimitMaxRateSATAstorcli/cxsetlimitMaxRateSATA=on|offstorcli/cxshowHDDThermalPollIntervalstorcli/cxsetHDDThermalPollInterval=<value>storcli/cxshowSSDThermalPollIntervalstorcli/cxsetSSDThermalPollInterval=<value>storcli/cxshowsmartpollintervalstorcli/cxsetsmartpollinterval=<value>storcli/cxshoweccbucketsizestorcli/cxseteccbucketsize=<value>storcli/cxshoweccbucketleakratestorcli/cxseteccbucketleakrate=<value>storcli/cxshowbackplanestorcli/cxsetbackplanemode=<value>expose=<on/off>storcli/cxshowperfmodestorcli/cxsetperfmode=<value>[maxflushlines=<value>numiostoorder=<value>]storcli/cxshowperfmodevaluesstorcli/cxshowpistorcli/cxsetpi[state=<on|off>][import=<on|off>]storcli/cxshowtimestorcli/cxsettime=<yyyymmddhh:mm:ss|systemtime>storcli/cxshowdsstorcli/cxsetds=OFFtype=1|2|3|4storcli/cxsetds=ONtype=1|2[properties]storcli/cxsetds=ONtype=3|4DefaultLdType=<val>[properties]storcli/cxsetds[properties]storcli/cxshowsafeidstorcli/cxshowrehostinfostorcli/cxshowpcistorcli/cxshowASOstorcli/cxsetasokey=<keyvalue>previewstorcli/cxsetasokey=<keyvalue>storcli/cxsetasotransfertovaultstorcli/cxsetasorehostcompletestorcli/cxsetasodeactivatetrialkeystorcli/cxsetfactorydefaultsstorcli/cxdownloadfile=<filepath>[fwtype=<val>][ResetNow][nosigchk][noverchk][force]storcli/cxflush|flushcachestorcli/cx[start]flush|flushcache[cachecade|nytrocache|ALL]storcli/cxstopflush|flushcachecachecade|nytrocachestorcli/cxshowflush|flushcachecachecade|nytrocachestorcli/cx/pxshowstorcli/cx/pxshowallstorcli/cx/pxsetlinkspeed=0|1.5|3|6|12storcli/cx/bbushowstorcli/cx/bbushowallstorcli/cx/bbushowstatusstorcli/cx/bbushowpropertiesstorcli/cx/bbushowlearnstorcli/cx/bbushowgasgaugeOffset=xxxxNumbytes=nstorcli/cx/bbustartlearnstorcli/cx/bbushowmodesstorcli/cx/bbuset[learnDelayInterval=<val>|bbuMode=<val>|learnStartTime=[DDDHH|off]|autolearnmode=<val>|powermode=sleep|writeaccess=sealed]storcli/cx/cvsetSCAPVPDfile=<inputfilepath>VPDPage=<SCapVPDFixed>storcli/cx/cvshowstorcli/cx/cvshowallstorcli/cx/cvshowstatusstorcli/cx/cvshowlearnstorcli/cx/cvshowSCAPVPDfile=<outputfilepath>VPDPage=<SCapVPDFixed>storcli/cx/cvstartlearnstorcli/cxshowsecuritykeykeyidstorcli/cxstartpatrolreadstorcli/cxstoppatrolreadstorcli/cxpausepatrolreadstorcli/cxresumepatrolreadstorcli/cxshowpatrolReadstorcli/cxshowpowermonitoringinfostorcli/cxshowldlimitstorcli/cxsetpatrolread={{onmode=<auto|manual>}|{off}}storcli/cxsetpatrolread[starttime=<yyyy/mm/ddhh>][maxconcurrentpd=<value>][includessds=<on|onlymixed|off>][uncfgareas=on|off]storcli/cxsetpatrolreaddelay=<value>storcli/cx[/ex]/sxshowdiagpaniclog[Query]|[ExtractSlot=x]|[EraseSlot=x][file=filepath]storcli/cx[/ex]/sxshowdiagsmartlog[file=filepath]storcli/cx[/ex]/sxshowdiagerrorlog[file=filepath]storcli/cxdelNytrocache[force]storcli/cxshowbadblocksstorcli/cxflasherasestorcli/cxshutdownstorcli/cx/mxsetmode=<Internal|External|Auto>storcli/cx/mxshowstorcli/cxtransformiMRstorcli/cxrestartstorcli/cx/vxshowBBMTstorcli/cx/vxdeleteBBMTstorcli/cx[/ex]/sxstartformat[thorough]storcli/cxshowdequeuelogfile=<filepath>storcli/cxshowmaintenancestorcli/cxsetmaintenancemode=normal|nodevicesstorcli/cxshowpersonalitystorcli/cxsetpersonality=RAID|HBAstorcli/cxshowimmediateiostorcli/cxshowdriveactivityledstorcli/cxsetimmediateio=<on|off>storcli/cxsetdriveactivityled=<on|off>Note:Use’page=[x]’asthelastoptioninallthecommandstosetthepagebreak.X=linesperpage.E.g.’storclihelppage=10′

总结:StorCLI功能强大,可以安装在多个平台下,具体安装以及使用方法,可参阅官网文档。

本文出自 “冯学伟-遇见曾经的妳” 博客,请务必保留此出处

好想从现在开始抱着你,紧紧地抱着你,一直走到上帝面前。

Linux系统下安装 LSI StorCLI64工具查看和管理raid卡

相关文章:

你感兴趣的文章:

标签云: