LINUX.ORG.RU

sfdisk не может открыть диск

 


0

1

Пытаюсь установить Manjaro. Установка ломается в самом начале на выолнении команды sfdisk /dev/sda

# sfdisk /dev/sda
sfdisk: cannot open /dev/sda: Input/output error

Подскажите, пожалуйста, что с этим можно сделать. Всё записать нулями?

Выполнение parted /dev/sda print

# parted /dev/sda print
Model: ATA TOSHIBA MQ02ABD1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start  End  Size  File system  Name  Flags

Выполнение smartctl -a /dev/sda

# smartctl -a /dev/sda
smartctl 7.1 2019-12-30 r5022 [x86_64-linux-5.6.7-1-MANJARO] (local build)
Copyright (C) 2002-19, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     TOSHIBA MQ02ABD100H
Serial Number:    26LPT0NHT
LU WWN Device Id: 5 000039 6d1c08c47
Firmware Version: HEF01C
User Capacity:    1,000,204,886,016 bytes [1.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      2.5 inches
Device is:        Not in smartctl database [for details use: -P showall]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Fri May  1 07:24:42 2020 MSK
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
See vendor-specific Attribute list for marginal Attributes.

General SMART Values:
Offline data collection status:  (0x84) Offline data collection activity
                                        was suspended by an interrupting command from host.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      ( 117) The previous self-test completed having
                                        the read element of the test failed.
Total time to complete Offline 
data collection:                (  120) seconds.
Offline data collection
capabilities:                    (0x51) SMART execute Offline immediate.
                                        No Auto Offline data collection support.
                                        Suspend Offline collection upon new
                                        command.
                                        No 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:        ( 209) 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     0x002f   100   100   050    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0027   100   100   050    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0023   100   100   002    Pre-fail  Always       -       2833
  4 Start_Stop_Count        0x0032   100   100   000    Old_age   Always       -       33827
  5 Reallocated_Sector_Ct   0x0033   100   100   010    Pre-fail  Always       -       8
  7 Seek_Error_Rate         0x002f   100   100   050    Pre-fail  Always       -       0
  8 Seek_Time_Performance   0x0025   100   100   050    Pre-fail  Offline      -       0
  9 Power_On_Hours          0x0032   062   062   000    Old_age   Always       -       15538
 10 Spin_Retry_Count        0x0033   253   100   030    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       2526
183 Runtime_Bad_Block       0x0032   100   100   001    Old_age   Always       -       1
184 End-to-End_Error        0x0033   100   100   097    Pre-fail  Always       -       0
185 Unknown_Attribute       0x0032   100   100   001    Old_age   Always       -       65535
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       65535
188 Command_Timeout         0x0032   100   099   000    Old_age   Always       -       3
189 High_Fly_Writes         0x003a   100   100   001    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   059   035   040    Old_age   Always   In_the_past 41 (Min/Max 28/43 #130)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       198
192 Power-Off_Retract_Count 0x0022   100   100   000    Old_age   Always       -       47253225614
193 Load_Cycle_Count        0x0032   052   052   000    Old_age   Always       -       482266
194 Temperature_Celsius     0x0022   059   035   040    Old_age   Always   In_the_past 41 (Min/Max 28/43 #130)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       1
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       6336
199 UDMA_CRC_Error_Count    0x0032   200   253   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 65535 (device log contains only the most recent five errors)
        CR = Command Register [HEX]
        FR = Features Register [HEX]
        SC = Sector Count Register [HEX]
        SN = Sector Number Register [HEX]
        CL = Cylinder Low Register [HEX]
        CH = Cylinder High Register [HEX]
        DH = Device/Head Register [HEX]
        DC = Device Command Register [HEX]
        ER = Error register [HEX]
        ST = Status register [HEX]
Powered_Up_Time is measured from power on, and printed as
DDd+hh:mm:SS.sss where DD=days, hh=hours, mm=minutes,
SS=sec, and sss=millisec. It "wraps" after 49.710 days.

Error 65535 occurred at disk power-on lifetime: 15538 hours (647 days + 10 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 08 00 40 00 40  Error: UNC at LBA = 0x00004000 = 16384

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 08 00 40 00 40 00      01:31:57.160  READ FPDMA QUEUED
  47 00 01 12 00 00 a0 00      01:31:57.160  READ LOG DMA EXT
  47 00 01 00 00 00 a0 00      01:31:57.159  READ LOG DMA EXT
  47 00 01 13 00 00 a0 00      01:31:57.159  READ LOG DMA EXT
  47 00 01 00 00 00 a0 00      01:31:57.159  READ LOG DMA EXT

Error 65534 occurred at disk power-on lifetime: 15538 hours (647 days + 10 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 d0 00 40 00 40  Error: UNC at LBA = 0x00004000 = 16384

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 d0 00 40 00 40 00      01:31:53.737  READ FPDMA QUEUED
  ea 00 00 00 00 00 a0 00      01:31:53.737  FLUSH CACHE EXT
  ec 00 01 00 00 00 00 00      01:31:53.726  IDENTIFY DEVICE
  60 08 00 00 00 00 40 00      01:31:53.712  READ FPDMA QUEUED
  47 00 01 12 00 00 a0 00      01:31:53.711  READ LOG DMA EXT

Error 65533 occurred at disk power-on lifetime: 15538 hours (647 days + 10 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 88 01 08 00 40  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 a0 00 00 00 40 00      01:31:53.544  READ FPDMA QUEUED
  60 08 98 00 00 00 40 00      01:31:53.533  READ FPDMA QUEUED
  60 08 90 00 00 40 40 00      01:31:53.525  READ FPDMA QUEUED
  60 08 88 00 08 00 40 00      01:31:53.517  READ FPDMA QUEUED
  60 08 58 00 00 10 40 00      01:31:53.515  READ FPDMA QUEUED

Error 65532 occurred at disk power-on lifetime: 15538 hours (647 days + 10 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 f8 01 08 00 40  Error: UNC at LBA = 0x00000801 = 2049

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 78 00 00 01 40 00      01:31:53.317  READ FPDMA QUEUED
  60 08 f8 00 08 00 40 00      01:31:53.317  READ FPDMA QUEUED
  47 00 01 12 00 00 a0 00      01:31:53.317  READ LOG DMA EXT
  47 00 01 00 00 00 a0 00      01:31:53.316  READ LOG DMA EXT
  47 00 01 13 00 00 a0 00      01:31:53.316  READ LOG DMA EXT

Error 65531 occurred at disk power-on lifetime: 15538 hours (647 days + 10 hours)
  When the command that caused the error occurred, the device was active or idle.

  After command completion occurred, registers were:
  ER ST SC SN CL CH DH
  -- -- -- -- -- -- --
  40 41 f0 00 40 00 40  Error: UNC at LBA = 0x00004000 = 16384

  Commands leading to the command that caused the error were:
  CR FR SC SN CL CH DH DC   Powered_Up_Time  Command/Feature_Name
  -- -- -- -- -- -- -- --  ----------------  --------------------
  60 08 00 00 08 00 40 00      01:31:49.890  READ FPDMA QUEUED
  60 08 f0 00 40 00 40 00      01:31:49.890  READ FPDMA QUEUED
  47 00 01 12 00 00 a0 00      01:31:49.890  READ LOG DMA EXT
  47 00 01 00 00 00 a0 00      01:31:49.890  READ LOG DMA EXT
  47 00 01 13 00 00 a0 00      01:31:49.889  READ LOG DMA EXT

SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Short offline       Completed: read failure       50%     14686         8064
# 2  Extended offline    Aborted by host               90%     10759         -
# 3  Short offline       Completed without error       00%     10759         -

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.

Выполнение fsck /dev/sda

# fsck /dev/sda
fsck from util-linux 2.35.1
e2fsck 1.45.6 (20-Mar-2020)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda

The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem.  If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
    e2fsck -b 8193 <device>
 or
    e2fsck -b 32768 <device>

/dev/sda contains `DOS/MBR boot sector; partition 1 : ID=0xee, start-CHS (0x0,0,2), end-CHS (0x3ff,255,63), startsector 1, 1953525167 sectors, extended partition table (last)' data

После выполнения e2fsck -b 8193 /dev/sda и e2fsck -b 32768 /dev/sda ничего не меняется.


На диске дохрена бедблоков:

196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       1
197 Current_Pending_Sector  0x0032   100   100   000    Old_age   Always       -       6336

один подтверждённый и шесть тысяч сомнительных. По хорошему, нужна замена, но если нищенствовать, то хотя-бы очистка и проверка.

Ты запускаешь e2fsck - зачем? Там есть файловая система, которую надо чинить? Если на диске есть что-то ценное - неси его в контору по восстановлению, потому что всё уже достаточно плохо.

legolegs ★★★★★
()
Ответ на: комментарий от legolegs

На диски нет ничего ценного. Буду его менять, но нет возможности сделать это в ближайшие дни. Подскажи, пожалуйста, какими командами выполняется очистка и проверка?

Wenti
() автор топика
Ответ на: комментарий от anonymous

Инсталятор Manjaro использует sfdisk, я никак не могу повлиять на это.

Wenti
() автор топика
Ответ на: комментарий от Wenti

Подскажи, пожалуйста, какими командами выполняется очистка и проверка?

Самый долгий и надёжный вариант -очистит и проверит в 4 прохода, если не выдаст ошибок - значит диском можно пользоваться: badblocks -s -w <диск>

более быстрая версия badblocks -s -w -t 0 <диск> - только зануление и проверка что всё читается.

После этого можно создавать таблицу разделово любой утилитой по выбору.

legolegs ★★★★★
()
Ответ на: комментарий от anonymous

Ой, да, не туда посмотрел. Ну собственно, 8 логических секторов по 512 байт и дают один 4096-байтовый физический сектор. Этот параметр у этого диска всегда будет кратен 8.

legolegs ★★★★★
()
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.