查看RAID卡ID
命令功能
查看LSI SAS3108RAID卡的ID。
命令格式
storcli64 show
使用实例
# 查看LSI SAS3108RAID卡的ID。
[root@localhost ~]# ./storcli64 show CLI Version = 007.0409.0000.0000 Nov 06, 2017 Operating system = Linux3.10.0-693.el7.x86_64 Status Code = 0 Status = Success Description = None Number of Controllers = 1 Host Name = localhost.localdomain Operating System = Linux3.10.0-693.el7.x86_64 StoreLib IT Version = 07.0500.0200.0300 StoreLib IR3 Version = 15.02-0 System Overview : =============== -------------------------------------------------------------------- Ctl Model Ports PDs DGs DNOpt VDs VNOpt BBU sPR DS EHS ASOs Hlth -------------------------------------------------------------------- 0 SAS3108 8 3 0 0 0 0 Msng Off - Y 3 Opt -------------------------------------------------------------------- Ctl=Controller Index|DGs=Drive groups|VDs=Virtual drives|Fld=Failed PDs=Physical drives|DNOpt=DG NotOptimal|VNOpt=VD NotOptimal|Opt=Optimal Msng=Missing|Dgd=Degraded|NdAtn=Need Attention|Unkwn=Unknown sPR=Scheduled Patrol Read|DS=DimmerSwitch|EHS=Emergency Hot Spare Y=Yes|N=No|ASOs=Advanced Software Options|BBU=Battery backup unit Hlth=Health|Safe=Safe-mode boot
回显信息中的“Ctl”一列所对应的数字即为RAID卡的ID,如上述回显信息中表明该RAID卡的ID为“0”。
查询和设置Spinup参数
命令功能
查询和设置每组起转硬盘间的时间间隔以及上电时允许同时起转的硬盘数量。
命令格式
storcli64 /ccontroller_id show spinupdelay
storcli64 /ccontroller_id show spinupdrivecount
storcli64 /ccontroller_id set spinupdelay=time
storcli64 /ccontroller_id set spinupdrivecount=count
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
time |
每组起转硬盘间的时间间隔 |
默认为2,单位为s。 |
count |
上电时允许同时起转的硬盘数量 |
默认为4。 |
使用指南
建议保持默认配置。
使用实例
# 查询RAID卡Spinup参数。
domino:~# ./storcli64 /c0 show spinupdelay Controller = 0 Status = Success Description = None Controller Properties: ===================== -------------------------- Ctrl_Prop Value -------------------------- Spin Up Delay 2 second(s) -------------------------- domino:~# ./storcli64 /c0 show spinupdrivecount Controller = 0 Status = Success Description = None Controller Properties: ===================== -------------------------- Ctrl_Prop Value -------------------------- Spin Up Drive Count 4 --------------------------
# 设置RAID卡“spinupdelay”为“20s”,设置“spinupdrivecount”为“5”。
domino:~# ./storcli64 /c0 set spinupdelay=20 Controller = 0 Status = Success Description = None Controller Properties: ===================== -------------------------- Ctrl_Prop Value -------------------------- Spin Up Delay 20 second(s) -------------------------- domino:~# ./storcli64 /c0 set spinupdrivecount=5 Controller = 0 Status = Success Description = None Controller Properties: ===================== -------------------------- Ctrl_Prop Value -------------------------- Spin Up Drive Count 5 --------------------------
设置硬盘PowerSave功能
命令功能
设置空闲硬盘和热备盘的省电模式。
命令格式
storcli64 /ccontroller_id set ds= state type= disktype spindowntime= time
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID。 |
– |
state |
省电模式的启用状态。 |
|
disktype |
硬盘类型。 |
|
time |
等待时间,硬盘经过等待时间没有IO,则停转进入休眠状态。 |
单位为minutes。 |
使用指南
无
使用实例
# 设置空闲硬盘的省电模式。
domino:~# ./storcli64 /c0 set ds=on type=1 spindowntime=30 Controller = 0 Status = Success Description = None Controller Properties: ===================== -------------------------- Ctrl_Prop Value -------------------------- SpnDwnUncDrv Enable SpnDwnTm 30 minutes --------------------------
查询和设置物理硬盘初始化功能
命令功能
设置物理硬盘初始化功能,查询初始化进度。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id action initialization
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
action |
要执行的操作 |
|
使用指南
无
使用实例
# 初始化slot3硬盘,并查询初始化进度。
domino:~# ./storcli64 /c0/e252/s3 start initialization Controller = 0 Status = Success Description = Start Drive Initialization Succeeded. domino:~# ./storcli64 /c0/e252/s3 show initialization Controller = 0 Status = Success Description = Show Drive Initialization Status Succeeded. ------------------------------------------------------ Drive-ID Progress% Status Estimated Time Left ------------------------------------------------------ /c0/e252/s3 0 In progress 0 Seconds ------------------------------------------------------
查询和设置硬盘数据擦除功能
命令功能
设置物理硬盘数据擦除模式,查询擦除进度。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id show erase
storcli64 /ccontroller_id/eenclosure_id/sslot_id stop erase
storcli64 /ccontroller_id/eenclosure_id/sslot_id start erase mode
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
mode |
数据擦除模式 |
|
使用指南
无
使用实例
# 对slot 3硬盘进行simple数据擦除,并查询擦除进度。
domino:~# ./storcli64 /c0/e252/s3 start erase simple Controller = 0 Status = Success Description = Start Drive Erase Succeeded. domino:~# ./storcli64 /c0/e252/s3 show erase Controller = 0 Status = Success Description = Show Drive Erse Status Succeeded. ------------------------------------------------------ Drive-ID Progress% Status Estimated Time Left ------------------------------------------------------ /c0/e252/s3 0 In progress 0 Seconds ------------------------------------------------------ domino:~# ./storcli64 /c0/e252/s3 stop erase Controller = 0 Status = Success Description = Stop Drive Erase Succeeded.
设置后台资源占用率
命令功能
设置后台初始化速率、一致性检查速率、硬盘巡检速率、RAID重构速率、RAID扩容和迁移速率等。
命令格式
storcli64 /ccontroller_id set action=value
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
action |
要设置的项目 |
|
value |
后台任务资源占用率 |
1~100 |
使用指南
无
使用实例
# 设置硬盘巡检速率为“30%”。
domino:~# ./storcli64 /c0 set prrate=30 Controller = 0 Status = Success Description = None Controller Properties : ===================== ----------------------- Ctrl_Prop Value ----------------------- Patrol Read Rate 30% -----------------------
设置BIOS Stop on Error功能
命令功能
设置控制器BIOS在检测到异常时停止继续启动的功能。
命令格式
storcli64 /ccontroller_id set bios mode=action
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
action |
要执行的操作 |
|
使用指南
无
使用实例
# 开启Stop on error功能。
domino:~# ./storcli64 /c0 set bios mode=soe Controller = 0 Status = Success Description = None Controller Properties : ===================== ---------------- Ctrl_Prop Value ---------------- BIOS Mode SOE ----------------
创建和删除RAID
命令功能
创建、删除RAID。
命令格式
storcli64 /ccontroller_id add vd rlevel size=capacity drives=enclosure_id:startid-endid
storcli64 /ccontroller_id/vraid_id del
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
level |
要配置的RAID级别 |
可为0、1、5、6、10、50、60,数字分别代表对应的RAID级别。 |
capacity |
要配置的RAID容量 |
– |
capacity |
要配置的RAID容量 |
– |
startid-endid |
要加入RAID的硬盘的起始和结束ID |
– |
raid_id |
要删除的RAID的ID |
– |
使用指南
无
使用实例
# 创建RAID 0。
domino:~# ./storcli64 /c0 add vd r0 size=100GB drives=252:0-3 Controller = 0 Status = Success Description = Add VD Succeeded
# 删除RAID。
domino:~# ./storcli64 /c0/v0 del Controller = 0 Status = Success Description = Delete VD Succeeded
相关操作
查看RAID卡ID的方法请参见查看RAID卡ID。
设置RAID组的Cache读写属性
命令功能
设置RAID组的Cache读写属性。
命令格式
storcli64 /ccontroller_id/vraid_id set wrcache=mode
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
raid_id |
待设置的RAID的ID |
– |
mode |
Cache读写模式 |
|
使用指南
无
使用实例
# 设置Cache读写模式为“wt”。
domino:~# ./storcli64 /c0/v0 set wrcache=wt Controller = 0 Status = Success Description = None Details Status : ============== --------------------------------------- VD Property Value Status ErrCd ErrMsg --------------------------------------- 0 wrCache WT Success 0 - ---------------------------------------
设置RAID访问策略
命令功能
设置RAID的读写策略。
命令格式
storcli64 /ccontroller_id/vraid_id set accesspolicy=mode
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
raid_id |
待设置的RAID的ID |
– |
mode |
RAID读写策略 |
|
使用指南
无
使用实例
# 设置RAID读写策略为“rw”。
domino:~# ./storcli64 /c0/v0 set accesspolicy=rw Controller = 0 Status = Success Description = None Details Status : ============== --------------------------------------- VD Property Value Status ErrCd ErrMsg --------------------------------------- 0 AccPolicy RW Success 0 - ---------------------------------------
设置RAID前台初始化
命令功能
设置RAID前台初始化模式。
命令格式
storcli64 /ccontroller_id/vraid_id start mode
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
raid_id |
待设置的RAID的ID |
– |
mode |
前台初始化模式 |
|
使用指南
无
使用实例
# 快速初始化RAID。
domino:~# ./storcli64 /c0/v0 start init Controller = 0 Status = Success Description = Start INIT Operation Success
查询和设置RAID后台初始化
命令功能
暂停、继续和停止RAID后台初始化,以及查看后台初始化进度。
命令格式
storcli64 /ccontroller_id/vraid_id action bgi
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
raid_id |
待设置的RAID的ID |
– |
action |
后台初始化的操作 |
|
使用指南
无
使用实例
# 查看后台初始化进度。
domino:~# ./storcli64 /c0/v0 show bgi Controller = 0 Status = Success Description = Noe VD Operation Status : =================== ------------------------------------------------------ VD Operation Progress% Staus Estimated Time Left ------------------------------------------------------ 0 BGI 3 In progress 53 Minutes ------------------------------------------------------
设置启动项
命令功能
设置虚拟磁盘或物理硬盘为启动项。
命令格式
storcli64 /ccontroller_id/vvd_id set bootdrive=on
storcli64 /ccontroller_id/eenclosure_id/sslot_id set bootdrive=on
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
vd_id |
待设置的虚拟磁盘的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
使用指南
无
使用实例
# 设置VD0为启动项。
domino:~# ./storcli64 /c0/v0 set bootdrive=on Controller = 0 Status = Success Description = Noe Detailed Status : =============== ---------------------------------------- VD Property Value Staus ErrCd ErrMsg ---------------------------------------- 0 Boot Drive On Success 0 - ----------------------------------------
# 设置slot 7硬盘为启动项。
domino:~# ./storcli64 /c0/e252/s7 set bootdrive=on Controller = 0 Status = Success Description = Noe Controller Properties : ===================== ------------------- Ctrl_Prop Value ------------------- BootDrive PD:252_7 -------------------
设置紧急热备功能
命令功能
设置是否启用紧急热备功能,并设置SMART Error时是否启动紧急热备功能。
命令格式
storcli64 /ccontroller_id set eghs eug=state
storcli64 /ccontroller_id set eghs smarter=state
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
RAID卡的ID |
– |
state |
紧急热备功能的启用状态 |
|
使用指南
无
使用实例
# 开启紧急热备功能,并允许硬盘在SMART Error时使用紧急热备功能。
domino:~# ./storcli64 /c0 set eghs eug=on Controller = 0 Status = Success Description = None Controller Properties : ===================== ------------------ Ctrl_Prop Value ------------------ EmergencyUG ON ------------------ domino:~# ./storcli64 /c0 set eghs smarter=on Controller = 0 Status = Success Description = None Controller Properties : ===================== ----------------------- Ctrl_Prop Value ----------------------- EmergencySmarter ON -----------------------
设置热备盘
命令功能
设置全局热备盘和局部热备盘。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id add hotsparedrive [dgs=vd_id]
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
vd_id |
局部热备盘所属虚拟磁盘的ID |
– |
使用指南
无
使用实例
# 设置slot 3硬盘为全局热备盘。
domino:~# ./storcli64 /c0/e252/s3 add hotsparedrive Controller = 0 Status = Success Description = Add Hot Spare Succeeded.
# 设置slot 3硬盘为vd0的局部热备盘。
domino:~# ./storcli64 /c0/e252/s3 add hotsparedrive dgs=0 Controller = 0 Status = Success Description = Add Hot Spare Succeeded.
查询和设置RAID重构/回拷/系统巡检功能
命令功能
暂停、继续、停止RAID重构/回拷/系统巡检,并查询进度。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id action function
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
action |
要执行的操作 |
|
function |
要处理的进程 |
|
使用指南
无
使用实例
# 查看RAID重构进度。
domino:~# ./storcli64 /c0/e252/s4 show rebuild Controller = 0 Status = Success Description = Show Drive Rebuild Status Succeeded. ------------------------------------------------------ Drive-ID Progress% Staus Estimated Time Left ------------------------------------------------------ /c0/e252/s4 9 In progress 12 Minutes ------------------------------------------------------
# 暂停RAID重构。
domino:~# ./storcli64 /c0/e252/s4 pause rebuild Controller = 0 Status = Success Description = Pause Drive Rebuild Status Succeeded.
设置Smart扫描周期
命令功能
设置Smart扫描周期。
命令格式
storcli64 /ccontroller_id set smartpollinterval=value
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
value |
Smart扫描周期 |
单位为s。 |
使用指南
无
使用实例
# 设置Smart扫描周期为“60s”。
domino:~# ./storcli64 /c0 set smartpollinterval=60 Controller = 0 Status = Success Description = None Controller Properties : ===================== ------------------------------- Ctrl_Prop Value ------------------------------- SmartPollInterval 60 second(s) -------------------------------
通过增加成员盘可用容量扩容RAID
命令功能
在RAID未占用成员硬盘全部容量时,可通过调整RAID的可用空间,扩大RAID容量。
命令格式
storcli64 /ccontroller_id/vvd_id expand size=capacity
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
vd_id |
要扩容的RAID的ID |
– |
capacity |
扩容后的容量 |
– |
使用指南
无
使用实例
# 将VD0的容量扩大至“200GB”。
domino:~# ./storcli64 /c0/v0 expand size=200GB Controller = 0 Status = Success Description = expansion operation succeeded. EXPANSION RESULT : ================ -------------------------------------------------------------------------------- VD Size FreSpc ReqSize AbsUsrSz %FreSpc NewSize Statsu NoArrExp -------------------------------------------------------------------------------- 0 100.0 GB 457.861 GB 200.0 GB 201.458 GB 44 301.458 GB - 457.861 GB -------------------------------------------------------------------------------- Size - Current VD size|FreSpc - Freespace available before expansion %FreSpc - Requested expansion size in % of available free space AbsUsrSz - User size rounded to nearest %
向RAID组增加硬盘来进行扩容的方法请参见通过增加新盘扩容或扩容后迁移RAID。
通过增加新盘扩容或扩容后迁移RAID
命令功能
在已存在的RAID中添加新硬盘,扩大RAID容量。
当增加新盘后,可进行RAID级别迁移。
命令格式
storcli64 /ccontroller_id/vvd_id start migrate type=rlevel option=add drives=enclosure_id:slot_id
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
vd_id |
要操作的RAID的ID |
– |
slot_id |
要加入RAID的新硬盘的槽位号 |
– |
level |
增加硬盘后RAID的级别 |
|
使用指南
无
使用实例
# 在RAID 0中增加slot 2硬盘扩容。
domino:~# ./storcli64 /c0/v0 start migrate type=r0 option=add drives=252:2 Controller = 0 Status = Success Description = Start MIGRATE Operation Success. domino:~# ./storcli64 /c0/v0 show migrate Controller = 0 Status = Success Description = None VD Operation Status : =================== ------------------------------------------------------- VD Operation Progress% Status Estimated Time Left ------------------------------------------------------- 0 Migrate 1 In progress 13 Minutes -------------------------------------------------------
# 单盘RAID 0加盘迁移至RAID 1。
domino:~# ./storcli64 /c0/v0 start migrate type=r1 option=add drives=252:3 Controller = 0 Status = Success Description = Start MIGRATE Operation Success. domino:~# ./storcli64 /c0/v0 show migrate Controller = 0 Status = Success Description = None VD Operation Status : =================== ------------------------------------------------------- VD Operation Progress% Status Estimated Time Left ------------------------------------------------------- 0 Migrate 1 In progress 14 Minutes -------------------------------------------------------
通过增加成员盘可用容量扩容RAID的方法请参见通过增加成员盘可用容量扩容RAID。
查询和清除PreservedCache数据
命令功能
查询和清除PreservedCache数据。
命令格式
storcli64 /ccontroller_id show preservedcache
storcli64 /ccontroller_id/vvd_id delete preservedcache force
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
vd_id |
要操作的RAID的ID |
– |
使用指南
无
使用实例
# 查询PreservedCache。
domino:~# ./storcli64 /c0 show preservedcache Controller = 0 Status = Success Description = No Virtual Drive has Preserved Cache Data.
设置一致性检查参数
命令功能
设置一致性检查参数。
命令格式
storcli64 /ccontroller_id[/vvd_id]show cc
storcli64 /ccontroller_id/vvd_id start cc force
storcli64 /ccontroller_id/vvd_id action cc
storcli64 /ccontroller_id set cc=comc delay=value starttime=time excludevd=evd_id
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
vd_id |
要操作的RAID的ID |
– |
action |
要执行的操作 |
|
value |
一致性检查周期 |
– |
time |
一致性检查起始时间 |
例如:2016/07/14 22:00:00 |
evd_id |
不进行一致性检查的虚拟磁盘ID |
– |
使用指南
show命令中不带/vvd_id时,表示查询自动CC参数。
show命令中带/vvd_id时,表示查询CC进度。
使用实例
# 设置一致性自动检查参数。
domino:~# ./storcli64 /c0 set cc=conc delay=1 starttime=2016/07/14 22:00:00 excludevd=0 Controller = 0 Status = Success Description = None Controller Properties : ===================== ------------------------------------ Ctrl_Prop Value ------------------------------------ CC Mode CONC CC delay 1 CC Starttime 2016/07/14 22:00:00 CC ExcludeVD(0) Success ------------------------------------
# 查询CC进度。
domino:~# ./storcli64 /c0/v1 show cc Controller = 0 Status = Success Description = None VD Operation Status : =================== ----------------------------------------------------------- VD Operation Progress% Status Estimited Time Left ----------------------------------------------------------- 0 CC - Not in progress -
查询和设置Patrolread参数
命令功能
查询和设置系统巡检的相关参数。
命令格式
storcli64 /ccontroller_id set patrolread starttime=time maxconcurrentpd=number
storcli64 /ccontroller_id set patrolread delay=delaytime
storcli64 /ccontroller_id show patrolread
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
time |
系统巡检起始时间 |
例如:2016/07/15 23:00:00 |
number |
可同时巡检的硬盘数量 |
– |
delaytime |
系统巡检周期 |
单位为hour。 |
使用指南
无
使用实例
# 设置patrolread的起始时间为“2016/07/15 23:00:00”,同时巡检的硬盘数为“2”。
domino:~# ./storcli64 /c0 set patrolread starttime=2016/07/15 23:00:00 maxconcurrentpd=2 Controller = 0 Status = Success Description = None Controller Properties : ===================== --------------------------------------- Ctrl_Prop Value --------------------------------------- PR Starttime 2016/07/15 23:00:00 PR MaxConcurrentPd 2 ---------------------------------------
# 查询patrolread信息。
domino:~# ./storcli64 /c0 show patrolread Controller = 0 Status = Success Description = None Controller Properties : ===================== -------------------------------------------- Ctrl_Prop Value -------------------------------------------- PR Mode 2016/07/15 23:00:00 PR Execution Delay PR iterations completed 0 PR Next Start time 07/16/2016,00:00:00 PR on SSD Disabled PR Current State Stopped --------------------------------------------
查询和设置CacheFlush参数
命令功能
查询和设置Cache的刷新周期。
命令格式
storcli64 /ccontroller_id show cacheflushint
storcli64 /ccontroller_id set cacheflushint time
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
time |
Cache的刷新周期 |
单位为s |
使用指南
无
使用实例
# 设置Cache的刷新周期为“10”。
domino:~# ./storcli64 /c0 set cacheflushint=10 Controller = 0 Status = Success Description = None Controller Properties : ===================== --------------------------- Ctrl_Prop Value --------------------------- Cache Flush Interval 10 sec ---------------------------
# 查询Cache的刷新周期。
domino:~# ./storcli64 /c0 show cacheflushint Controller = 0 Status = Success Description = None Controller Properties : ===================== --------------------------- Ctrl_Prop Value --------------------------- Cache Flush Interval 10 ---------------------------
设置硬盘直通功能
命令功能
设置RAID卡的硬盘直通功能的使能情况,并指定直通硬盘。
命令格式
storcli64 /ccontroller_id set jbod=state
storcli64 /ccontroller_id/eenclosure_id/sslot_id set JBOD
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
state |
RAID卡JBOD功能的使能情况 |
|
使用指南
无
使用实例
# 使能RAID卡的硬盘直通功能,并设置slot 7硬盘为直通盘。
domino:~# ./storcli64 /c0 set jbod=on Controller = 0 Status = Success Description = None Controller Properties : ===================== ---------------- Ctrl_Prop Value ---------------- JBOD ON ---------------- domino:~# ./storcli64 /c0/e252/s7 set JBOD Controller = 0 Status = Success Description = Set Drive JBOD Succeeded.
设置硬盘状态
命令功能
强制设置硬盘状态。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id set state
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
state |
要设置的硬盘状态 |
|
使用指南
无
使用实例
# 将“Unconfigured Bad”状态下的slot 1硬盘设置为“Unconfigured Good”状态。
domino:~# ./storcli64 /c0/e0/s1 set good force Controller = 0 Status = Success Description = Set Drive Good Succeeded.
设置硬盘定位指示灯状态
命令功能
点亮和熄灭指定硬盘的定位指示灯。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id action locate
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
可以为all,表示点亮所有Enclosure下属的硬盘的定位指示灯。 |
slot_id |
硬盘槽位号 |
可以为all,表示点亮Enclosure下属的所有硬盘的定位指示灯。 |
action |
要执行的操作 |
|
使用指南
无
使用实例
# 点亮slot 7硬盘的定位指示灯。
domino:~# ./storcli64 /c0/e252/s7 start locate Controller = 0 Status = Success Description = Start Drive Locate Succeeded.
查询RAID卡/RAID组/物理硬盘信息
命令功能
查询RAID卡、虚拟磁盘、物理硬盘的详细信息。
命令格式
storcli64 /ccontroller_id show
storcli64 /ccontroller_id/eenclosure_id/sslot_id show all
storcli64 /ccontroller_id/vvd_id show all
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
可以为all,表示查询所有硬盘信息。 |
vd_id |
虚拟磁盘ID |
可以为all,表示查询所有虚拟磁盘信息。 |
使用指南
回显中主要字段的含义如表8-74所示。
命令格式 |
字段 |
含义 |
举例 |
---|---|---|---|
storcli64 /ccontroller_id show |
Product Name |
RAID卡的型号 |
sas3108 |
FW Version |
RAID卡的FW版本 |
4.660.00-8140 |
|
Driver Name |
RAID卡的驱动名称 |
megaraid_sas |
|
Driver Version |
RAID卡的驱动版本 |
06.811.02.00-rh1 |
|
Current Personality |
RAID卡的工作模式 |
RAID-Mode |
|
storcli64 /ccontroller_id/eenclosure_id/sslot_id showall |
SN |
物理硬盘的序列号 |
PHWL517601YR800RGN |
Manufacturer Id |
物理硬盘的供应商ID |
ATA |
|
Model Number |
物理硬盘的模块序号 |
INTEL SSDSC2BB800G4 |
|
Firmware Revision |
物理硬盘的FW版本 |
D2010370 |
|
Raw size |
物理硬盘的容量 |
745.211 GB [0x5d26ceb0 Sectors] |
|
Logical Sector Size |
物理硬盘逻辑分区大小 |
512B |
|
Physical Sector Size |
物理扇区大小 |
4 KB |
|
storcli64 /ccontroller_id/vvd_id show all
|
TYPE |
RAID组的级别 |
RAID1 |
State |
RAID组的状态 |
Optl |
|
Access |
RAID组数据的访问策略 |
RW |
|
Cache |
RAID组当前的读写策略与IO Policy |
RWTD |
|
Size |
RAID组的大小 |
100.0 GB |
|
PDs for VD0 |
RAID组下的物理硬盘 |
- |
|
Strip Size |
RAID组的条带大小 |
256KB |
|
Write Cache(initial setting) |
RAID组Cache的写策略 |
Write Through |
|
Disk Cache Policy |
RAID组成员盘的Cache策略 |
Disk's Default |
使用实例
#查询RAID卡的详细信息。
[root@localhost ~]# ./storcli64 /c0 show Generating detailed summary of the adapter, it may take a while to complete. CLI Version = 007.0409.0000.0000 Nov 06, 2017 Operating system = Linux3.10.0-514.el7.x86_64 Controller = 0 Status = Success Description = None Product Name = SAS3108 Serial Number = SAS Address = 50030130f0900000 PCI Address = 00:01:00:00 System Time = 07/07/2018 22:06:42 Mfg. Date = 00/00/00 Controller Time = 07/07/2018 14:06:41 FW Package Build = 24.16.0-0093 BIOS Version = 6.32.02.0_4.17.08.00_0x06150500 FW Version = 4.660.00-8140 Driver Name = megaraid_sas Driver Version = 06.811.02.00-rh1 Current Personality = RAID-Mode Vendor Id = 0x1000 Device Id = 0x5D SubVendor Id = 0x19E5 SubDevice Id = 0xD207 Host Interface = PCI-E Device Interface = SAS-12G Bus Number = 1 Device Number = 0 Function Number = 0 Drive Groups = 1 TOPOLOGY : ======== ----------------------------------------------------------------------------- DG Arr Row EID:Slot DID Type State BT Size PDC PI SED DS3 FSpace TR ----------------------------------------------------------------------------- 0 - - - - RAID1 Optl N 744.125 GB dflt N N none N N 0 0 - - - RAID1 Optl N 744.125 GB dflt N N none N N 0 0 0 252:1 18 DRIVE Onln N 744.125 GB dflt N N none - N 0 0 1 252:0 48 DRIVE Onln N 744.125 GB dflt N N none - N ----------------------------------------------------------------------------- DG=Disk Group Index|Arr=Array Index|Row=Row Index|EID=Enclosure Device ID DID=Device ID|Type=Drive Type|Onln=Online|Rbld=Rebuild|Dgrd=Degraded Pdgd=Partially degraded|Offln=Offline|BT=Background Task Active PDC=PD Cache|PI=Protection Info|SED=Self Encrypting Drive|Frgn=Foreign DS3=Dimmer Switch 3|dflt=Default|Msng=Missing|FSpace=Free Space Present TR=Transport Ready Virtual Drives = 1 VD LIST : ======= --------------------------------------------------------------- DG/VD TYPE State Access Consist Cache Cac sCC Size Name --------------------------------------------------------------- 0/0 RAID1 Optl RW Yes RWBD - ON 744.125 GB --------------------------------------------------------------- Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|Dgrd=Degraded Optl=Optimal|RO=Read Only|RW=Read Write|HD=Hidden|TRANS=TransportReady|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=Scheduled Check Consistency Physical Drives = 6 PD LIST : ======= --------------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type --------------------------------------------------------------------------------- 252:0 48 Onln 0 744.125 GB SATA SSD N N 512B INTEL SSDSC2BB800G4 U - 252:1 18 Onln 0 744.125 GB SATA SSD N N 512B INTEL SSDSC2BB800G4 U - 252:2 19 UGood - 744.125 GB SATA SSD N N 512B INTEL SSDSC2BA800G4 U - 252:3 20 UGood - 744.125 GB SATA SSD N N 512B INTEL SSDSC2BA800G4 U - 252:4 49 UGood - 744.125 GB SATA SSD N N 512B INTEL SSDSC2BB800G4 U - 252:5 47 UGood - 744.125 GB SATA SSD N N 512B INTEL SSDSC2BB800G4 U - --------------------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down/PowerSave|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded Cachevault_Info : =============== ------------------------------------ Model State Temp Mode MfgDate ------------------------------------ CVPM02 Optimal 28C - 2016/11/04 ------------------------------------
#查询slot0的物理硬盘的信息。
[root@localhost ~]# ./storcli64 /c0/e252/s0 show all CLI Version = 007.0409.0000.0000 Nov 06, 2017 Operating system = Linux3.10.0-514.el7.x86_64 Controller = 0 Status = Success Description = Show Drive Information Succeeded. Drive /c0/e252/s0 : ================= --------------------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp Type --------------------------------------------------------------------------------- 252:0 48 Onln 0 744.125 GB SATA SSD N N 512B INTEL SSDSC2BB800G4 U - --------------------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down/PowerSave|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded|Cpybck-CopyBack|CBShld-Copyback Shielded Drive /c0/e252/s0 - Detailed Information : ======================================== Drive /c0/e252/s0 State : ======================= Shield Counter = 0 Media Error Count = 0 Other Error Count = 0 Drive Temperature = 20C (68.00 F) Predictive Failure Count = 0 S.M.A.R.T alert flagged by drive = No Drive /c0/e252/s0 Device attributes : =================================== SN = PHWL517601YR800RGN Manufacturer Id = ATA Model Number = INTEL SSDSC2BB800G4 NAND Vendor = NA WWN = 55cd2e404c533246 Firmware Revision = D2010370 Raw size = 745.211 GB [0x5d26ceb0 Sectors] Coerced size = 744.125 GB [0x5d040800 Sectors] Non Coerced size = 744.711 GB [0x5d16ceb0 Sectors] Device Speed = 6.0Gb/s Link Speed = 6.0Gb/s NCQ setting = Enabled Write cache = N/A Logical Sector Size = 512B Physical Sector Size = 4 KB Connector Name = Port A x1 Drive /c0/e252/s0 Policies/Settings : =================================== Drive position = DriveGroup:0, Span:0, Row:1 Enclosure position = 1 Connected Port Number = 0(path0) Sequence Number = 2 Commissioned Spare = No Emergency Spare = No Last Predictive Failure Event Sequence Number = 0 Successful diagnostics completion on = N/A SED Capable = No SED Enabled = No Secured = No Cryptographic Erase Capable = No Locked = No Needs EKM Attention = No PI Eligible = No Certified = No Wide Port Capable = No Port Information : ================ ----------------------------------------- Port Status Linkspeed SAS address ----------------------------------------- 0 Active 6.0Gb/s 0x4433221100000000 ----------------------------------------- Inquiry Data = 40 00 ff 3f 37 c8 10 00 00 00 00 00 3f 00 00 00 00 00 00 00 48 50 4c 57 31 35 36 37 31 30 52 59 30 38 52 30 4e 47 20 20 00 00 00 00 00 00 32 44 31 30 33 30 30 37 4e 49 45 54 20 4c 53 53 53 44 32 43 42 42 30 38 47 30 20 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 01 80 00 40 00 2f 00 40 00 00 00 00 07 00 ff 3f 10 00 3f 00 10 fc fb 00 01 bf ff ff ff 0f 00 00 07 00
# 查询VD 0的信息。
[root@rhel6u5 ~]# /opt/MegaRAID/storcli/storcli64 /c0/v0 show all Controller = 0 Status = Success Description = None /c0/v0 : ====== --------------------------------------------------------- DG/VD TYPE State Access Consist Cache sCC Size Name --------------------------------------------------------- 1/0 RAID1 Optl RW Yes RWTD - 1.089 TB --------------------------------------------------------- Cac=CacheCade|Rec=Recovery|OfLn=OffLine|Pdgd=Partially Degraded|dgrd=Degraded Optl=Optimal|RO=Read Only|RW=Read Write|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=Scheduled Check Consistency PDs for VD 0 : ============ ----------------------------------------------------------------------- EID:Slt DID State DG Size Intf Med SED PI SeSz Model Sp ----------------------------------------------------------------------- 25:22 14 Onln 1 1.089 TB SAS HDD N N 512B ST1200MM0007 U 25:23 26 Onln 1 1.089 TB SAS HDD N N 512B ST1200MM0007 U ----------------------------------------------------------------------- EID-Enclosure Device ID|Slt-Slot No.|DID-Device ID|DG-DriveGroup DHS-Dedicated Hot Spare|UGood-Unconfigured Good|GHS-Global Hotspare UBad-Unconfigured Bad|Onln-Online|Offln-Offline|Intf-Interface Med-Media Type|SED-Self Encryptive Drive|PI-Protection Info SeSz-Sector Size|Sp-Spun|U-Up|D-Down|T-Transition|F-Foreign UGUnsp-Unsupported|UGShld-UnConfigured shielded|HSPShld-Hotspare shielded CFShld-Configured shielded VD0 Properties : ============== Strip Size = 256 KB Number of Blocks = 2341795840 VD has Emulated PD = No Span Depth = 1 Number of Drives Per Span = 2 Write Cache(initial setting) = WriteThrough Disk Cache Policy = Disk's Default Encryption = None Data Protection = Disabled Active Operations = None Exposed to OS = Yes Creation Date = 04-01-2018 Creation Time = 12:38:35 PM Emulation type = None
配置CacheCade虚拟磁盘
命令功能
可使用SSD硬盘创建CacheCade虚拟磁盘。
命令格式
storcli64 /ccontroller_id add vd cc raidlevel drives=enclosure_id:disk
storcli64 /ccontroller_id/vvd_id del cachecade
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
level |
RAID级别 |
用于CacheCade的RAID可配置为RAID 0或RAID 1。 |
disk |
成员盘的槽位号 |
当配置多个成员盘时,参数为槽位范围,例如0–3。 |
vd_id |
待删除的CacheCade RAID的ID |
– |
使用指南
无
使用实例
# 配置单盘CacheCade RAID 0。
domino:~# ./storcli64 /c0/ add vd cc raid0 drives=252:0 Controller = 0 Status = Success Description = Add VD Succeeded
# 删除CacheCade RAID 0。
domino:~# ./storcli64 /c0/v0 del cachecade Controller = 0 Status = Success Description = Disassociation of the Cachecade virtual drive is in progress and can take a few minutes to complete. The Cachecade virtual drive is deleted after the disassociation is complete.
恢复Frn-Bad状态的硬盘
命令功能
将Frn-Bad状态的RAID成员盘恢复为Online状态。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id set good
storcli64 /ccontroller_id/fall import
storcli64 /ccontroller_id/eenclosure_id/sslot_id start rebuild
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
成员盘的槽位号 |
– |
使用指南
无
使用实例
如图8-190所示,slot 1和slot 5硬盘的状态为“UBad F”,在OS下可通过以下步骤将硬盘状态恢复为“online”。
1、先把slot 1和slot 5的硬盘状态设置为UGood。
domino:~# ./storcli64 /c0/e0/s1,5 set good Controller = 0 Status = Success Description = Set Drive Good Succeeded.
2、导入外部配置。
domino:~# ./storcli64 /c0/fall import Controller = 0 Status = Success Description = Successfully imported foreign configuration
3、导入外部配置后,如果需要重构RAID,则执行以下命令。
domino:~# ./storcli64 /c0/e0/s1 start rebuild Controller = 0 Status = Success Description = Start Drive Rebuild Succeeded.
查询超级电容的相关信息
命令功能
查询超级电容的名称及TFM Flash卡缓存容量的大小等信息。
命令格式
storcli64 /ccontroller_id/cv show all
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
可以为all,表示所有控制器。 |
使用实例
#查询超级电容的相关信息。
[root@localhost ~]# ./storcli64 /c0/cv show all CLI Version = 007.0409.0000.0000 Nov 06, 2017 Operating system = Linux3.10.0-514.el7.x86_64 Controller = 0 Status = Success Description = None Cachevault_Info : =============== -------------------- Property Value -------------------- Type CVPM02 Temperature 28 C State Optimal -------------------- Firmware_Status : =============== --------------------------------------- Property Value --------------------------------------- Replacement required No No space to cache offload No Module microcode update required No --------------------------------------- GasGaugeStatus : ============== ------------------------------ Property Value ------------------------------ Pack Energy 294 J Capacitance 108 % Remaining Reserve Space 0 ------------------------------ Design_Info : =========== ------------------------------------ Property Value ------------------------------------ Date of Manufacture 04/11/2016 Serial Number 22417 Manufacture Name LSI Design Capacity 288 J Device Name CVPM02 tmmFru N/A CacheVault Flash Size 8.0 GB tmmBatversionNo 0x05 tmmSerialNo 0xee7d tmm Date of Manufacture 09/12/2016 tmmPcbAssmNo 022544412A tmmPCBversionNo 0x03 tmmBatPackAssmNo 49571-13A scapBatversionNo 0x00 scapSerialNo 0x5791 scap Date of Manufacture 04/11/2016 scapPcbAssmNo 1700134483 scapPCBversionNo A scapBatPackAssmNo 49571-13A Module Version 6635-02A ------------------------------------ Properties : ========== -------------------------------------------------------------- Property Value -------------------------------------------------------------- Auto Learn Period 27d (2412000 seconds) Next Learn time 2018/08/03 17:48:38 (586633718 seconds) Learn Delay Interval 0 hour(s) Auto-Learn Mode Transparent --------------------------------------------------------------
- 上述回显信息中,“Device Name CVPM02”表示超级电容的名称为 “CVPM02”,“CacheVault Flash Size 8.0GB”表示TFM Flash卡缓存容量为“8.0GB”。
- 当回显信息的“State”显示为“FAILED”时,需要更换超级电容。
升级硬盘FW
命令功能
升级硬盘的FW。
命令格式
./storcli64 /ccontroller_id /eenclosure_id/sslot_id download src=FW_name.bin
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
硬盘槽位号 |
– |
FW_name |
硬盘FW的名称 |
– |
使用实例
#升级硬盘FW。
[root@localhost ~]# ./storcli64 /c0/e64/s5 download src=5200_D1MU004_Releasefullconcatenatedbinary.bin Starting microcode update .....please wait... Flashing PD image ..... please wait... CLI Version = 007.0504.0000.0000 Nov 22,2017 Operation system = Linux 3.10.0-514.el7.x86_64 Controller = 0 Status = Success Description = Firmware Download succeeded. Drive Firmware Download : ======================== -------------------------------------------------------------------------------- Drive Status ErrCd ErrMsg -------------------------------------------------------------------------------- /c0/e64/s5 Success 0 - --------------------------------------------------------------------------------
手动重构RAID
命令功能
手动重构RAID组。
命令格式
storcli64 /ccontroller_id/eenclosure_id/sslot_id insert dg=DG array=Arr row=Row
storcli64 /ccontroller_id/eenclosure_id/sslot_id start rebuild
参数说明
参数 |
参数说明 |
取值 |
---|---|---|
controller_id |
硬盘所在RAID卡的ID |
– |
enclosure_id |
硬盘所在Enclosure的ID |
– |
slot_id |
要加入Array的硬盘槽位号 |
– |
DG |
硬盘发生故障的DG的ID |
– |
Arr |
硬盘发生故障的Array的ID |
– |
Row |
硬盘发生故障的Array的row number |
– |
使用指南
重建RAID分3个步骤进行:
1.通过./storcli64 /c0 show 命令,查询故障硬盘的DG、Arr和Row所对应的数字。
2.通过storcli64 /ccontroller_id/eenclosure_id/sslot_id insert dg=DG array=Arr row=Row 命令,将硬盘加入RAID组。
3.执行storcli64 /ccontroller_id/eenclosure_id/sslot_id start rebuild命令,手动重构RAID。
使用实例
# 将硬盘加入RAID组。
[root@localhost ~]# storcli64 /c0/e252/s2 insert dg=0 array=0 row=1 CLI Version = 007.0504.0000.0000 Nov 22, 2017 Operating system = Linux 3.10.0-693.el7.x86_64 Controller = 0 Status = Success Description = Insert Drive Succeeded.
# 手动重构RAID。
[root@localhost ~]# storcli64 /c0/e252/s1 start rebuild CLI Version = 007.0504.0000.0000 Nov 22, 2017 Operating system = Linux 3.10.0-693.el7.x86_64 Controller = 0 Status = Success Description = Start Drive Rebuild Succeeded.