编辑

编辑

我的笔记本电脑的硬盘突然变得非常慢(重新启动后)。

hdparm告诉我缓存和缓冲的读取都在数百 kB/秒的范围内 - 这比我的以太网慢。

另一个磁盘(SSD)仍然相当快(数十到数百MB/秒)。

我不记得对系统配置进行过任何更改。这台机器已经使用了大约 4 年,并且已经被大量使用,因此硬件故障不会异常 - 尽管如此,我很想了解我的磁盘究竟发生了什么,导致速度如此缓慢。

有哪些好方法可以诊断问题并确定是否可以通过软件修复,或者该 HDD 的时代是否已经结束?

  • iotop显示了一些进程时不时地阻塞写入(最明显的是 chrome),但这有数百 kb - 我希望健康的磁盘不应该能够处理这些
  • HD 容量为 2 TB,仅占 55%
  • 我的机器有 32 GB 内存,在出现问题时基本上没有任何内存在使用。没有发生交换。
  • 磁盘已格式化为 ext4
  • gnome-disks没有显示任何异常并声称“磁盘正常”

任何帮助是极大的赞赏!

编辑

智能控制输出:

smartctl -a

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

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda 2.5 5400
Device Model:     ST2000LM015-2E8174
Serial Number:    WDZ42GC1
LU WWN Device Id: 5 000c50 0a924e67a
Firmware Version: SDM1
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:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-3 T13/2161-D revision 3b
SATA Version is:  SATA 3.1, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Thu Sep 16 15:34:18 2021 CEST
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:            (0x71) SMART execute Offline immediate.
                    No Auto Offline data collection 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:    ( 326) 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: 10
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000f   083   064   006    Pre-fail  Always       -       178015037
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   094   094   020    Old_age   Always       -       6386
  5 Reallocated_Sector_Ct   0x0033   100   100   036    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000f   079   060   045    Pre-fail  Always       -       21859995677
  9 Power_On_Hours          0x0032   090   090   000    Old_age   Always       -       9557 (203 232 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   094   094   020    Old_age   Always       -       6312
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   100   100   000    Old_age   Always       -       0
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       2
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   067   050   040    Old_age   Always       -       33 (Min/Max 24/33)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       81
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       65
193 Load_Cycle_Count        0x0032   070   070   000    Old_age   Always       -       61546
194 Temperature_Celsius     0x0022   033   050   000    Old_age   Always       -       33 (0 10 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x003e   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       9437 (13 80 0)
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       15466926078
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       8392824054
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       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%      9553         -

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.

dmesg 输出:

sudo dmesg -t --level=alert,crit,err,warn
MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
 #3
ata3.00: supports DRM functions and may not be fully accessible
ata3.00: supports DRM functions and may not be fully accessible
vboxdrv: loading out-of-tree module taints kernel.
VBoxNetAdp: Successfully started.
VBoxNetFlt: Successfully started.
r8169 0000:03:00.1: can't disable ASPM; OS doesn't have ASPM control
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
kauditd_printk_skb: 33 callbacks suppressed
kauditd_printk_skb: 10 callbacks suppressed
kauditd_printk_skb: 146 callbacks suppressed

hdparm -I output

/dev/sda:

ATA device, with non-removable media
    Model Number:       ST2000LM015-2E8174                      
    Serial Number:      WDZ42GC1
    Firmware Revision:  SDM1    
    Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6, SATA Rev 3.0
Standards:
    Used: unknown (minor revision code 0x001f) 
    Supported: 10 9 8 7 6 5 
    Likely used: 10
Configuration:
    Logical     max current
    cylinders   16383   16383
    heads       16  16
    sectors/track   63  63
    --
    CHS current addressable sectors:    16514064
    LBA    user addressable sectors:   268435455
    LBA48  user addressable sectors:  3907029168
    Logical  Sector size:                   512 bytes
    Physical Sector size:                  4096 bytes
    Logical Sector-0 offset:                  0 bytes
    device size with M = 1024*1024:     1907729 MBytes
    device size with M = 1000*1000:     2000398 MBytes (2000 GB)
    cache/buffer size  = unknown
    Form Factor: 2.5 inch
    Nominal Media Rotation Rate: 5400
Capabilities:
    LBA, IORDY(can be disabled)
    Queue depth: 32
    Standby timer values: spec'd by Standard, no device specific minimum
    R/W multiple sector transfer: Max = 16  Current = 16
    Advanced power management level: 128
    Recommended acoustic management value: 208, current value: 208
    DMA: mdma0 mdma1 mdma2 udma0 udma1 udma2 udma3 udma4 udma5 *udma6 
         Cycle time: min=120ns recommended=120ns
    PIO: pio0 pio1 pio2 pio3 pio4 
         Cycle time: no flow control=120ns  IORDY flow control=120ns
Commands/features:
    Enabled Supported:
       *    SMART feature set
            Security Mode feature set
       *    Power Management feature set
       *    Write cache
       *    Look-ahead
       *    Host Protected Area feature set
       *    WRITE_BUFFER command
       *    READ_BUFFER command
       *    NOP cmd
       *    DOWNLOAD_MICROCODE
       *    Advanced Power Management feature set
            Power-Up In Standby feature set
       *    SET_FEATURES required to spinup after power up
            SET_MAX security extension
       *    48-bit Address feature set
       *    Device Configuration Overlay feature set
       *    Mandatory FLUSH_CACHE
       *    FLUSH_CACHE_EXT
       *    SMART error logging
       *    SMART self-test
       *    General Purpose Logging feature set
       *    WRITE_{DMA|MULTIPLE}_FUA_EXT
       *    64-bit World wide name
       *    IDLE_IMMEDIATE with UNLOAD
            Write-Read-Verify feature set
       *    WRITE_UNCORRECTABLE_EXT command
       *    {READ,WRITE}_DMA_EXT_GPL commands
       *    Segmented DOWNLOAD_MICROCODE
       *    Gen1 signaling speed (1.5Gb/s)
       *    Gen2 signaling speed (3.0Gb/s)
       *    Gen3 signaling speed (6.0Gb/s)
       *    Native Command Queueing (NCQ)
       *    Host-initiated interface power management
       *    Phy event counters
       *    Idle-Unload when NCQ is active
       *    READ_LOG_DMA_EXT equivalent to READ_LOG_EXT
       *    DMA Setup Auto-Activate optimization
       *    Device-initiated interface power management
            Asynchronous notification (eg. media change)
       *    Software settings preservation
       *    SMART Command Transport (SCT) feature set
       *    SCT Write Same (AC2)
       *    SCT Features Control (AC4)
       *    SCT Data Tables (AC5)
            unknown 206[12] (vendor specific)
            unknown 206[13] (vendor specific)
       *    DOWNLOAD MICROCODE DMA command
Security: 
    Master password revision code = 65534
        supported
    not enabled
    not locked
    not frozen
    not expired: security count
        supported: enhanced erase
    326min for SECURITY ERASE UNIT. 326min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000c500a924e67a
    NAA     : 5
    IEEE OUI    : 000c50
    Unique ID   : 0a924e67a
Checksum: correct

相关内容