大约一周前,我注意到我的一个驱动器上的文件系统已损坏。我已经用 fsck 修复了几次,但总是遇到问题。我怀疑这可能是硬件故障。我最近了解了 smartmontools,它利用了某些磁盘的自记录功能。运行后
smartctl -t long -C /dev/sda
然后等待指定的时间,我使用以下命令访问日志
smartctl -a /dev/sda
这是输出。尽管驱动器被列为“通过”,但仍检测到五个错误。大家觉得怎么样?
smartctl 7.3 2022-02-28 r5338 [armv7l-linux-5.15.74-gentoo] (local build)
Copyright (C) 2002-22, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Western Digital Gold
Device Model: WDC WD102KRYZ-01A5AB0
Serial Number: VCJ720GP
LU WWN Device Id: 5 000cca 0b0df652b
Firmware Version: 01.01H01
User Capacity: 10,000,831,348,736 bytes [10.0 TB]
Sector Sizes: 512 bytes logical, 4096 bytes physical
Rotation Rate: 7200 rpm
Form Factor: 3.5 inches
Device is: In smartctl database 7.3/5319
ATA Version is: ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is: SATA 3.2, 6.0 Gb/s (current: 3.0 Gb/s)
Local Time is: Wed Jan 25 04:29:49 2023 EST
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: (0x84) Offline data collection activity
was suspended by an interrupting command from host.
Auto Offline Data Collection: Enabled.
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: ( 87) seconds.
Offline data collection
capabilities: (0x5b) SMART execute Offline immediate.
Auto Offline data collection on/off support.
Suspend Offline collection upon new
command.
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: (1103) 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: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000b 100 100 016 Pre-fail Always - 0
2 Throughput_Performance 0x0005 132 132 054 Pre-fail Offline - 96
3 Spin_Up_Time 0x0007 253 253 024 Pre-fail Always - 85 (Average 82)
4 Start_Stop_Count 0x0012 100 100 000 Old_age Always - 618
5 Reallocated_Sector_Ct 0x0033 100 100 005 Pre-fail Always - 0
7 Seek_Error_Rate 0x000b 100 100 067 Pre-fail Always - 0
8 Seek_Time_Performance 0x0005 128 128 020 Pre-fail Offline - 18
9 Power_On_Hours 0x0012 099 099 000 Old_age Always - 8776
10 Spin_Retry_Count 0x0013 100 100 060 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 618
192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 1959
193 Load_Cycle_Count 0x0012 099 099 000 Old_age Always - 1959
194 Temperature_Celsius 0x0002 105 105 000 Old_age Always - 57 (Min/Max 20/75)
196 Reallocated_Event_Count 0x0032 100 100 000 Old_age Always - 0
197 Current_Pending_Sector 0x0022 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0008 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x000a 200 200 000 Old_age Always - 0
SMART Error Log Version: 1
ATA Error Count: 5
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 5 occurred at disk power-on lifetime: 7233 hours (301 days + 9 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 00 00 00 00 00
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
27 00 00 00 00 00 e0 08 00:00:13.239 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 08 00:00:13.238 IDENTIFY DEVICE
Error 4 occurred at disk power-on lifetime: 7233 hours (301 days + 9 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 53 00 00 00 00 00
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
27 00 00 00 00 00 e0 08 00:00:18.904 READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
ec 00 00 00 00 00 a0 08 00:00:18.903 IDENTIFY DEVICE
a1 00 00 00 00 00 a0 08 00:00:17.385 IDENTIFY PACKET DEVICE
ec 00 00 00 00 00 a0 08 00:00:17.385 IDENTIFY DEVICE
2f 00 01 10 00 00 a0 08 00:00:17.384 READ LOG EXT
Error 3 occurred at disk power-on lifetime: 7168 hours (298 days + 16 hours)
When the command that caused the error occurred, the device was doing SMART Offline or Self-test.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 53 08 80 ff 3f 40 Error: UNC 8 sectors at LBA = 0x003fff80 = 4194176
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
25 00 08 80 ff 3f e0 08 00:01:38.837 READ DMA EXT
ec 00 00 00 00 00 a0 08 00:01:38.833 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 08 00:01:38.685 SET FEATURES [Set transfer mode]
ec 00 00 00 00 00 a0 08 00:01:38.683 IDENTIFY DEVICE
25 00 08 80 ff 3f e0 08 00:01:36.902 READ DMA EXT
Error 2 occurred at disk power-on lifetime: 7168 hours (298 days + 16 hours)
When the command that caused the error occurred, the device was doing SMART Offline or Self-test.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 53 08 00 00 00 40 Error: UNC 8 sectors at LBA = 0x00000000 = 0
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 08 00 00 00 e0 08 00:01:24.305 READ DMA
ec 00 00 00 00 00 a0 08 00:01:24.211 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 08 00:01:24.207 SET FEATURES [Set transfer mode]
ec 00 00 00 00 00 a0 08 00:01:24.205 IDENTIFY DEVICE
c8 00 08 00 00 00 e0 08 00:01:23.967 READ DMA
Error 1 occurred at disk power-on lifetime: 7168 hours (298 days + 16 hours)
When the command that caused the error occurred, the device was doing SMART Offline or Self-test.
After command completion occurred, registers were:
ER ST SC SN CL CH DH
-- -- -- -- -- -- --
40 53 08 00 00 00 40 Error: UNC 8 sectors at LBA = 0x00000000 = 0
Commands leading to the command that caused the error were:
CR FR SC SN CL CH DH DC Powered_Up_Time Command/Feature_Name
-- -- -- -- -- -- -- -- ---------------- --------------------
c8 00 08 00 00 00 e0 08 00:01:23.968 READ DMA
ec 00 00 00 00 00 a0 08 00:01:23.912 IDENTIFY DEVICE
ef 03 46 00 00 00 a0 08 00:01:23.572 SET FEATURES [Set transfer mode]
ef c3 01 00 00 00 a0 08 00:01:23.485 SET FEATURES [Sense Data Reporting]
ec 00 00 00 00 00 a0 08 00:01:23.483 IDENTIFY DEVICE
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
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
答案1
SMART 值标准化为 100,越低越差。这些价值观看起来都很健康。特别是,不存在不可纠正的扇区或重新分配的扇区,并且原始读取错误率良好。
所以运行长时间的自检,看看是否出现坏扇区。还可以直接运行badblk
扫描,以防万一。
根据到目前为止的信息,我还开始寻找不同的原因,例如内存故障。获得有关哪些内容已损坏、哪些 fsck 已修复以及是否与硬盘的某个特定扇区或整个地方相关的信息将非常有帮助。