You are not logged in.

#1 2020-02-24 13:32:18

zoron
Member
Registered: 2016-10-12
Posts: 9

[SOLVED] Input/output error on file system

Hi guys.
I encountered a filesystem issue after an unclean shutdown. I can't mount my /dev/sda3.

I have booted from Live-USB and tried fsck but it gave me the following error:

fsck from util-linux 2.33.1
e2fsck 1.44.5 (15-Dec-2018)
fsck.ext2: input/output error while trying to open /dev/sda3

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>

I then tried e2fsck -b to use alt superblocks, and all of them gave me the following in the end:

Error writing block 1 (input/output error).  Ignore error? yes

Here is the output of fdisk -l /dev/sda:

Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: TOSHIBA MQ01ABD1
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: A58C9090-719B-4126-B7D2-6D9980C7EE5C

Device         Start        End    Sectors  Size Type
/dev/sda1       2048    1050623    1048576  512M EFI System
/dev/sda2    1050624  126877695  125827072   60G Linux filesystem
/dev/sda3  126877696 1953523711 1826646016  871G Linux filesystem

smartctl -a /dev/sda3:

smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.9.200-antix.1-amd64-smp] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Toshiba 2.5" HDD MQ01ABD...
Device Model:     TOSHIBA MQ01ABD100
Serial Number:    66PPCA2JT
LU WWN Device Id: 5 000039 713f076c5
Firmware Version: AX0P3D
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:        In smartctl database [for details use: -P show]
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:    Mon Feb 24 16:59:15 2020 CST
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: 		(  120) 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: 	 ( 241) 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: 128
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   050    Pre-fail  Always       -       0
  3 Spin_Up_Time            0x0027   100   100   001    Pre-fail  Always       -       1747
  5 Reallocated_Sector_Ct   0x0033   100   100   050    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0032   066   066   000    Old_age   Always       -       13773
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       1797
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       160
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       60
193 Load_Cycle_Count        0x0032   089   089   000    Old_age   Always       -       114357
194 Temperature_Celsius     0x0022   100   100   000    Old_age   Always       -       30 (Min/Max 11/48)
199 UDMA_CRC_Error_Count    0x0032   200   200   000    Old_age   Always       -       0
240 Head_Flying_Hours       0x0032   074   074   000    Old_age   Always       -       10780
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       20878586044
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       26620931857
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 2575 (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 2575 occurred at disk power-on lifetime: 13773 hours (573 days + 21 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 10 00 00 90 40  Error: UNC at LBA = 0x00900000 = 9437184

  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 10 00 00 90 40 00      06:49:14.650  READ FPDMA QUEUED
  ef 10 02 00 00 00 a0 00      06:49:14.650  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00      06:49:14.649  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      06:49:14.649  IDENTIFY DEVICE
  ef 03 45 00 00 00 a0 00      06:49:14.648  SET FEATURES [Set transfer mode]

Error 2574 occurred at disk power-on lifetime: 13773 hours (573 days + 21 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 e0 00 00 90 40  Error: UNC at LBA = 0x00900000 = 9437184

  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 e0 00 00 90 40 00      06:49:10.863  READ FPDMA QUEUED
  60 08 d8 f0 67 70 40 00      06:49:10.863  READ FPDMA QUEUED
  60 08 70 80 67 70 40 00      06:49:10.838  READ FPDMA QUEUED
  ef 10 02 00 00 00 a0 00      06:49:10.829  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00      06:49:10.829  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]

Error 2573 occurred at disk power-on lifetime: 13773 hours (573 days + 21 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 c0 00 00 90 40  Error: UNC at LBA = 0x00900000 = 9437184

  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 c0 00 00 90 40 00      06:49:07.051  READ FPDMA QUEUED
  ef 10 02 00 00 00 a0 00      06:49:07.050  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00      06:49:07.050  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      06:49:07.049  IDENTIFY DEVICE
  ef 03 45 00 00 00 a0 00      06:49:07.048  SET FEATURES [Set transfer mode]

Error 2572 occurred at disk power-on lifetime: 13773 hours (573 days + 21 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 28 00 00 90 40  Error: UNC at LBA = 0x00900000 = 9437184

  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 28 00 00 90 40 00      06:49:03.272  READ FPDMA QUEUED
  ef 10 02 00 00 00 a0 00      06:49:03.271  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00      06:49:03.271  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      06:49:03.270  IDENTIFY DEVICE
  ef 03 45 00 00 00 a0 00      06:49:03.270  SET FEATURES [Set transfer mode]

Error 2571 occurred at disk power-on lifetime: 13773 hours (573 days + 21 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 00 00 00 90 40  Error: UNC at LBA = 0x00900000 = 9437184

  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 20 00 00 00 90 40 00      06:48:58.991  READ FPDMA QUEUED
  ea 00 00 00 00 00 a0 00      06:48:58.990  FLUSH CACHE EXT
  ef 10 02 00 00 00 a0 00      06:27:48.070  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00      06:27:48.069  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00      06:27:48.069  IDENTIFY DEVICE

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%     13772         -
# 2  Extended offline    Completed: read failure       00%     13771         6960152
# 3  Extended offline    Aborted by host               90%     13764         -
# 4  Short offline       Completed without error       00%     13762         -
# 5  Short offline       Aborted by host               90%       253         -
# 6  Short offline       Aborted by host               70%       253         -
# 7  Short offline       Aborted by host               90%       253         -
# 8  Short offline       Aborted by host               90%        10         -
# 9  Short offline       Aborted by host               90%        10         -
#10  Short offline       Aborted by host               90%         8         -
#11  Short offline       Aborted by host               90%         8         -
#12  Short offline       Completed without error       00%         8         -
#13  Short offline       Completed without error       00%         1         -

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's output has errors as below:

[34627.265357] blk_update_request: I/O error, dev sda, sector 126877696
[34627.265363] Buffer I/O error on dev sda3, logical block 0, async page read

It seems like a terrible failing. Can anyone help me with this? Better without any lower-level data recovery techniques. Thanks very much!

Last edited by zoron (2020-02-25 01:02:39)

Offline

#2 2020-02-24 13:35:15

frostschutz
Member
Registered: 2013-11-15
Posts: 1,536

Re: [SOLVED] Input/output error on file system

# 2  Extended offline    Completed: read failure       00%     13771         6960152

you can't fix filesystems on a dying disk, you'll only cause more damage

ddrescue first

Offline

#3 2020-02-24 14:19:33

zoron
Member
Registered: 2016-10-12
Posts: 9

Re: [SOLVED] Input/output error on file system

frostschutz wrote:
# 2  Extended offline    Completed: read failure       00%     13771         6960152

you can't fix filesystems on a dying disk, you'll only cause more damage

ddrescue first

Thanks for your reply! I'm doing this. What can I do after that?

Offline

#4 2020-02-24 15:00:45

frostschutz
Member
Registered: 2013-11-15
Posts: 1,536

Re: [SOLVED] Input/output error on file system

make the hdd image read only (chattr +i hdd.img)

make a readonly loop device (losetup --find --show --read-only hdd.img)

make a copy-on-write overlay on the loop device https://raid.wiki.kernel.org/index.php/ … erlay_file

run any experiments you like (fsck, mount, including writing - as long as you do it all to the overlay) w/o actually modifying the hdd.img

what works and what doesn't is trial & error and depends on what state it is in, impossible to say remotely. best case "it just works" and the I/O error was all that stopped you from fixing it. worst case you're left with nothing and/or have to resort to photorec and other such utilities

in future, make backups

Offline

#5 2020-02-24 15:02:39

seth
Member
Registered: 2012-09-03
Posts: 63,455

Online

#6 2020-02-25 00:57:05

zoron
Member
Registered: 2016-10-12
Posts: 9

Re: [SOLVED] Input/output error on file system

Very thanks to all!

I can mount the img and almost everything is intact (haven't check all yet).

Here is what I did:
1. use ddrescue to clone the partition
2. setup loop device by losetup
3. mke2fs -n, and it overcame the input/output error this time.

Last edited by zoron (2020-02-25 01:00:43)

Offline

Board footer

Powered by FluxBB