几个常用缩写含义介绍-无基础请先看此处
Ctl 控制器号,每个控制前对应一个控制器号,默认从0开始编号
EID 背板号,默认一般是252,也有8等不同的数字,以查出来的为准
Slt 槽位号,每片硬盘对应一个槽位号
State 硬盘状态
PDs 硬盘数
DGs 硬盘组数量
VDs Raid数量
Hlth 健康状态
查看系统信息
#查出控制器号为0,即:c0
查看指定Raid卡信息
#查出背板号为252,即:e252
查出槽位号为4、5、6、7 即:s4、s5、s6、s7
命令集合
1)命令中c代表Controller(控制器),e代表Enclosure(机箱),s代表Slot(槽位)。
2)命令中/c是查看的控制器信息,all表示查看所有控制器,0表示查看0号控制器。
3)命令中/e是查看的控制器信息,all表示查看所有机箱,0表示查看0号机箱。
4)命令中/s是查看的槽位信息,all表示查看所有槽位,0表示查看0号槽位。
/opt/MegaRAID/storcli/storcli64 -v 显示软件版本信息
/opt/MegaRAID/storcli/storcli64 -h 查看帮助信息
/opt/MegaRAID/storcli/storcli64 show 查看RAID卡、系统内核、主机名等信息
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=on/off 开启或者关闭蜂鸣器报警
/opt/MegaRAID/storcli/storcli64 /c0 show all 查看第一块RAID卡版本、功能、状态、以及raid卡下的物理磁、逻辑盘信息。c0代表第一块raid卡,如果有多块则命令以此类推。
/opt/MegaRAID/storcli/storcli64 /c0 show freespace 查看第一块RAID卡剩下的磁盘空间
/opt/MegaRAID/storcli/storcli64 /c0 show rebuildrate 查看第一块RAID卡rebuildrate速度
/opt/MegaRAID/storcli/storcli64 /c0 download file=mr3108fw.rom 升级第一块RAID卡固件
/opt/MegaRAID/storcli/storcli64 /c0 restart 升级固件后重启RAID卡以便新固件及时生效
/opt/MegaRAID/storcli/storcli64 /c0 flushcache 清除第一块RAID卡缓存
/opt/MegaRAID/storcli/storcli64 /c0/eall/sall show all 查看第一块RAID卡上物理磁盘详细信息
/opt/MegaRAID/storcli/storcli64 /c0/e252/s0 start locate 定位第一块RAID上某块物理磁盘,物理磁盘的绿色的定位灯会闪烁。 e代表Enclosure,s代表Slot或PD
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx stop locate 停止定位,定位灯停止闪烁。
/opt/MegaRAID/storcli/storcli64 /c0/e252/sall show rebuild 查看磁盘重建进度
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx start rebuild 开始重建
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx stop rebuild 停止重建
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx add hotsparedrive dgs=0 设置某块物理磁盘为磁盘组0的热备盘,如果不指定dgs,则为该RAID卡上全局热备盘。
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx1,2 add hotsparedrive dgs=0,1,2 设置两块物理磁盘为磁盘组0,1,2的特定热备。
/opt/MegaRAID/storcli/storcli64 /c0/ex/sx delete hotsparedrive 删除热备磁盘
/opt/MegaRAID/storcli/storcli64 /c0 add vd each type=raid0 drives=252:0,1,2,3 单独为每一块物理磁盘创建raid0
/opt/MegaRAID/storcli/storcli64 /c0 add vd type=raid5 size=all names=tmp1 drives=32:2-4 由第3、4、5块物理磁盘来构建RAID5,分配所有空间的逻辑磁盘命名tmp1。
/opt/MegaRAID/storcli/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。)
/opt/MegaRAID/storcli/storcli64 /c0 add vd type=raid10 size=100GB,200GB names=tmp1,tmp2 drives=32:0-3 pdperarray=2 由前四块物理磁盘构建raid10,分别分配多个逻辑磁盘。
/opt/MegaRAID/storcli/storcli64 /c0 add vd type=raid10 size=all names=tmp3 drives=32:0-3 pdperarray=2 剩下的所有空间分配给逻辑磁盘tmp3。
/opt/MegaRAID/storcli/storcli64 /c0 /vall show all 显示第一块RAID卡上所有逻辑磁盘相关信息,也可指定某个逻辑磁盘v0,v1等等。
/opt/MegaRAID/storcli/storcli64 /c0/v0 show 显示第一块RAID卡上第一个逻辑磁盘信息
/opt/MegaRAID/storcli/storcli64 /c0/v0 del force 强制删除某个逻辑磁盘
/opt/MegaRAID/storcli/storcli64 /c0/bbu show all 显示bbu信息
/opt/MegaRAID/storcli/storcli64 /c0/cv start learn 立即启动bbu充放电循环
/opt/MegaRAID/storcli/storcli64 /c0/vall set wrcache=wt/wb/awb 设置写策略
/opt/MegaRAID/storcli/storcli64 /c0 show alarm 查看报警器信息
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=silence 暂时关闭报警器鸣叫
/opt/MegaRAID/storcli/storcli64 /c0 set alarm=off 始终关闭报警器鸣叫
设置某个属性语法:storcli64 /cx set <properties>如设置蜂鸣器开启:storcli64 /cx set alarm=on
/opt/MegaRAID/storcli/storcli64 /c0/e252/s3 set good 改变插入的物理磁盘的状态
/opt/MegaRAID/storcli/storcli64 /c0/e252/s3 start initialization 初始化某个物理磁盘
/opt/MegaRAID/storcli/storcli64 /c0/e252/s3 show initialization 查看某个初始化的物理磁盘进度
/opt/MegaRAID/storcli/storcli64 /c0/v0 set wrcache=wt 修改vd的写策略
/opt/MegaRAID/storcli/storcli64 /c0/v0 set rdcache=nora 修改vd的读策略
/opt/MegaRAID/storcli/storcli64 /c0/fall show 查看foreign信息
/opt/MegaRAID/storcli/storcli64 /c0/fall import 导入foreign
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents 在线查看日志
/opt/MegaRAID/storcli/storcli64 /c0 show termlog type=contents | grep “rebuild” 在线查看日志抽取关键字
/opt/MegaRAID/storcli/storcli64 /c0 show events file=/home/eventreports 将日志存储为文件
/opt/MegaRAID/storcli/storcli64 /c0 show snapdump ………………………………..显示snapdump状态
/opt/MegaRAID/storcli/storcli64 /c0 get snapdump …………………………………..获取所有Snapdump日志文件
/opt/MegaRAID/storcli/storcli64 /c0 show all > AdpInfo.txt………………………RAID卡的全部基本信息
/opt/MegaRAID/storcli/storcli64 /c0 show termlog > FwTmLog.txt……………………系统下的实时log
/opt/MegaRAID/storcli/storcli64 /c0/pall show all > PhyErr.txt…………………………Phy的连接错误
/opt/MegaRAID/storcli/storcli64 /c0/eall/sall show all > PdList.txt……………………硬盘的基本信息
/opt/MegaRAID/storcli/storcli64 /c0/vall show all > LdInfo.txt…………………………RAID阵列的信息
/opt/MegaRAID/storcli/storcli64 /c0 show events > EvtLog.txt…………………………RAID卡的Eventlog
/opt/MegaRAID/storcli/storcli64 /c0/e36/s1 set good…………………………设置控制器 0 背板36 槽位号为1的磁盘状态为good
/opt/MegaRAID/storcli/storcli64 /c0/e36/s1 set offline…………………………设置控制器 0 背板36 槽位号为1的磁盘状态为offline
/opt/MegaRAID/storcli/storcli64 /c0/e36/s1 set online…………………………设置控制器为0 背板为36 槽位号为1的磁盘状态为online
- Adapter#0 —–raid卡控制器编号
- EnclosureDevice ID: 252 —–外壳设备ID,也就是raid卡的ID号
- SlotNumber: 4 ——槽号
- Enclosureposition: 0 ——外壳位置
- DeviceId: 49 —–设备ID
- SequenceNumber: 2 —–序号
- Media Error Count: 0 —–介质错误计数
- Other Error Count: 0 —–其它错误计数
- Predictive Failure Count: 0 —–预测故障计数
- Last Predictive Failure Event Seq Number: 0
- PD Type:SATA —–磁盘接口类型
- Raw Size:3.638 TB [0x1d1c0beb0 Sectors] —–磁盘原始大小
- NonCoerced Size: 3.637 TB [0x1d1b0beb0 Sectors] —–磁盘标准大小
- CoercedSize: 3.637 TB [0x1d1b00000 Sectors] ——磁盘最大可用大小
- Firmware state: Unconfigured(good),Spun down —–固件状态:未配置(好的),未连接
- SASAddress(0): 0x4433221107000000
- ConnectedPort Number: 3(path0) ——连接端口号
- InquiryData: Z1ZBBJWWST4000NM0033-9ZM170 SN06 —–硬盘的序列号、型号、固件版本
- FDECapable: Not Capable
- FDEEnable: Disable
- Secured:Unsecured
- Locked:Unlocked
- Needs EKMAttention: No
- ForeignState: None
- DeviceSpeed: 6.0Gb/s
- LinkSpeed: 6.0Gb/s
- MediaType: Hard Disk Device
- Drive: Not Certified
- DriveTemperature : N/A —-设备温度
- 需要特别关注这几个指标:Media Error / Other Error / Predictive Failure Count / LastPredictive Failure Event Seq Number
Slot Number : 表示磁盘的插槽位置,可以根据Slot Number序列值推断是否有磁盘离线
Medai Error Count : 表示磁盘可能错误,可能是磁盘有坏道,这个值不为0值得注意,数值越大,危险系数越高
Other Error Count : 表示磁盘可能存在松动,可能需要重新再插入
Predictive Failure Count : ( 预测性失败统计)
Firmware state : 表示磁盘的状态,可以判断磁盘是否损坏。正常状态是Online, Spun Up
/opt/MegaRAID/storcli/storcli64 /c0 /eall/sall show …………………………查看磁盘状态:磁盘状态为UGOOD空闲盘,磁盘状态为DHS为专属热备,磁盘状态为GHS为全局热备
添加专属热备
- 获得dgs号 /opt/MegaRAID/storcli/storcli64 /call/vall show 可看到DG及dgs的值为特定的DG配置热备
- 获取空闲磁盘/opt/MegaRAID/storcli/storcli64 /c0 /eall/sall show 磁盘状态为UGOOD
c. 语法/opt/MegaRAID/storcli/storcli64 /cx/ex/sx add hotsparedrive dgs=x
例:/opt/MegaRAID/storcli/storcli64 /c0/e3/s6 add hotsparedrive dgs=0 背板为3,槽位为6的磁盘做 dgs为0的RAID的专属热备
添加全局热备
- 查看空闲磁盘/opt/MegaRAID/storcli/storcli64 /c0 /eall/sall show 磁盘状态为UGOOD
- /opt/MegaRAID/storcli/storcli64 /cx/ex/sx add hotsparedrive
如:/opt/MegaRAID/storcli/storcli64 /c0/e3/s6 add hotsparedrive 背板为3,槽位为6的磁盘作为全局热备
删除热备
- 查看热备盘 /opt/MegaRAID/storcli/storcli64 /c0 /eall/sall show 磁盘状态为DHS,GHS
b. 删除热备盘 /opt/MegaRAID/storcli/storcli /c0/ex/sx delete hotsparedrive
删除RAID
/opt/MegaRAID/storcli/storcli64 /c0/vall show…………………………查看要删除的RAID 查看到对应的VD号
/opt/MegaRAID/storcli/storcli64 /cx/vx del…………………………删除RAID
例:/opt/MegaRAID/storcli/storcli64 /c0/v1 del 删除虚拟设备号为1的RAID
删除含有用户数据(MBR或者分区信息)的RAID
/opt/MegaRAID/storcli/storcli64 /cx/vx del force
查看RAID
/opt/MegaRAID/storcli/storcli64 /call/vall show…………………………查看控制器上的所有RAID
/opt/MegaRAID/storcli/storcli64 /c0/v1 show all…………………………查看具体的RAID虚拟设备号为1的详细信息
RAID缓存设置
设置写缓存语法:/opt/MegaRAID/storcli/storcli64 /cx/vx set wrcache=wt|wb|awb wt 是关闭缓存wb 在RAID卡没有电池的情况下开启写缓存 awb在RAID卡含有电池的情况下开启写缓存
设置读缓存语法:/opt/MegaRAID/storcli/storcli64 /cx/vx set racache=nora|ra nora不会读缓存里面内容 ra 先读缓存里有的内容
设置io 优先级的语法:/opt/MegaRAID/storcli/storcli64 /cx/vx set iopolicy=direct|cached
开启读缓存
/opt/MegaRAID/storcli/storcli64 /call/v1 set rdcache=ra
开启写缓存
开启写缓存需要先设置IO优先级为缓存 /opt/MegaRAID/storcli/storcli /c0/v1 set iopolicy=cached
/opt/MegaRAID/storcli/storcli64 /call/v1 set wrcache=wb
或者 /opt/MegaRAID/storcli/storcli64 /call/v1 set wrcache=awb
关闭读缓存
/opt/MegaRAID/storcli/storcli64 /call/v1 set rdcache=nora
关闭写缓存
/opt/MegaRAID/storcli/storcli64 /call/v1 set wrcache=wt
1.6.6 RAID初始化
查看快速初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx show init
开启快速初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx start init
开启完全初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx start init full
停止初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx stop init
RAID5(5块以上)和RAID6(6块以上)在进行快速初始化时会转到后台进行初始化
查看后台初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx show bgi
停止初始化
/opt/MegaRAID/storcli/storcli64 /call/v1 stop bgi
挂起初始化
/opt/MegaRAID/storcli/storcli64 /call/v1 suspend bgi
1.6.7 RAID一致性校验
查看初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx show cc
开启初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx start cc
停止初始化
/opt/MegaRAID/storcli/storcli64 /cx/vx stop cc
smartor基本设置下一致性校验 是在特定的时间执行一致性校验,在页面设置即可
LSIRAID卡自带的一致性校验
查看一致性校验执行的具体时间
/opt/MegaRAID/storcli/storcli64 /cx show cc
设置卡自带的一致性校验方式顺序或者并发
/opt/MegaRAID/storcli/storcli64 /cx set consistencycheck=seq|con
关闭卡自带的一致性校验
/opt/MegaRAID/storcli/storcli64 /cx set cc=off
/opt/MegaRAID/storcli./storcli64 /c0/fall import…………………………导入frgn状态的DG
其中内容来源如下文章:
storcli 简易使用介绍:https://www.lmlphp.com/user/61479/article/item/618691/
华为服务器 RAID控制卡 用户指南(x86):
https://support.huawei.com/enterprise/zh/doc/EDOC1000163568/4a8ec8fa
暂无评论内容