自毁硬盘之谜

自毁硬盘之谜

他们的共同点是:

  • 所有机械磁盘
  • 安装在 arch-linux 系统上
  • 计算机 24 小时不间断运行
  • 过去三年里,他们都从这家商店购买了新产品
  • 它们全部托管 ext4 分区
  • 分区表是用 fdisk 创建的
  • 所有计算机都放在同一个地方

许多人都经历过这样的情况:

  • 数周或数月后,它们会无缘无故地开始死亡。

遇难者总数:

  • 4

我改变的事情:

  • 硬件,完全不同的计算机,只有相同的键盘、鼠标和机箱
  • 软件,arch linux 的不同安装,安装相同的程序,共享一些用户和组

我知道系统不停地运行会带来很大的压力,但包括我在内的大多数人在这种情况下都有健康的磁盘。

可能的原因:

  • Arch linux 是串行硬盘杀手??
  • 我所在城市的电脑配件卖家都是混蛋
  • 现代机械硬盘由纸板制成
  • 我是万磁王???

编辑:
对于那些询问的人,这里有一些通过 journal ctl 发送的内核消息:

Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#8 Sense Key : Illegal Request [current] 
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#8 Add. Sense: Unaligned write command
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#8 CDB: Read(10) 28 00 3b d4 ad e8 00 00 10 00
Sep 27 22:59:05 archiso kernel: blk_update_request: I/O error, dev sdb, sector 1003793896 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#9 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE cmd_age=4s
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#9 Sense Key : Illegal Request [current] 
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#9 Add. Sense: Unaligned write command
Sep 27 22:59:05 archiso kernel: sd 1:0:0:0: [sdb] tag#9 CDB: Read(10) 28 00 5b d4 b2 30 00 00 08 00
Sep 27 22:59:05 archiso kernel: blk_update_request: I/O error, dev sdb, sector 1540665904 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0
Sep 27 22:59:05 archiso kernel: ata2: EH complete

这是 smartctl -x 的结果

smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.11.16-arch1-1] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate BarraCuda 3.5
Device Model:     ST1000DM010-2EP102
Serial Number:    ZN1R1X25
LU WWN Device Id: 5 000c50 0dbee2477
Firmware Version: CC46
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    7200 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Sep 27 23:06:25 2021 UTC
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
AAM feature is:   Unavailable
APM level is:     128 (minimum power consumption without standby)
Rd look-ahead is: Enabled
Write cache is:   Enabled
DSN feature is:   Unavailable
ATA Security is:  Disabled, NOT FROZEN [SEC1]
Wt Cache Reorder: Unavailable

=== 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:            (0x73) 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.
                    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:    (   1) minutes.
Extended self-test routine
recommended polling time:    ( 116) minutes.
Conveyance self-test routine
recommended polling time:    (   2) minutes.
SCT capabilities:          (0x1085) SCT Status supported.

SMART Attributes Data Structure revision number: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAGS    VALUE WORST THRESH FAIL RAW_VALUE
  1 Raw_Read_Error_Rate     POSR--   069   063   006    -    8617064
  3 Spin_Up_Time            PO----   099   097   000    -    0
  4 Start_Stop_Count        -O--CK   100   100   020    -    343
  5 Reallocated_Sector_Ct   PO--CK   100   100   010    -    0
  7 Seek_Error_Rate         POSR--   061   060   045    -    1413579
  9 Power_On_Hours          -O--CK   099   099   000    -    930
 10 Spin_Retry_Count        PO--C-   100   100   097    -    0
 12 Power_Cycle_Count       -O--CK   100   100   020    -    343
183 Runtime_Bad_Block       -O--CK   100   100   000    -    0
184 End-to-End_Error        -O--CK   100   100   099    -    0
187 Reported_Uncorrect      -O--CK   100   100   000    -    0
188 Command_Timeout         -O--CK   100   100   000    -    0 0 0
189 High_Fly_Writes         -O-RCK   100   100   000    -    0
190 Airflow_Temperature_Cel -O---K   067   063   040    -    33 (Min/Max 30/33)
193 Load_Cycle_Count        -O--CK   100   100   000    -    374
194 Temperature_Celsius     -O---K   033   012   000    -    33 (0 12 0 0 0)
195 Hardware_ECC_Recovered  -O-RC-   004   001   000    -    8617064
197 Current_Pending_Sector  -O--C-   100   100   000    -    0
198 Offline_Uncorrectable   ----C-   100   100   000    -    0
199 UDMA_CRC_Error_Count    -OSRCK   200   200   000    -    0
240 Head_Flying_Hours       ------   100   253   000    -    659h+27m+34.555s
241 Total_LBAs_Written      ------   100   253   000    -    425240194
242 Total_LBAs_Read         ------   100   253   000    -    990859577
                            ||||||_ K auto-keep
                            |||||__ C event count
                            ||||___ R error rate
                            |||____ S speed/performance
                            ||_____ O updated online
                            |______ P prefailure warning

General Purpose Log Directory Version 1
SMART           Log Directory Version 1 [multi-sector log support]
Address    Access  R/W   Size  Description
0x00       GPL,SL  R/O      1  Log Directory
0x01           SL  R/O      1  Summary SMART error log
0x02           SL  R/O      5  Comprehensive SMART error log
0x03       GPL     R/O      5  Ext. Comprehensive SMART error log
0x04       GPL,SL  R/O      8  Device Statistics log
0x06           SL  R/O      1  SMART self-test log
0x07       GPL     R/O      1  Extended self-test log
0x09           SL  R/W      1  Selective self-test log
0x10       GPL     R/O      1  NCQ Command Error log
0x11       GPL     R/O      1  SATA Phy Event Counters log
0x21       GPL     R/O      1  Write stream error log
0x22       GPL     R/O      1  Read stream error log
0x24       GPL     R/O    512  Current Device Internal Status Data log
0x30       GPL,SL  R/O      9  IDENTIFY DEVICE data log
0x80-0x9f  GPL,SL  R/W     16  Host vendor specific log
0xa1       GPL,SL  VS      20  Device vendor specific log
0xa2       GPL     VS    4120  Device vendor specific log
0xa8       GPL,SL  VS     129  Device vendor specific log
0xa9       GPL,SL  VS       1  Device vendor specific log
0xab       GPL     VS       1  Device vendor specific log
0xb0       GPL     VS    4800  Device vendor specific log
0xbe-0xbf  GPL     VS   65535  Device vendor specific log
0xc0       GPL,SL  VS       1  Device vendor specific log
0xc1       GPL,SL  VS      10  Device vendor specific log
0xe0       GPL,SL  R/W      1  SCT Command/Status
0xe1       GPL,SL  R/W      1  SCT Data Transfer

SMART Extended Comprehensive Error Log Version: 1 (5 sectors)
No Errors Logged

SMART Extended Self-test Log Version: 1 (1 sectors)
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Interrupted (host reset)      00%       926         -

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.

SCT Status Version:                  3
SCT Version (vendor specific):       522 (0x020a)
Device State:                        Active (0)
Current Temperature:                    32 Celsius
Power Cycle Min/Max Temperature:     31/32 Celsius
Lifetime    Min/Max Temperature:     12/36 Celsius
Under/Over Temperature Limit Count:   0/0

SCT Data Table command not supported

SCT Error Recovery Control command not supported

Device Statistics (GP Log 0x04)
Page  Offset Size        Value Flags Description
0x01  =====  =               =  ===  == General Statistics (rev 1) ==
0x01  0x008  4             343  ---  Lifetime Power-On Resets
0x01  0x010  4             930  ---  Power-on Hours
0x01  0x018  6       426097940  ---  Logical Sectors Written
0x01  0x020  6         5275103  ---  Number of Write Commands
0x01  0x028  6      1111543100  ---  Logical Sectors Read
0x01  0x030  6         6138628  ---  Number of Read Commands
0x01  0x038  6               -  ---  Date and Time TimeStamp
0x03  =====  =               =  ===  == Rotating Media Statistics (rev 1) ==
0x03  0x008  4             929  ---  Spindle Motor Power-on Hours
0x03  0x010  4             303  ---  Head Flying Hours
0x03  0x018  4             374  ---  Head Load Events
0x03  0x020  4               0  ---  Number of Reallocated Logical Sectors
0x03  0x028  4               0  ---  Read Recovery Attempts
0x03  0x030  4               0  ---  Number of Mechanical Start Failures
0x03  0x038  4               0  ---  Number of Realloc. Candidate Logical Sectors
0x04  =====  =               =  ===  == General Errors Statistics (rev 1) ==
0x04  0x008  4               0  ---  Number of Reported Uncorrectable Errors
0x04  0x010  4               0  ---  Resets Between Cmd Acceptance and Completion
0x05  =====  =               =  ===  == Temperature Statistics (rev 1) ==
0x05  0x008  1              32  ---  Current Temperature
0x05  0x010  1              31  ---  Average Short Term Temperature
0x05  0x018  1               -  ---  Average Long Term Temperature
0x05  0x020  1              36  ---  Highest Temperature
0x05  0x028  1              20  ---  Lowest Temperature
0x05  0x030  1              31  ---  Highest Average Short Term Temperature
0x05  0x038  1              27  ---  Lowest Average Short Term Temperature
0x05  0x040  1               -  ---  Highest Average Long Term Temperature
0x05  0x048  1               -  ---  Lowest Average Long Term Temperature
0x05  0x050  4               0  ---  Time in Over-Temperature
0x05  0x058  1              55  ---  Specified Maximum Operating Temperature
0x05  0x060  4               0  ---  Time in Under-Temperature
0x05  0x068  1              13  ---  Specified Minimum Operating Temperature
                                |||_ C monitored condition met
                                ||__ D supports DSN
                                |___ N normalized value

Pending Defects log (GP Log 0x0c) not supported

SATA Phy Event Counters (GP Log 0x11)
ID      Size     Value  Description
0x000a  2            1  Device-to-host register FISes sent due to a COMRESET
0x0001  2            0  Command failed due to ICRC error
0x0003  2            0  R_ERR response for device-to-host data FIS
0x0004  2            0  R_ERR response for host-to-device data FIS
0x0006  2            0  R_ERR response for device-to-host non-data FIS
0x0007  2            0  R_ERR response for host-to-device non-data FIS

答案1

显然是 SATA 电源插头没有对准,而且可能一直都是这样。插头很紧,但角度有点不对。这种事不会发生在老式 molok 上。

相关内容