Storcli64_Raid卡日志管理

 admin   2022-07-20 08:53   260 人阅读  0 条评论

/opt/MegaRAID/storcli/storcli64 -v    显示软件版本信息

/opt/MegaRAID/storcli/storcli64 -h    查看帮助信息

/opt/MegaRAID/storcli/storcli64 show    查看RAID卡、系统内核、主机名等信息

/opt/MegaRAID/storcli/storcli64 /c0 show    查看RAID卡、物理盘、逻辑盘等详细信息

/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set jbod 设置slot x物理盘状态为JBOD

/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx set good force 设置slot x物理盘状态为UGood

/opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show all     查看RAID卡上所有物理磁盘详细信息

/opt/MegaRAID/storcli/storcli64 /c0 /vall show all查看RAID卡上所有逻辑盘详细信息,也可指定某个逻辑磁盘v0,v1等

/opt/MegaRAID/storcli/storcli64 /c0 /v0 show     显示第一块RAID卡上第一个逻辑磁盘信息

/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s0 start locate 定位第一块RAID上某块物理磁盘,物理磁盘的绿色的定位灯会被点亮。

/opt/MegaRAID/storcli/storcli64 /c0  /ex /sx stop locate    停止定位,定位灯停止闪烁。

/opt/MegaRAID/storcli/storcli64 /c0 download file=mr3108fw.rom    升级第一块RAID卡固件

/opt/MegaRAID/storcli/storcli64 /c0 restart    升级固件后重启RAID卡以便新固件及时生效

/opt/MegaRAID/storcli/storcli64 /c0 add vd r0 size=all name=R0 drives=217:3,13 awb nora cached strip=256 用Slot号为3和13的物理盘创建全容量Raid 0,读写策略为no read ahead/ always writeback,IO策略为Cached,条带大小为256k(详细参数可以使用storcli64 /c0 add vd help查看及使用)

/opt/MegaRAID/storcli/storcli64 /c0 add vd r10 size=10gb name=R10 drives=217:2-3,13,34 pdperarray=2 wb direct strip=64 用Slot号为2、3、13、34的物理盘创建10gb容量的raid 10,读写策略为read ahead/ writeback,IO策略为Direct,条带大小为64k(注意:LSI SAS3108最多支持64个RAID,创建10/50/60时,必须指定pdperarray参数。如果没有这个参数,是创建不成功的。)

/opt/MegaRAID/storcli/storcli64 /c0 add vd r10 size=10gb,11gb name=R10-1,R10-2 drives=217:2-3,13,34 pdperarray=2 wb direct strip=64 一次性在Slot号为2、3、13、34的物理盘上创建容量为10gb名为R10-1、容量为11gb名为R10-2的两个raid10逻辑盘

/opt/MegaRAID/storcli/storcli64 /c0 /v0 del [force] 删除ID为0的逻辑盘

/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx add hotsparedrive dgs=0    设置某块物理磁盘为磁盘组0的热备盘,如果不指定dgs,则为该RAID卡上全局热备盘。

/opt/MegaRAID/storcli/storcli64 /c0 /ex /sx delete hotsparedrive    删除热备磁盘

/opt/MegaRAID/storcli/storcli64 /c0 /vx set wrcache=wt/wb/awb 设置Vx逻辑盘写策略

/opt/MegaRAID/storcli/storcli64 /c0 /vx set rdcache=ra/nora 设置Vx逻辑盘读策略

/opt/MegaRAID/storcli/storcli64 /c0 /vx set accesspolicy=rw/ro/blocked 设置访问权限

/opt/MegaRAID/storcli/storcli64 /c0 /vx set iopolicy=cached/direct 设置IO策略

/opt/MegaRAID/storcli/storcli64 /c0 show rebuildrate    查看第一块RAID卡rebuildrate速度

/opt/MegaRAID/storcli/storcli64 /c0 flushcache     清除第一块RAID卡缓存

/opt/MegaRAID/storcli/storcli64 /c0 /e217 /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 /bbu show all   显示bbu信息

/opt/MegaRAID/storcli/storcli64 /c0 show alarm    查看报警器信息

/opt/MegaRAID/storcli/storcli64 /c0 set alarm=silence   暂时关闭报警器鸣叫

/opt/MegaRAID/storcli/storcli64 /c0 set alarm=off       始终关闭报警器鸣叫

/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 start initialization    初始化某个物理磁盘

/opt/MegaRAID/storcli/storcli64 /c0 /e252 /s3 show initialization    查看某个初始化的物理磁盘进度

/opt/MegaRAID/storcli/storcli64 /c0 set eghs state=on eug=off smarter=on 设置紧急策略生效类型,state=on代表热配盘生效,eug=on代表UGood盘生效,smarter代表回拷

/opt/MegaRAID/storcli/storcli64 /c0 /fall show   查看foreign信息

/opt/MegaRAID/storcli/storcli64 /c0 /fall import    导入foreign

/opt/MegaRAID/storcli/storcli64 /c0 /fall del    清除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 termlog >filename.txt 保存FW日志到指定文件

/opt/MegaRAID/storcli/storcli64 /c0 show events >filename.txt 保存事件日志到指定文件


