我的日立硬盘无法读写,但 SMART 结果和其他结果正常。为什么?

我的日立硬盘无法读写,但 SMART 结果和其他结果正常。为什么?

我不关心驱动器上的任何数据,也不打算将来在驱动器上存储重要数据 - 这纯粹是一项学术活动!


尝试读取或写入导致失败:

$sudo dd if=/dev/sda count=1
dd: error reading '/dev/sda': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.150944 s, 0.0 kB/s

$sudo dd if=/dev/zero of=/dev/sda count=1
dd: writing to '/dev/sda': Input/output error
1+0 records in
0+0 records out
0 bytes copied, 0.143382 s, 0.0 kB/s

$sudo parted -l
Error: /dev/sda: unrecognised disk label
Warning: Error fsyncing/closing /dev/sda: Input/output error
Retry/Ignore?      

dmesg报告以下信息:

[84718.986340] ata2.00: failed command: READ DMA
[84718.986349] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 29 dma 4096 in
                        res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[84718.986353] ata2.00: status: { DRDY ERR }
[84718.986356] ata2.00: error: { ABRT }
[84718.988611] ata2.00: configured for UDMA/133
[84718.988622] ata2: EH complete
[84719.006316] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[84719.006322] ata2.00: irq_stat 0x40000001
[84719.006327] ata2.00: failed command: READ DMA
[84719.006336] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 14 dma 4096 in
                        res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[84719.006340] ata2.00: status: { DRDY ERR }
[84719.006343] ata2.00: error: { ABRT }
[84719.008482] ata2.00: configured for UDMA/133
[84719.008496] ata2: EH complete
[84719.034310] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[84719.034315] ata2.00: irq_stat 0x40000001
[84719.034319] ata2.00: failed command: READ DMA
[84719.034327] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 28 dma 4096 in
                        res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[84719.034331] ata2.00: status: { DRDY ERR }
[84719.034333] ata2.00: error: { ABRT }
[84719.036471] ata2.00: configured for UDMA/133
[84719.036481] ata2: EH complete
[84719.054321] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[84719.054326] ata2.00: irq_stat 0x40000001
[84719.054329] ata2.00: failed command: READ DMA
[84719.054337] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 13 dma 4096 in
                        res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[84719.054341] ata2.00: status: { DRDY ERR }
[84719.054343] ata2.00: error: { ABRT }
[84719.056483] ata2.00: configured for UDMA/133
[84719.056493] ata2: EH complete
[84719.078307] ata2.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x0
[84719.078311] ata2.00: irq_stat 0x40000001
[84719.078314] ata2.00: failed command: READ DMA
[84719.078322] ata2.00: cmd c8/00:08:00:00:00/00:00:00:00:00/e0 tag 30 dma 4096 in
                        res 51/04:08:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
[84719.078326] ata2.00: status: { DRDY ERR }
[84719.078328] ata2.00: error: { ABRT }
[84719.080521] ata2.00: configured for UDMA/133
[84719.080536] sd 1:0:0:0: [sda] tag#30 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
[84719.080540] sd 1:0:0:0: [sda] tag#30 Sense Key : Illegal Request [current] 
[84719.080543] sd 1:0:0:0: [sda] tag#30 Add. Sense: Unaligned write command
[84719.080547] sd 1:0:0:0: [sda] tag#30 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[84719.080550] print_req_error: I/O error, dev sda, sector 0
[84719.080555] buffer_io_error: 15 callbacks suppressed
[84719.080557] Buffer I/O error on dev sda, logical block 0, async page read
[84719.080578] ata2: EH complete

它显示为lsblk

lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 465.8G  0 disk 

对于这个时代的驱动器来说,SMART 结果非常完美,并且它将顺利地完成完整的自我测试而没有错误:

$sudo smartctl -a /dev/sda                                                                
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.19.11-1-default] (SUSE RPM)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Hitachi Travelstar 5K500.B
Device Model:     Hitachi HTS545050B9A300
Serial Number:    100329PBN40017GNHJNE
LU WWN Device Id: 5 000cca 5f0c951bf
Firmware Version: PB4OC64G
User Capacity:    500,107,862,016 bytes [500 GB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS T13/1699-D revision 6
SATA Version is:  SATA 2.6, 3.0 Gb/s
Local Time is:    Fri Jan 11 19:39:05 2019 NZDT
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:  (0x82) Offline data collection activity
                                        was completed without error.
                                        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:                (  645) 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:        ( 158) 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   062    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0005   110   110   040    Pre-fail  Offline      -       4327
  3 Spin_Up_Time            0x0007   175   175   033    Pre-fail  Always       -       2
  4 Start_Stop_Count        0x0012   096   096   000    Old_age   Always       -       7314
  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   120   120   040    Pre-fail  Offline      -       32
  9 Power_On_Hours          0x0012   086   086   000    Old_age   Always       -       6497
 10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   000    Old_age   Always       -       3485
191 G-Sense_Error_Rate      0x000a   100   100   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       65660
193 Load_Cycle_Count        0x0012   090   090   000    Old_age   Always       -       105680
194 Temperature_Celsius     0x0002   183   183   000    Old_age   Always       -       30 (Min/Max 2/47)
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
223 Load_Retry_Count        0x000a   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%      6481         -
# 2  Short offline       Completed without error       00%      6453         -
# 3  Extended offline    Completed without error       00%      6447         -
# 4  Short offline       Completed without error       00%      6445         -

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.

hdparm报告称没有启用 ATA 安全功能,并且我还能够ata-secure-erase成功运行命令,没有任何变化。

$sudo hdparm -I /dev/sda

/dev/sda:

ATA device, with non-removable media
        Model Number:       Hitachi HTS545050B9A300                 
        Serial Number:      100329PBN40017GNHJNE
        Firmware Revision:  PB4OC64G
        Transport:          Serial, ATA8-AST, SATA 1.0a, SATA II Extensions, SATA Rev 2.5, SATA Rev 2.6; Revision: ATA8-AST T13 Project D1697 Revision 0b
Standards:
        Used: unknown (minor revision code 0x0028) 
        Supported: 8 7 6 5 
        Likely used: 8
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:   976773168
        Logical/Physical Sector size:           512 bytes
        device size with M = 1024*1024:      476940 MBytes
        device size with M = 1000*1000:      500107 MBytes (500 GB)
        cache/buffer size  = 7208 KBytes (type=DualPortCache)
        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 Vendor, no device specific minimum
        R/W multiple sector transfer: Max = 16  Current = 16
        Advanced power management level: 128
        Recommended acoustic management value: 128, current value: 254
        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
                Automatic Acoustic Management feature set
           *    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_UNCORRECTABLE_EXT command
           *    {READ,WRITE}_DMA_EXT_GPL commands
           *    Segmented DOWNLOAD_MICROCODE
           *    Gen1 signaling speed (1.5Gb/s)
           *    Gen2 signaling speed (3.0Gb/s)
           *    Native Command Queueing (NCQ)
           *    Host-initiated interface power management
           *    Phy event counters
           *    NCQ priority information
                Non-Zero buffer offsets in DMA Setup FIS
           *    DMA Setup Auto-Activate optimization
                Device-initiated interface power management
                In-order data delivery
           *    Software settings preservation
           *    SMART Command Transport (SCT) feature set
           *    SCT Write Same (AC2)
           *    SCT Error Recovery Control (AC3)
           *    SCT Features Control (AC4)
           *    SCT Data Tables (AC5)
Security: 
        Master password revision code = 65534
                supported
                enabled
                locked
        not     frozen
        not     expired: security count
                supported: enhanced erase
        Security level high
        156min for SECURITY ERASE UNIT. 158min for ENHANCED SECURITY ERASE UNIT.
Logical Unit WWN Device Identifier: 5000cca5f0c951bf
        NAA             : 5
        IEEE OUI        : 000cca
        Unique ID       : 5f0c951bf
Checksum: correct

结果可在多台计算机上重现,包括通过 USB 和内部。驱动器没有明显损坏。

我很确定这不是内部机械问题,因为完整的 SMART 测试已成功完成。

我不认为这是一个连接器或传输错误,因为是UDMA_CRC_Error_Count零,而且我可以读取 SMART/ATA 数据。

它已进行过完全安全擦除(多次),因此我怀疑驱动器上存储的任何数据(分区表等)是否会混淆操作系统。尤其是考虑到使用了低级工具。

有什么建议么?

相关内容