参考戴尔官方论坛:https://www.dell.com/community/Systems-Management/Run-a-Consistency-Check-on-a-PERC-managed-RAID-without-OMSA/m-p/4767003
一、方法一
在bios设置里可以设置开启一致性主动检查
RAID卡有两种一致性检查方式
- Patrol read
- consistency check
[root@kvm_100_67_159_143 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -AdpCcSched -Info -aALL
Adapter #0
Operation Mode: Concurrent
Execution Delay: 168
Next start time: 03/10/2018, 03:00:00
Current State: Stopped
Number of iterations: 94
Number of VD completed: 0
Excluded VDs : None
Exit Code: 0x00
周期是7天 168小时的间隔,24*7=168
一致性检查可以主动触发发现,错误可以手动触发或者发起。例如定时发起检查。
/opt/MegaRAID/MegaCli/MegaCli64 -AdpSetTime `date +%Y%m%d` `date +%H:%M:%S` -aALL -NoLog
[root@kvm_100_91_167_90 ~]# /opt/MegaRAID/MegaCli/MegaCli64 -AdpGetTime -aALL
Adapter 0:
Date: 03/13/2018
Time: 11:23:51
Exit Code: 0x00
手动触发Patrol read 检查
SSD的机器可能不支持
/opt/MegaRAID/MegaCli/MegaCli64 -AdpPR -Start -aALL
/opt/MegaRAID/MegaCli/MegaCli64 -fwtermlog -dsply -aall
Patrol read
Tries to discover disk error before it is too late and data is lost.
(including hot spare connected to a controller.)
This process causes the drives to read the data by issuing "read-verify" commands. By using the "read-verify " command, the data from the drives is not transferred to the MegaRAID adapter unless an error is detected and reported by one or more drives included in the stripe.
If a single drive reports an error within the stripe, the read patrol function initiates read commands to all the other stripe unit drives and the data for this single failing stripe unit is recreated by the MegaRAID adapter from the remaining data and parity stripe units.
After recreating this data, the adapter then issues a write-verify command to the drive