2

Меня не волнуют какие-либо данные на диске, и я не собираюсь хранить важные данные на диске в будущем - это чисто академическое упражнение!

Попытка чтения или записи приводит к ошибке:

$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.

Он был полностью защищен (несколько раз), поэтому я сомневаюсь, что любые данные, хранящиеся на диске (таблицы разделов и т.д.), Приводят в замешательство ОС. Особенно учитывая использование низкоуровневых инструментов.

Какие-либо предложения? Это скорее пробудило мое любопытство.

0