LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-19-2024, 11:11 PM   #1
SpiderJ
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Rep: Reputation: 0
Error on HDD makes it remount RO


Hey, everyone. I'm running Linux Mint 21.3 MATE with the OS in an SSD and /home mounted on an HDD (sda).

A couple of days ago I started having an issue where my desktop would crash because /home would remount itself as RO. Going through the syslog I found this:

Code:
Apr 17 18:34:26 asusta kernel: [27653.650698] print_req_error: 479 callbacks suppressed
Apr 17 18:34:26 asusta kernel: [27653.650701] blk_update_request: I/O error, dev sda, sector 1498795232 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.650703] EXT4-fs warning: 477 callbacks suppressed
Apr 17 18:34:26 asusta kernel: [27653.650705] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638122 (offset 0 size 4096 starting block 187349405)
Apr 17 18:34:26 asusta kernel: [27653.650707] buffer_io_error: 3226 callbacks suppressed
Apr 17 18:34:26 asusta kernel: [27653.650708] Buffer I/O error on device sda2, logical block 187345308
Apr 17 18:34:26 asusta kernel: [27653.651115] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:26 asusta kernel: [27653.651122] blk_update_request: I/O error, dev sda, sector 1498795240 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.651126] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638730 (offset 0 size 4096 starting block 187349406)
Apr 17 18:34:26 asusta kernel: [27653.651129] Buffer I/O error on device sda2, logical block 187345309
Apr 17 18:34:26 asusta kernel: [27653.654519] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:26 asusta kernel: [27653.654525] blk_update_request: I/O error, dev sda, sector 1498795248 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.654528] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638730 (offset 0 size 4096 starting block 187349407)
Apr 17 18:34:26 asusta kernel: [27653.654530] Buffer I/O error on device sda2, logical block 187345310
Apr 17 18:34:26 asusta kernel: [27653.654819] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:26 asusta kernel: [27653.654823] blk_update_request: I/O error, dev sda, sector 1301016168 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.654825] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638938 (offset 0 size 4096 starting block 162627022)
Apr 17 18:34:26 asusta kernel: [27653.654826] Buffer I/O error on device sda2, logical block 162622925
Apr 17 18:34:26 asusta kernel: [27653.671544] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:26 asusta kernel: [27653.671553] blk_update_request: I/O error, dev sda, sector 1498795256 op 0x1:(WRITE) flags 0x0 phys_seg 2 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.671557] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40640494 (offset 0 size 8192 starting block 187349409)
Apr 17 18:34:26 asusta kernel: [27653.671559] Buffer I/O error on device sda2, logical block 187345311
Apr 17 18:34:26 asusta kernel: [27653.671562] Buffer I/O error on device sda2, logical block 187345312
Apr 17 18:34:26 asusta kernel: [27653.672911] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:26 asusta kernel: [27653.672919] blk_update_request: I/O error, dev sda, sector 1498795272 op 0x1:(WRITE) flags 0x800 phys_seg 2 prio class 0
Apr 17 18:34:26 asusta kernel: [27653.672923] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638122 (offset 0 size 8192 starting block 187349411)
Apr 17 18:34:26 asusta kernel: [27653.672925] Buffer I/O error on device sda2, logical block 187345313
Apr 17 18:34:26 asusta kernel: [27653.672928] Buffer I/O error on device sda2, logical block 187345314
Apr 17 18:34:26 asusta kernel: [27653.887474] ata2: softreset failed (device not ready)
Apr 17 18:34:27 asusta kernel: [27654.001091] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:27 asusta kernel: [27654.001103] blk_update_request: I/O error, dev sda, sector 1433970432 op 0x1:(WRITE) flags 0x800 phys_seg 24 prio class 0
Apr 17 18:34:27 asusta kernel: [27654.001113] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40640065 (offset 0 size 98304 starting block 179246328)
Apr 17 18:34:27 asusta kernel: [27654.001117] Buffer I/O error on device sda2, logical block 179242208
Apr 17 18:34:27 asusta kernel: [27654.001122] Buffer I/O error on device sda2, logical block 179242209
Apr 17 18:34:27 asusta kernel: [27654.004819] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:27 asusta kernel: [27654.004832] blk_update_request: I/O error, dev sda, sector 1464815152 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
Apr 17 18:34:27 asusta kernel: [27654.004839] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40640406 (offset 0 size 4096 starting block 183101895)
Apr 17 18:34:27 asusta kernel: [27654.005214] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:27 asusta kernel: [27654.005224] blk_update_request: I/O error, dev sda, sector 1464815160 op 0x1:(WRITE) flags 0x800 phys_seg 1 prio class 0
Apr 17 18:34:27 asusta kernel: [27654.005231] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40640109 (offset 0 size 4096 starting block 183101896)
Apr 17 18:34:27 asusta kernel: [27654.006739] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:27 asusta kernel: [27654.006750] blk_update_request: I/O error, dev sda, sector 1464815168 op 0x1:(WRITE) flags 0x0 phys_seg 1 prio class 0
Apr 17 18:34:27 asusta kernel: [27654.006757] EXT4-fs warning (device sda2): ext4_end_bio:311: I/O error 10 writing to inode 40638133 (offset 0 size 4096 starting block 183101897)
Apr 17 18:34:27 asusta kernel: [27654.007067] sd 1:0:0:0: rejecting I/O to offline device
Apr 17 18:34:27 asusta kernel: [27654.010727] sd 1:0:0:0: rejecting I/O to offline device
Googling it I came across this post here which seems to be more or less the same issue. So apparently the HDD is dying, but if I understood correctly there could be a way of zeroing the offending blocks or somehow mark them as non-usable and keep it going a while longer? I'm shaky on the block arithmetic, though, I'd be worried about zeroing where I shouldn't.

