1

I noticed about a week ago that the file system on one of my drives is corrupted. I've repaired it several times with fsck, but I keep running into problem. I suspect that this may be a hardware failure. I recently learned about smartmontools, takes advantage of the self logging that some disks do. After running

smartctl -t long -C /dev/sda

and then waiting the amount of time indicated, I access the log with

smartctl -a /dev/sda

Here is the output. There are five errors detected, although the drive is listed as "PASSED". What do you all think?

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
4
  • 1
    no selftests logged, try running a full one? smartctl -t long also check dmesg/syslog for errors. the smartctl errors are ~1500 power on hours ago so whatever happened there it's not something current. temperature seems a bit high, the drive is not getting cooled properly? Jan 25, 2023 at 9:58
  • Ah, sorry, I did the short test first, but the results we're seeing here are from the long test. Let me update the post.
    – jyoung
    Jan 25, 2023 at 10:15
  • Just wondering if you are shutting down correctly. It looks like the problematic HDD may be connected via USB. It might be worth unmounting the HDD first when you shutdown. That way you can be sure all changes to the disk are written correctly if it unmounts without error
    – PonJar
    Jan 26, 2023 at 11:17
  • Yes, in the past month I have had to do several hard stops. The machine has developed another problem where it hangs, and doesn't respond. As far as I can tell this is unrelated, but I've also not been able to identify the cause. That might have corrupted the file system, even if the drive is intact. The drive is not plugged into a USB port, however, connected directly via SATA.
    – jyoung
    Jan 27, 2023 at 19:21

1 Answer 1

0

SMART values are normed to 100, lower is worse. The values all look healthy. In particular, there are no uncorrectable sectors or reallocated sectors, and the raw read error rate is fine.

So run the long selftest, see if it comes up with bad sectors. Also run a badblk scan directly, just in case.

From the information so far, I'd also start to look at different causes, e.g. bad RAM. It would be extremely helpful to have information about what was corrupted, what fsck repaired, and if it is related to one particular sector of the harddisk or all over the place.

15
  • I'm running badblocks now. The symptoms were issues with file access, software crashing when trying to create new files, checksums not matching, and even a very strange problem where ls would detect a file if it was given the exact name, but would not detect it through wildcard expansion. fsck found multiple problems each time I ran it; unfortunately I didn't save those messages. I did notice a pattern that really old files did not seem affected, it was mostly with new(er) files. If it were a problem with RAM, how could I diagnose that?
    – jyoung
    Jan 25, 2023 at 10:45
  • Get memtest86+ and run it over night. The package is available in most distros and adds itself to GRUB. Make sure you install the newer version 6 which is UEFI compatible.
    – Freddy
    Jan 25, 2023 at 11:09
  • I was just websearching memtest86+. I don't know if that will work for this system. It's a banana pi M1+, which is a 32-bit arm system that required a non-standard bootloader (which was actually a tone of work to set up). Can memtest86+ run as a standalone, and not through the bootloard?
    – jyoung
    Jan 25, 2023 at 11:35
  • Sorry, it only works on x86 CPUs and PassMark Memtest only works on x86 and ARM64. Don't know if there is another tool out there for your platform.
    – Freddy
    Jan 25, 2023 at 12:23
  • I had RAM trouble that wasn't discovered by memtest86+. I had several DIMMs, so I swapped them, and the symptoms changed, that's how I got confirmation. I only got the proof after buying new RAM, and then the problems disappeared. Your assortment of very different problems could very well be bad RAM (or an overheating CPU, or ...). I'd put the harddisk way down on the list of potential causes from what I've heard so far.
    – dirkt
    Jan 25, 2023 at 12:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .