**
**
对LSI3008阵列卡的管理,命令用法与sas2ircu类似。提供的为可执行文件无需安装
./sas3ircu 0 locate 2:$A on
./sas3ircu -h 查看帮助信息
./sas3ircu list 查看所有RAID控制器信息
./sas3ircu 0 display 查看第一块RAID控制器、volume、物理磁盘等信息。这里数字0代表第一块RAID卡,依次类推。如果只有一块RAID卡,也是0。
./sas3ircu 0 status 查看第一块RAID控制器所有逻辑磁盘信息
./sas3ircu 0 delete noprompt 删除第一块RAID控制器上所有RAID配置
./sas3ircu 0 create raid 1 max 2:0 2:1 noprompt 在第一块RAID控制器上将第一块与第二块物理磁盘配置为RAID1,分配最大使用空间。
./sas3ircu 0 create raid10 max 2:2 2:3 2:4 2:5 2:6 2:7 2:8 2:9 2:10 2:11 noprompt 在第一块RAID控制器上将第三块到第十二块物理磁盘配置为RAID10,分配最大使用空间。(注意:LSI SAS3008最多支持2个RAID,单个RAID中最多支持10个硬盘。所有的RAID包含的硬盘总量最多14个,剩余硬盘只能以独立的“Physical drive”方式被LSI SAS3008管理。)
./sas3ircu 0 bootir 286 设置Volume ID号为286的RAID组为预先可引导模式
./sas3ircu 0 hotspare 2:10 配置第11块物理硬盘为热备
./sas3ircu 0 hotspare delete 2:10 删除热备硬盘
./sas3ircu 0 logir 上传或清除日志信息
**
**
适用于PMC阵列卡
1.查看controller和硬盘信息:arcconf getconfig
例:arcconf getconfig 1 查看controller 1的信息,
arcconf getconfig 1 pd 查看controller 1上连接HDD的信息,可以确认HDD槽位
2.创建RAID:arcconf create logicaldrive
例:arcconf create 1 logicaldrive max 1 0 0 0 1 在controller 1上用0 0和0 1槽位上的HDD组RAID1,size为最大可用容量,如需指定大小,把max改成对应的大小即可
3.删除RAID:arcconf delete logicaldrive
例:arcconf delete 1 logicaldrive 0 删除controller 1上的array 0
4.定位硬盘:arcconf identify device
例:arcconf identify 1 device 0 0命令定位controller 1上0 0槽位的硬盘
5.设置controller的模式(HBA/RAID/Mixed):arcconf setcontrollermode (2-HBA,3-RAID,5-Mixed)
例:arcconf setcontrollermode 1 5 把controller 1设置为Mixed模式
6.更新FW:arcconf romupdate
例:arcconf romupdate 1 Luxorc.bin
组Raid 0: arcconf create 1 logicaldrive max 0 0 0
组Raid 1: arcconf create 1 logicaldrive max 1 0 0 0 1
组Raid 5: arcconf create 1 logicaldrive max 5 0 0 0 1 0 2
清Raid: arcconf delete 1 logicaldrive 0 删除controller 1上的array 0 arcconf delete 1 logicaldrive all 删除controller 1上的所有array
**
**
1 storcli64 -h # 查看帮助信息
2 storcli64 show # 查看RAID卡、系统内核、主机名等信息
3 storcli64 /c0 show all # 查看第一块RAID卡版本、功能、状态、以及raid卡下的物理磁、逻辑盘信息。c0代表第一块raid卡,如果有多块则命令以此类推。
4 storcli64 /c0 show freespace # 查看第一块RAID卡剩下的磁盘空间
5 storcli64 /c0 show rebuildrate # 查看第一块RAID卡rebuildrate速度
6 storcli64 /c0 download file=mr3108fw.rom # 升级第一块RAID卡固件
7 storcli64 /c0 restart # 升级固件后重启RAID卡以便新固件及时生效
8 storcli64 /c0 flushcache # 清除第一块RAID卡缓存
9 storcli64 /c0 /eall /sall show all # 查看第一块RAID卡上物理磁盘详细信息
10 storcli64 /c0 /e252 /s0 start locate # 定位第一块RAID上某块物理磁盘,物理磁盘的绿色的定位灯会闪烁。 e代表Enclosure,s代表Slot或PD
11 storcli64 /c0 /ex /sx stop locate # 停止定位,定位灯停止闪烁。
12 storcli64 /c0 /e252 /sall show rebuild # 查看磁盘重建进度
13 storcli64 /c0 /ex /sx start rebuild # 开始重建
14 storcli64 /c0 /ex /sx stop rebuild # 停止重建
15 storcli64 /c0 /ex /sx add hostsparedrive dgs=0 # 设置某块物理磁盘为磁盘组0的热备盘,如果不指定dgs,则为该RAID卡上全局热备盘。
16 storcli64 /c0 /ex /sx delete hostsparedrive # 删除热备磁盘
17 storcli64 /c0 add vd each type=raid0 drives=252:0,1,2,3 # 单独为每一块物理磁盘创建raid0
18 storcli64 /c0 add vd type=raid5 size=all names=tmp1 drives=32:2-4 # 由第3、4、5块物理磁盘来构建RAID5,分配所有空间的逻辑磁盘命名tmp1。
19 storcli64 /c0 add vd type=raid10 size=all names=tmp1 drives=32:0-3 pdperarray=2 # 由前四块物理磁盘构建raid10,分配所有空间的逻辑磁盘命名为tmp1。(注意:LSI SAS3108最多支持64个RAID,创建10/50/60时,必须指定pdperarray参数。如果没有这个参数,是创建不成功的。这个参数的含义是:Specifies the number of physical drives per array. The default value is automatically chosen。)
20 storcli64 /c0 add vd type=raid10 size=100GB,200GB names=tmp1,tmp2 drives=32:0-3 pdperarray=2 # 由前四块物理磁盘构建raid10,分别分配多个逻辑磁盘。
21 storcli64 /c0 add vd type=raid10 size=all names=tmp3 drives=32:0-3 pdperarray=2 # 剩下的所有空间分配给逻辑磁盘tmp3。
22 storcli64 /c0 /vall show all # 显示第一块RAID卡上所有逻辑磁盘相关信息,也可指定某个逻辑磁盘v0,v1等等。
23 storcli64 /c0 /v0 show # 显示第一块RAID卡上第一个逻辑磁盘信息
24 storcli64 /c0 /v0 del force # 强制删除某个逻辑磁盘
25 storcli64 /c0 /bbu show all # 显示bbu信息
26 storcli64 /c0 /vall set wrcache=wt/wb/awb # 设置写策略
27 storcli64 /c0 show alarm # 查看报警器信息
28 storcli64 /c0 set alarm=silence # 暂时关闭报警器鸣叫
29 storcli64 /c0 set alarm=off # 始终关闭报警器鸣叫
30 storcli64 /c0 /e252 /s3 set good # 改变插入的物理磁盘的状态
31 storcli64 /c0 /e252 /s3 start initialization # 初始化某个物理磁盘
32 storcli64 /c0 /e252 /s3 show initialization # 查看某个初始化的物理磁盘进度
33 storcli64 /c0 /v0 set wrcache=wt # 修改vd的写策略
34 storcli64 /c0 /v0 set rdcache=nora # 修改vd的读策略
35 storcli64 /c0 /fall show # 查看foreign信息
36 storcli64 /c0 /fall import # 导入foreign
37 storcli64 /c0 show termlog type=contents # 在线查看日志
38 storcli64 /c0 show termlog type=contents | grep "rebuild" # 在线查看日志抽取关键字
39 storcli64 /c0 show events file=/home/eventreports # 将日志存储为文件
**
**
MegaCli -PDList -aAll
MegaCli -PDList -aAll | grep -E “Slot Number|Device Id| Sequence Number| Fireware state”
./MegaCli64 -cfgdsply -aALL | grep -v Information | grep -E “Virtual|Slot”
./MegaCli64 -LDInfo -Lall -aALL | grep -E “VirtualDrive:|RAIDLevel”
/opt/MegaRAID/MegaCli# ./MegaCli64 -PdLocate -start -physdrv[1:0] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp -EnableJBOD -0 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp -EnableJBOD -1 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDOffline -PhysDrv [1:4] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDOnline -PhysDrv [1:4] -a0
./MegaCli64 -PDRbld -ShowProg -PhysDrv[14:13] -a0
#/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r1 [252:0,252:1] WB NORA Direct CachedBadBBU -strpsz64 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r1 [252:0,252:1,252:2,252:3,252:4,252:5,252:6,252:7] WB NORA Direct CachedBadBBU -strpsz64 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r5 [1:2,1:3,1:4] WB Direct -a0
/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgEachDskRaid0 WB Cached CachedBadBBU -strpsz64 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgEachDskRaid0 WB -strpsz64 -a0
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -Lall -force -aall
/opt/MegaRAID/MegaCli/MegaCli64 -DiscardPreservedCache -Lall -aALL
/opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -scan -a0
/opt/MegaRAID/MegaCli/MegaCli64 -cfgforeign -clear -a0
将JBOD转unconfigured good状态,确认要这样做再执行,会造成该盘的数据丢失
megacli64 -PDMakeGood -PhysDrv[0:5] -a0
#/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -Lall -aALL
/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aALL
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -aAll
#/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL 查看raid卡日志
#/opt/MegaRAID/MegaCli/MegaCli64 -adpCount 【显示适配器个数】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime –aALL 【显示适配器时间】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpAllInfo -aAll 【显示所有适配器信息】
#/opt/MegaRAID/MegaCli/MegaCli64 -LDInfo -LALL -aAll 【显示所有逻辑磁盘组信息】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL |grep ‘Charger Status’ 【查看充电状态】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuStatus -aALL【显示BBU状态信息】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuCapacityInfo -aALL【显示BBU容量信息】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuDesignInfo -aALL 【显示BBU设计参数】
#/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL 【显示当前BBU属性】
3.磁带状态的变化,从拔盘,到插盘的过程中。
Device |Normal|Damage|Rebuild|Normal
Virtual Drive |Optimal|Degraded|Degraded|Optimal
Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online
4.查看磁盘缓存策略
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L0 -a0
or
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -L1 -a0
or
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -a0
ro
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -Cache -LALL -aALL
ro
#/opt/MegaRAID/MegaCli/MegaCli64 -LDGetProp -DskCache -LALL -aALL
5.设置磁盘缓存策略
缓存策略解释:
WT (Write through
WB (Write back)
NORA (No read ahead)
RA (Read ahead)
ADRA (Adaptive read ahead)
Cached
Direct
例子:
#/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp WT|WB|NORA|RA|ADRA -L0 -a0
or
#/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -Cached|-Direct -L0 -a0
or
enable / disable disk cache
#/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -EnDskCache|-DisDskCache -L0 -a0
6.创建一个 raid5 阵列,由物理盘 2,3,4 构成,该阵列的热备盘是物理盘 5
7.创建阵列,不指定热备
8.删除阵列
#/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdDel -L1 -a0
9.在线添加磁盘
#/opt/MegaRAID/MegaCli/MegaCli64 -LDRecon -Start -r5 -Add -PhysDrv[1:4] -L1 -a0
10.阵列创建完后,会有一个初始化同步块的过程,可以看看其进度。
#/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ShowProg -LALL -aALL
或者以动态可视化文字界面显示
#/opt/MegaRAID/MegaCli/MegaCli64 -LDInit -ProgDsply -LALL -aALL
11.查看阵列后台初始化进度
#/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ShowProg -LALL -aALL
或者以动态可视化文字界面显示
#/opt/MegaRAID/MegaCli/MegaCli64 -LDBI -ProgDsply -LALL -aALL
13.指定为某个阵列的专用热备
#/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Set [-Dedicated [-Array1]] [-EnclAffinity] [-nonRevertible] -PhysDrv[1:5] -a0
14.删除全局热备
#/opt/MegaRAID/MegaCli/MegaCli64 -PDHSP -Rmv -PhysDrv[1:5] -a0
磁带状态的变化,从拔盘,到插盘的过程中:
Device |Normal|Damage|Rebuild|Normal
Virtual Drive |Optimal|Degraded|Degraded|Optimal
Physical Drive |Online|Failed –> Unconfigured|Rebuild|Online