Here's some more info for context:

Code:
smartctl -a /dev/sda
smartctl 7.2 2020-12-30 r5155 [x86_64-linux-5.15.0-102-generic] (local build)
Copyright (C) 2002-20, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Seagate FireCuda 2.5
Device Model:     ST1000LX015-1U7172
Serial Number:    WL1PSNC2
LU WWN Device Id: 5 000c50 0bec95d7b
Firmware Version: SDM1
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:   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:    Fri Apr 19 21:53:39 2024 -03
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: 		(    0) seconds.
Offline data collection
capabilities: 			 (0x79) SMART execute Offline immediate.
					No Auto Offline data collection support.
					Suspend Offline collection upon new
					command.
					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: 	 ( 165) 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   049   043   006    Pre-fail  Always       -       112585528
  3 Spin_Up_Time            0x0003   099   099   000    Pre-fail  Always       -       0
  4 Start_Stop_Count        0x0032   097   097   020    Old_age   Always       -       3818
  5 Reallocated_Sector_Ct   0x0033   097   095   036    Pre-fail  Always       -       1768
  7 Seek_Error_Rate         0x000f   072   060   045    Pre-fail  Always       -       34497004209
  9 Power_On_Hours          0x0032   083   083   000    Old_age   Always       -       15701 (150 99 0)
 10 Spin_Retry_Count        0x0013   100   100   097    Pre-fail  Always       -       0
 12 Power_Cycle_Count       0x0032   098   098   020    Old_age   Always       -       2695
184 End-to-End_Error        0x0032   100   100   099    Old_age   Always       -       0
187 Reported_Uncorrect      0x0032   001   001   000    Old_age   Always       -       4430
188 Command_Timeout         0x0032   100   095   000    Old_age   Always       -       390848577647
189 High_Fly_Writes         0x003a   100   100   000    Old_age   Always       -       0
190 Airflow_Temperature_Cel 0x0022   070   047   040    Old_age   Always       -       30 (Min/Max 26/30)
191 G-Sense_Error_Rate      0x0032   100   100   000    Old_age   Always       -       94
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       781
193 Load_Cycle_Count        0x0032   097   097   000    Old_age   Always       -       7848
194 Temperature_Celsius     0x0022   030   053   000    Old_age   Always       -       30 (0 13 0 0 0)
197 Current_Pending_Sector  0x0012   100   100   000    Old_age   Always       -       8
198 Offline_Uncorrectable   0x0010   100   100   000    Old_age   Offline      -       8
199 UDMA_CRC_Error_Count    0x003e   200   197   000    Old_age   Always       -       199
240 Head_Flying_Hours       0x0000   100   253   000    Old_age   Offline      -       15493h+19m+44.280s
241 Total_LBAs_Written      0x0000   100   253   000    Old_age   Offline      -       10194754103
242 Total_LBAs_Read         0x0000   100   253   000    Old_age   Offline      -       6031171545
254 Free_Fall_Sensor        0x0032   100   100   000    Old_age   Always       -       0