storcli64 /cx [show|delete] [events|termlog]
show 显示日志
delete 删除日志
events 所有日志事件
termlog TTY日志(TTY Logs — the RAID controller log)

查看可用的操作命令及参数:
events 日志操作帮助

[root@localhost ~]# storcli64 -h |grep events
storcli /cx delete events
storcli /cx show events [ [type= <sincereboot| sinceshutdown| includedeleted|
storcli /cx show pdfailevents [lastoneday] [lastseqnum=<val>] [file=<filepath>]

termlog TTY日志操作帮助

[root@localhost ~]# storcli64 -h |grep termlog
storcli /cx set termlog=on|off|offthisboot
storcli /cx show termlog [type=config|contents] [logfile[=filename]]
storcli /cx delete termlog

1、显示/删除/保存所有日志事件
storcli64 /cx show events #显示

# storcli64 /c0 show events
 ………..
 
 seqNum: 0x00006fb7
 Time: Sat Apr  2 11:58:07 2022
 
 Code: 0x0000002c
 Class: 0
 Locale: 0x20
 Event Description:
 Time established as 04/02/22 11:58:07; (30 seconds since power on)
 Event Data:
 ===========
 Elapsed Time since
 power-on: 30
 Time: Sat Apr  2 11:58:07 2022
 
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 Events = GETEVENTS
 
 Controller
 Properties :
 =====================
 
 ------------------------------------
 Ctrl Status  Method          Value  
 ------------------------------------
    0 Success handleSuboption Events
 ------------------------------------

storcli64 /cx delete events  #删除

[root@localhost ~]# storcli64 /c0 delete events
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 
 Controller
 Properties :
 =====================
 
 ---------------------------------
 Ctrl Status  Method      
 Value  
 ---------------------------------
    0 Success DeleteEvents Events
 ---------------------------------

删除以后再次查看时已经没有日志

[root@localhost ~]# storcli64 /c0 show events
 
 
 seqNum: 0x00006fb8
 Time: Mon Apr  4 09:35:55 2022
 
 Code: 0x0000001e
 Class: 0
 Locale: 0x20
 Event Description:
 Event log cleared
 Event Data:
 ===========
 None
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 Events = GETEVENTS
 
 Controller
 Properties :
 =====================
 
 ------------------------------------
 Ctrl Status  Method          Value  
 ------------------------------------
    0 Success handleSuboption Events
 ------------------------------------

将日志信息保存到指定文件,会在当前目录生成<文件名>文件
也可以在文件名前加路径指定保存位置。
storcli64 /cx show events file=文件名.log                    #保存
storcli64 /cx show events file=/var/log/文件名.log     #保存到指定位置

[root@localhost log]# storcli64 /c0 show
 events file=test_back.log
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 Events = GETEVENTS
 
 Controller
 Properties :
 =====================
 
 ------------------------------------
 Ctrl Status  Method          Value  
 ------------------------------------
    0 Success handleSuboption Events
 ------------------------------------
 
 [root@localhost log]# ls
 test_events.log
2、显示/删除TTY(用于故障定位的固件输出信息) 日志
storcli64 /cx show termlog  #显示

# storcli64 /c0 show termlog
 ………..
 04/04/22  9:35:55:
 C0:EVT#28600-04/04/22  9:35:55:  30=Event log cleared
 
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None

storcli64 /cx delete termlog   #删除

[root@localhost~]# storcli64 /c0 delete termlog
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 
 Controller
 Properties :
 =====================
 
 ----------------------------
 Ctrl Method
 Result          
 ----------------------------
    0 Delete Termlog deleted
 ----------------------------

删除以后再次查看时已经没有日志

[root@localhost~]# storcli64 /c0 show termlog
 Firmware Term Log
 Information on controller 0:
 04/04/22  9:48:33: C0:TTY
 History buffer cleared
 
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None

将日志信息保存到指定文件,会在当前目录生成<文件名>文件
也可以在文件名前加路径指定保存位置。
storcli64 /cx show termlog logfile=文件名.log                #保存
storcli64 /cx show termlog logfile=/var/log/文件名.log  #保存到指定位置

[root@localhost log]# storcli64 /c0 show
 termlog logfile=test_termlog.log
 
 [root@localhost log]# ls
 test_events.log  test_termlog.log

3、查看产生日志文件的历史信息
storcli64 /cx show eventloginfo

[root@localhost log]# storcli64 /c0 show
 eventloginfo
 CLI Version =
 007.1912.0000.0000 Nov 23, 2021
 Operating system =
 Linux 4.19.90-24.4.v2101.ky10.aarch64
 Controller = 0
 Status = Success
 Description = None
 
 Newest Sequence
 Number = 0x00006fb8
 Oldest Sequence
 Number = 0x00000001
 Clear Sequence
 Number = 0x00006fb8
 Shutdown Sequence
 Number = 0x00006faa
 Reboot Sequence
 Number = 0x00006fab
 
 Controller
 Properties :
 =====================
 
 ---------------------------------
 Ctrl Status  Method      
 Value  
 ---------------------------------
    0 Success EventLogInfo Events
 ---------------------------------


本文地址:https://liuchunjie.top/?id=418
版权声明:本文为原创文章,版权归 admin 所有,欢迎分享本文,转载请保留出处!

 发表评论


表情

还没有留言,还不快点抢沙发?