admin avatar

转载HDraid MegaCli的常用命令

🕤 by admin





转载HDraid MegaCli的常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
1. raid
1.1 查看物理卷信息
/opt/MegaRAID/MegaCli/MegaCli64 -pdlist -aall

1.2 查看逻辑卷+物理卷
/opt/MegaRAID/MegaCli/MegaCli64 -ldpdinfo -aall

1.2.1 查看逻辑卷
/opt/MegaRAID/MegaCli/MegaCli64 -ldinfo -lall -aall

1.3 创建一个6块盘的raid10
/opt/MegaRAID/MegaCli/MegaCli64 -CfgSpanAdd -r10 -Array0[252:2,252:3] -Array1[252:4,252:5] -Array2[252:6,252:7] WB RA Direct NoCachedBadBBU -a0

1.4  创建一个2块盘的raid1
/opt/MegaRAID/MegaCli/MegaCli64 -CfgLdAdd -r1[252:6,252:7] WB RA Direct NoCachedBadBBU -a1

1.5 修改raid属性
设置ReadAhead
/opt/MegaRAID/MegaCli/MegaCli64 -LDSetProp -ra -L1 -a0


2. 查看日志
/opt/MegaRAID/MegaCli/MegaCli64 -FwTermLog -Dsply -aALL 

3. 电池
查看电池属性
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd -GetBbuProperties -aALL

查看电池状态
/opt/MegaRAID/MegaCli/MegaCli64 -AdpBbuCmd  -GetBbuStatus -aALL

4. 一致性校验
查看当前的设置
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -Info -aall

关闭自动校验
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -Dsbl -aAll

设置开始时间(注意:RAID为0时区,设置为周三的4点)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -setstarttime 20131015 20 -aall

设置间隔时间(按小时,每14天检查)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -setdelay 336 -aall

调整模式
/opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -ModeConc -aall
(如果由disable调整成正常模式后,有可能会立即开始校验)

查看校验进度
 /opt/MegaRAID/MegaCli/MegaCli64 -ldcc -progdsply -L0 -a0

停止当前校验
/opt/MegaRAID/MegaCli/MegaCli64  -ldcc -abort  -L0 -a0

5. PatrolRead校验(硬件介质校验)
查看当前信息
 /opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -Info -aALL

关闭自动校验
/opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -Dsbl -aALL

查看检查的容量百分比设置(通过扫描整块盘的%来判定是否有硬件错误)
/opt/MegaRAID/MegaCli/MegaCli64 -AdpGetProp PatrolReadRate -aALL

设置百分比为2%
/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetProp PatrolReadRate 2 -aALL

设置校验时间间隔
/opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -SetDelay 672 -aALL


手工开始校验
/opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -Start -aALL

手工停止校验
/opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -Stop -aALL

via https://gist.github.com/sennajox/43ef2efaf0b325fc9c64





💘 相关文章

写一条评论

Based on Golang + fastHTTP + sdb | go1.18.3 Processed in 2ms