SMART Error Log Version: 1
ATA Error Count: 4430 (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 4430 occurred at disk power-on lifetime: 12753 hours (531 days + 9 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 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  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 00 08 ff ff ff 4f 00   2d+15:31:10.378  READ FPDMA QUEUED
  ef 10 03 00 00 00 a0 00   2d+15:31:10.369  SET FEATURES [Enable SATA feature]
  ef 10 02 00 00 00 a0 00   2d+15:31:10.360  SET FEATURES [Enable SATA feature]
  27 00 00 00 00 00 e0 00   2d+15:31:10.332  READ NATIVE MAX ADDRESS EXT [OBS-ACS-3]
  ec 00 00 00 00 00 a0 00   2d+15:31:10.293  IDENTIFY DEVICE

Error 4429 occurred at disk power-on lifetime: 12753 hours (531 days + 9 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 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  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 00 08 ff ff ff 4f 00   2d+15:31:09.670  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00   2d+15:31:09.669  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00   2d+15:31:09.669  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00   2d+15:31:09.669  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00   2d+15:31:09.669  READ FPDMA QUEUED

Error 4428 occurred at disk power-on lifetime: 12753 hours (531 days + 9 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 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  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 00 00 ff ff ff 4f 00   2d+15:31:08.877  READ FPDMA QUEUED
  60 00 00 ff ff ff 4f 00   2d+15:31:08.253  READ FPDMA QUEUED
  60 00 00 ff ff ff 4f 00   2d+15:31:07.708  READ FPDMA QUEUED
  60 00 00 ff ff ff 4f 00   2d+15:31:06.855  READ FPDMA QUEUED
  60 00 00 ff ff ff 4f 00   2d+15:31:06.074  READ FPDMA QUEUED

Error 4427 occurred at disk power-on lifetime: 12117 hours (504 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 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  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 00 08 ff ff ff 4f 00      06:32:00.391  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:32:00.377  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:32:00.376  READ FPDMA QUEUED
  ef 10 03 00 00 00 a0 00      06:32:00.366  SET FEATURES [Enable SATA feature]
  ef 10 02 00 00 00 a0 00      06:32:00.357  SET FEATURES [Enable SATA feature]

Error 4426 occurred at disk power-on lifetime: 12117 hours (504 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 51 00 ff ff ff 0f  Error: UNC at LBA = 0x0fffffff = 268435455

  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 00 08 ff ff ff 4f 00      06:31:59.672  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:31:58.747  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:31:58.747  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:31:58.747  READ FPDMA QUEUED
  60 00 08 ff ff ff 4f 00      06:31:58.746  READ FPDMA QUEUED

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%     15689         -

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.
and also:

Code:
sudo fdisk -l /dev/sda                    
Disk /dev/sda: 931,51 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: ST1000LX015-1U71
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: 589B5C00-2D73-45A3-A01D-D16061168728

Device     Start        End    Sectors   Size Type
/dev/sda1     34      32767      32734    16M Microsoft reserved
/dev/sda2  32768 1953521663 1953488896 931,5G Microsoft basic data

Partition 1 does not start on physical sector boundary.
Could someone point me in the right direction? Is it possible to get rid of those bad blocks, and if so, could you explain the appropriate math?
 
Old 04-20-2024, 08:17 AM   #2
Arnulf
Member
 
Registered: Jan 2022
Location: Hanover, Germany
Distribution: Slackware
Posts: 269

Rep: Reputation: 89
Replace this dying SATA-HDD with a SSD with capacity of 1 TB or above: Choose a NVMe-SSD if possible, otherwise a SATA-SSD. Enjoy performance boost of SDD against awfully slow HDD.
 
Old 04-20-2024, 08:20 AM   #3
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,337

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
Hello, SpiderJ, & welcome to LQ.

I/O or Input/Output errors usually are an indicator of a hardware problem.

First, I'd suggest checking /etc/fstab with an editor. I expect you'll find the option
Code:
errors=remount,ro
and get that out of the options for the offending disk.

Next, rescue what data you can from there. Back it up, preferably to another disk. You can reinstall a system. But the files in /home & /etc are very handy to have.

Then, go at the disk. Badblocks is a program designed to ferret these out and mark them as bad. Then, depending on your filesystem, there will be tools of varying quality to try and repair it. If you have another OS or a live usb or something, best work from there.

If you're replying, try to give as much info as possible about your setup. You can see it, but not us. How_To_Ask_a_Question
 
Old 04-20-2024, 09:26 AM   #4
lvm_
Member
 
Registered: Jul 2020
Posts: 938

Rep: Reputation: 338Reputation: 338Reputation: 338Reputation: 338
If you like living dangerously, 'e2fsck -fccky <device>' will non-destructively scan for bad blocks, mark them, try to continue. Warning: takes hours, cannot be aborted (without fscking filesystem, that is), back up first. But that's a mighty thin ice you'll be walking on, over 4000 errors...
 
Old 04-20-2024, 11:02 AM   #5
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Quote:
But that's a mighty thin ice you'll be walking on, over 4000 errors...
and counting. In my experience, once you start getting a bunch of bad sectors they only multiply with time. You can mark the bad blocks today with e2fsck and have a hundred new ones tomorrow. Backup and replace that drive.
 
Old 04-20-2024, 12:18 PM   #6
SpiderJ
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
hey, everyone, thanks for your answers. I checked fstab but it doesn't have that option set for sda2

Code:
# /home was on /dev/sda2 during installation
UUID=76f164d7-d8a7-49d5-b690-faff032025a3 /home           ext4    defaults        0       2
I booted up using a Mint 21.3 live USB and am currently trying to backup everything I can. Then I'll go with badblocks overnight, as I expect it will take quite a while to finish, so tomorrow morning it'll be complete.

After reading the man page I was thinking of going with
Code:
badblocks -sn -b 4096
, unless someone suggests something better based on the provided info. Perhaps
Code:
e2fsck -fccky <device>
would be a better option running from this live USB?

Like I said, this HDD only has /home in it, the rest of the OS (including /etc) is in a different partition in a different drive (an SSD with this Linux and a Windows partition). I can provide as much information as necessary, if anyone thinks of anything else that might be useful to diagnose, let me know the appropriate commands and I'll reply back with the info. The idea is to try and save this HDD insofar as it is possible. Buying a new one would be a last resort.
 
Old 04-20-2024, 02:37 PM   #7
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,337

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
The e2fsck option does a check with badblocks. It's the -c option, so in fact you're doing 2 checks. The -k appends to any already recorded bad blocks, but the '-y' gives it the go ahead in advance. I wouldn't forgive e2fsck's sins in advance when you might decide to bale out.
 
Old 04-21-2024, 11:59 AM   #8
SpiderJ
LQ Newbie
 
Registered: Apr 2024
Posts: 3

Original Poster
Rep: Reputation: 0
Well, it did take about 12 hours, but e2fsck seems to have done the trick:

Code:
sudo e2fsck -fccky -C0 /dev/sda2
e2fsck 1.46.5 (30-Dec-2021)
Checking for bad blocks (non-destructive read-write test)
Testing with random pattern: done                                                
/dev/sda2: Updating bad block inode.
Pass 1: Checking inodes, blocks, and sizes
                                                                               
Running additional passes to resolve blocks claimed by more than one inode...
Pass 1B: Rescanning for multiply-claimed blocks
Multiply-claimed block(s) in inode 40638466: 129902028
Multiply-claimed block(s) in inode 41158166: 123326548--123326551 123326597 123326742--123326744 123326838--123326842 123326886--123326890
Multiply-claimed block(s) in inode 45219931: 17374066 17374141
Pass 1C: Scanning directories for inodes with multiply-claimed blocks
Pass 1D: Reconciling multiply-claimed blocks
(There are 3 inodes containing multiply-claimed blocks.)

File ************/L'emploi du temps_DVDRip_(2001).avi (inode #40638466, mod time Tue Aug 25 01:27:34 2020)
  has 1 multiply-claimed block(s), shared with 1 file(s):
<The bad blocks inode> (inode #1, mod time Sun Apr 21 04:59:18 2024)
Clone multiply-claimed blocks? yes

Error reading block 129902028 (Input/output error).  Ignore error? yes

Force rewrite? yes

File ************/MAME .202.7z (inode #41158166, mod time Tue Jul  7 09:44:06 2020)
  has 18 multiply-claimed block(s), shared with 1 file(s):
<The bad blocks inode> (inode #1, mod time Sun Apr 21 04:59:18 2024)
Clone multiply-claimed blocks? yes

Error reading block 123326548 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326549 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326550 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326551 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326597 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326742 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326743 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326744 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326838 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326839 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326840 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326841 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326886 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326887 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326888 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326889 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 123326890 (Input/output error).  Ignore error? yes

Force rewrite? yes

File ************/Kentucky Route Zero/KentuckyRouteZero_Data/sharedassets2.assets (inode #45219931, mod time Thu May  8 17:33:12 2014)
  has 2 multiply-claimed block(s), shared with 1 file(s):
<The bad blocks inode> (inode #1, mod time Sun Apr 21 04:59:18 2024)
Clone multiply-claimed blocks? yes

Error reading block 17374066 (Input/output error).  Ignore error? yes

Force rewrite? yes

Error reading block 17374141 (Input/output error).  Ignore error? yes

Force rewrite? yes

Pass 2: Checking directory structure
Pass 3: Checking directory connectivity                                        
Pass 4: Checking reference counts                                              
Pass 5: Checking group summary information                                    
Free blocks count wrong for group #0 (12236, counted=12215).                  
Fix? yes

Free blocks count wrong for group #530 (1160, counted=1162).
Fix? yes

Free blocks count wrong for group #3763 (4294967278, counted=0).
Fix? yes

Free blocks count wrong for group #3964 (4294967295, counted=0).
Fix? yes

                                                                               
/dev/sda2: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda2: 1919403/61046784 files (1.1% non-contiguous), 185537103/244186112 blocks
So far, so good. I just hope that it stops there, at least for the time being. That'll teach me to download indie games and French cinema
 
Old 04-22-2024, 04:23 AM   #9
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,337

Rep: Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331Reputation: 2331
I don't like that output at all.

You have multiple ropey sections and a rewrite was forced on them. There are many reasons for bad sectors, but physical damage is one of them. Now you're sending your heads over and over the bad sections. This has two problems
  1. Your bad sections might pretend to be good for a few days, causing the system to write on them.
  2. Any detritus the heads picked up from the bad areas could be spread over other parts of the disk, compounding the problem.

Now ask yourself: Are you going to learn the hard lesson, or are you going to get everything you value off that disk, so you won't care when it expires?
 
Old 04-26-2024, 06:58 PM   #10
friendlysalmon8827
Member
 
Registered: Dec 2023
Distribution: Anfroid,Debian
Posts: 99

Rep: Reputation: 5
I would caution the OP from purchasing and using a consumer aimed HDD or SSD and recommend that he/she instead opt for a HDD aimed at home office / Small business which userally have a High Mean time between failure which means that they means that said you will need to be willing to pay $2 to $3 USD more per GB.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Run customised HDD driver for external HDD while generic HDD driver for bootable purpose sonia49 Linux - Newbie 1 09-28-2016 08:52 PM
“mount -o remount,ro” makes source readonly also emanation.grz Linux - General 2 06-19-2013 05:55 AM
"errors=remount-ro" auto fsck, then remount-rw possible? Sepero Linux - Hardware 0 03-28-2007 03:23 AM
usbdevfs: remount parameter error mapixie Linux - Hardware 0 07-17-2004 12:12 PM
usbdevfs: remount parameter error ashoksagar Mandriva 2 12-18-2003 01:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration