Sata

SATA 錯誤出現在 Journalctl 中,而 SMART 診斷正常 - 主機板問題?

  • February 23, 2022

在註意到異常長的磁碟操作延遲後,我查找了 journalctl,這就是我發現的:

Feb 22 14:02:11.711182 Onan01 kernel: ata10: hard resetting link
Feb 22 14:02:12.186958 Onan01 kernel: ata10: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 22 14:02:12.187044 Onan01 kernel: ata10.00: configured for UDMA/33
Feb 22 14:02:12.187068 Onan01 kernel: ata10: EH complete
Feb 22 14:02:22.782960 Onan01 kernel: ata10: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 22 14:02:22.783033 Onan01 kernel: ata10.00: configured for UDMA/33
Feb 22 14:03:27.472083 Onan01 kernel: ata10.00: exception Emask 0x0 SAct 0x0 SErr 0xd0000 action 0x6 frozen
Feb 22 14:03:27.472241 Onan01 kernel: ata10: SError: { PHYRdyChg CommWake 10B8B }
Feb 22 14:03:27.472271 Onan01 kernel: ata10.00: failed command: WRITE DMA EXT
Feb 22 14:03:27.472300 Onan01 kernel: ata10.00: cmd 35/00:18:00:35:44/00:00:74:00:00/e0 tag 14 dma 12288 out
                                              res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
Feb 22 14:03:27.472323 Onan01 kernel: ata10.00: status: { DRDY }
Feb 22 14:03:27.472345 Onan01 kernel: ata10: hard resetting link
Feb 22 14:03:27.950979 Onan01 kernel: ata10: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
Feb 22 14:03:27.951084 Onan01 kernel: ata10.00: configured for UDMA/33
Feb 22 14:03:27.951113 Onan01 kernel: ata10: EH complete
Feb 22 14:04:03.852081 Onan01 kernel: ata10.00: exception Emask 0x10 SAct 0x0 SErr 0x40d0000 action 0xe frozen
Feb 22 14:04:03.852242 Onan01 kernel: ata10.00: irq_stat 0x00000040, connection status changed
Feb 22 14:04:03.852274 Onan01 kernel: ata10: SError: { PHYRdyChg CommWake 10B8B DevExch }
Feb 22 14:04:03.852301 Onan01 kernel: ata10.00: failed command: WRITE DMA EXT
Feb 22 14:04:03.852325 Onan01 kernel: ata10.00: cmd 35/00:38:58:35:44/00:00:74:00:00/e0 tag 17 dma 28672 out
                                              res 50/00:00:38:23:00/00:00:ac:00:00/e0 Emask 0x10 (ATA bus error)
Feb 22 14:04:03.852357 Onan01 kernel: ata10.00: status: { DRDY }

第一種錯誤(超時)似乎比第二種錯誤(ATA 匯流排錯誤)更頻繁。每個都有不少。SATA 通道ata10連接到 WD Caviar Green HDD。

此磁碟上的 SMART 診斷顯然是乾淨的:

sudo smartctl --all /dev/sdf1
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.4.0-100-generic] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     WDC WD20EZAZ-00GGJB0
Serial Number:    WD-WXT1A29LE265
LU WWN Device Id: 5 0014ee 211b07a4f
Firmware Version: 80.00A80
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ACS-3 T13/2161-D revision 5
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Feb 23 11:37:14 2022 IST
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:        (32520) seconds.
Offline data collection
capabilities:            (0x7b) SMART execute Offline immediate.
                   Auto Offline data collection on/off support.
                   Suspend Offline collection upon new
                   command.
                   Offline surface scan supported.
                   Self-test supported.
                   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:    ( 103) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.
SCT capabilities:          (0x3035) SCT Status 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     0x002f   200   200   051    Pre-fail  Always       -       0
 3 Spin_Up_Time            0x0027   184   170   021    Pre-fail  Always       -       1783
 4 Start_Stop_Count        0x0032   099   099   000    Old_age   Always       -       1573
 5 Reallocated_Sector_Ct   0x0033   200   200   140    Pre-fail  Always       -       0
 7 Seek_Error_Rate         0x002e   200   200   000    Old_age   Always       -       0
 9 Power_On_Hours          0x0032   083   083   000    Old_age   Always       -       13100
10 Spin_Retry_Count        0x0032   100   100   000    Old_age   Always       -       0
11 Calibration_Retry_Count 0x0032   100   100   000    Old_age   Always       -       0
12 Power_Cycle_Count       0x0032   099   099   000    Old_age   Always       -       1524
192 Power-Off_Retract_Count 0x0032   199   199   000    Old_age   Always       -       761
193 Load_Cycle_Count        0x0032   147   147   000    Old_age   Always       -       160779
194 Temperature_Celsius     0x0022   115   104   000    Old_age   Always       -       28
196 Reallocated_Event_Count 0x0032   200   200   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0032   200   200   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0030   100   253   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
200 Multi_Zone_Error_Rate   0x0008   100   253   000    Old_age   Offline      -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed without error       00%     13100         -
# 2  Short offline       Completed without error       00%     13099         -

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.

一件奇怪的事情是,長時間的 SMART 測試似乎無法正常工作。它們從進度 90% 直接完成(沒有 80%、70% 等),之後,它們不會出現在“SMART 自測日誌”部分中。

我連續兩天經歷了文件操作延遲。重新啟動後,問題似乎消失了,然後又回來了。具體來說,問題表現為複製或移動文件的長時間延遲以及 LibreOffice 掛起文件保存。知道導致此類錯誤的原因是什麼嗎?

作業系統:Ubuntu 20.04

處理器:銳龍3

MB:技嘉 X570 UD

您引用的消息表明 S-ATA 鏈路存在硬體問題。SMART 專注於磁碟驅動器本身的內部工作,不會報告此類問題。

可能的原因包括 S-ATA 電纜損壞或脫落、連接器髒污或安裝不當,或者主機板或磁碟驅動器上的介面有缺陷。

故障排除步驟:

  • 拔下並重新插入 S-ATA 電纜
  • 檢查 S-ATA 電纜和連接器是否損壞或髒污
  • 更換 S-ATA 電纜
  • 在主機板上嘗試不同的 S-ATA 埠
  • 換個硬碟試試

引用自:https://serverfault.com/questions/1094532