SpiderJ |
04-19-2024 11:11 PM |
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?
|