我们有一个 10 个节点的 Cassandra 集群,其中 4 个节点显示了一些磁盘错误,如dmesg
. 这些报告每小时都会或多或少地出现。
错误中报告的磁盘是 8TB 逻辑卷的一半 - 另一个磁盘似乎没有报告错误。
[Wed Sep 28 12:29:02 2022] sas: Enter sas_scsi_recover_host busy: 1 failed: 1
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: cmd error handler
[Wed Sep 28 12:29:02 2022] sas: ata7: end_device-0:0: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[Wed Sep 28 12:29:02 2022] sas: ata8: end_device-0:1: dev error handler
[Wed Sep 28 12:29:02 2022] ata7.00: failed command: READ DMA EXT
[Wed Sep 28 12:29:02 2022] ata7.00: cmd 25/00:08:10:d8:5d/00:00:84:01:00/e0 tag 8 dma 4096 in
res 51/40:00:10:d8:5d/00:00:84:01:00/e0 Emask 0x9 (media error)
[Wed Sep 28 12:29:02 2022] ata7.00: status: { DRDY ERR }
[Wed Sep 28 12:29:02 2022] ata7.00: error: { UNC }
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: supports DRM functions and may not be fully accessible
[Wed Sep 28 12:29:02 2022] ata7.00: configured for UDMA/133
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Sense Key : Medium Error [current] [descriptor]
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] Add. Sense: Unrecovered read error - auto reallocate failed
[Wed Sep 28 12:29:02 2022] sd 0:0:0:0: [sda] CDB: Read(16) 88 00 00 00 00 01 84 5d d8 10 00 00 00 08 00 00
[Wed Sep 28 12:29:02 2022] blk_update_request: I/O error, dev sda, sector 6515709968
[Wed Sep 28 12:29:02 2022] ata7: EH complete
[Wed Sep 28 12:29:02 2022] sas: --- Exit sas_scsi_recover_host: busy: 0 failed: 1 tries: 1
[Wed Sep 28 12:29:02 2022] ata7.00: Enabling discard_zeroes_data
Aniostat -xdct 1 100
显示了 R/W 速率和平均队列大小的非常合理的数字:
grep "^sda" iostat-xdct | awk '{n+=1; r+=$6; w+=$7; qsz+=$9; qmx=qmx<$9?$9:qmx; qmi=qmi>$9?$9:qmi}END{printf("%.3f\t%.3f\t%.3f\t\t[%.3f , %.3f]\n",r/n,w/n,qsz/n,qmi,qmx)}'
818.239 6.939 0.038 [0.000 , 0.890]
根据我们所有通常的指标,该系统运行良好。但是,我担心这可能会在最意想不到的时候导致致命的系统错误。
我不知道报告的错误是什么意思。我更不知道如何评估保持系统这样运行所涉及的风险。我应该立即更换磁盘吗?
我将在此处粘贴 smartctl -a /dev/sda 的输出:
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-3.10.0-693.21.1.el7.x86_64] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Device Model: Samsung SSD 870 EVO 4TB
Serial Number: S6BBNJ0R700321V
LU WWN Device Id: 5 002538 f31706f50
Firmware Version: SVT01B6Q
User Capacity: 4,000,787,030,016 bytes [4.00 TB]
Sector Size: 512 bytes logical/physical
Rotation Rate: Solid State Device
Form Factor: 2.5 inches
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: Unknown(0x09fc), ACS-4 T13/BSR INCITS 529 revision 5
SATA Version is: SATA >3.2 (0x1ff), 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Wed Sep 28 12:58:46 2022 EDT
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED
General SMART Values:
Offline data collection status: (0x00) Offline data collection activity
was never started.
Auto Offline Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete Offline
data collection: ( 0) seconds.
Offline data collection
capabilities: (0x53) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
No Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
General Purpose Logging supported.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 320) minutes.
SCT capabilities: (0x003d) SCT Status supported.
SCT Error Recovery Control supported.
SCT Feature Control supported.
SCT Data Table supported.
SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 068 068 010 Pre-fail Always - 1510
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 9429
12 Power_Cycle_Count 0x0032 099 099 000 Old_age Always - 6
177 Wear_Leveling_Count 0x0013 099 099 000 Pre-fail Always - 11
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 068 068 010 Pre-fail Always - 1510
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 068 068 010 Pre-fail Always - 1510
187 Reported_Uncorrect 0x0032 099 099 000 Old_age Always - 8242
190 Airflow_Temperature_Cel 0x0032 068 056 000 Old_age Always - 32
195 Hardware_ECC_Recovered 0x001a 199 199 000 Old_age Always - 8242
199 UDMA_CRC_Error_Count 0x003e 100 100 000 Old_age Always - 0
235 Unknown_Attribute 0x0012 099 099 000 Old_age Always - 4
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 35415578583
SMART Error Log Version: 1
ATA Error Count: 8242 (device log contains only the most recent five errors)
CR = Command Register [HEX]
FR = Features Register [HEX]
SC = Sector Count Register [HEX]
SN = Sector Number Register [HEX]
CL = Cylinder Low Register [HEX]
CH = Cylinder High Register [HEX]
DH = Device/Head Register [HEX]
DC = Device Command Register [HEX]
ER = Error register [HEX]
ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.
Error 8242 occurred at disk power-on lifetime: 9429 hours (392 days + 21 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 10 d8 5d e0 Error:
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
Error 8241 occurred at disk power-on lifetime: 9428 hours (392 days + 20 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 e8 d7 5d e0 Error:
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
Error 8240 occurred at disk power-on lifetime: 9427 hours (392 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 e8 d7 5d e0 Error:
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
Error 8239 occurred at disk power-on lifetime: 9427 hours (392 days + 19 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 e8 d7 5d e0 Error:
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
Error 8238 occurred at disk power-on lifetime: 9426 hours (392 days + 18 hours)
When the command that caused the error occurred, the device was active or idle.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 51 08 e8 d7 5d e0 Error:
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
SMART Self-test log structure revision number 1
No self-tests have been logged. [To run self-tests, use: smartctl -t]
SMART Selective self-test log data structure revision number 1
SPAN MIN_LBA MAX_LBA CURRENT_TEST_STATUS
1 0 0 Not_testing
2 0 0 Not_testing
3 0 0 Not_testing
4 0 0 Not_testing
5 0 0 Not_testing
256 0 65535 Read_scanning was never started
Selective self-test flags (0x0):
After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.