You are not logged in.

#1 2025-02-26 13:32:00

Strangiato
Member
Registered: 2020-01-10
Posts: 417

[Solved] Data transfer to SATA SSD corrupts EXT4 fs

Hi

I use Arch wirh KDE Plasma DE and default kernel, my system is fully updated.

When I copy a large amount of data from an hard disk to a sata ssd where my Arch is installed (both formated with ext4 file system), data transfer is extremely slow and at some point the copy process fails with kernel errors.
Then my Arch becomes unresponsive and I need to force reboot. When the boot starts, I get a prompt asking to run fsck manually due to file system corruption.

kernel errors:

[qua fev 26 10:03:23 2025] ata1.00: exception Emask 0x0 SAct 0x1e000000 SErr 0x0 action 0x6 frozen
[qua fev 26 10:03:23 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 10:03:23 2025] ata1.00: cmd 61/00:c8:00:e6:cc/0a:00:1b:00:00/40 tag 25 ncq dma 1310720 ou
                                    res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 10:03:23 2025] ata1.00: status: { DRDY }
[qua fev 26 10:03:23 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 10:03:23 2025] ata1.00: cmd 61/00:d0:00:f0:cc/0a:00:1b:00:00/40 tag 26 ncq dma 1310720 ou
                                    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 10:03:23 2025] ata1.00: status: { DRDY }
[qua fev 26 10:03:23 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 10:03:23 2025] ata1.00: cmd 61/00:d8:00:fa:cc/0a:00:1b:00:00/40 tag 27 ncq dma 1310720 ou
                                    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 10:03:23 2025] ata1.00: status: { DRDY }
[qua fev 26 10:03:23 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 10:03:23 2025] ata1.00: cmd 61/00:e0:00:04:cd/04:00:1b:00:00/40 tag 28 ncq dma 524288 out
                                    res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 10:03:23 2025] ata1.00: status: { DRDY }

What can I to do avoid these problem when copying data?

Thanks for reading.

Last edited by Strangiato (Today 16:58:07)

Offline

#2 2025-02-26 13:34:56

cryptearth
Member
Registered: 2024-02-03
Posts: 1,309

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

replace your ssd - it's about to fail

Online

#3 2025-02-26 13:39:57

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 1,013
Website

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

Yeah what are the SMART stats for this device?

Offline

#4 2025-02-26 13:43:59

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

$ sudo smartctl -a /dev/sda
smartctl 7.4 2023-08-01 r5530 [x86_64-linux-6.13.4-arch1-1] (local build)
Copyright (C) 2002-23, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Device Model:     Asgard AS1TS3-S7
Serial Number:    202209291131
LU WWN Device Id: 5 000000 00000281a
Firmware Version: SN09553
User Capacity:    1.024.209.543.168 bytes [1,02 TB]
Sector Size:      512 bytes logical/physical
Rotation Rate:    Solid State Device
Form Factor:      2.5 inches
TRIM Command:     Available, deterministic, zeroed
Device is:        Not in smartctl database 7.3/5528
ATA Version is:   ACS-4 (minor revision not indicated)
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Wed Feb 26 10:42:54 2025 -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:  (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:                (   33) seconds.
Offline data collection
capabilities:                    (0x7b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off 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:        (   2) minutes.
Extended self-test routine
recommended polling time:        (   2) minutes.
Conveyance self-test routine
recommended polling time:        (   2) minutes.
SCT capabilities:              (0x0031) SCT Status supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 20
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  5 Reallocated_Sector_Ct   0x0013   100   100   050    Pre-fail  Always       -       0
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       5563
 12 Power_Cycle_Count       0x0012   100   100   000    Old_age   Always       -       600
167 Unknown_Attribute       0x0022   100   100   000    Old_age   Always       -       0
168 Unknown_Attribute       0x0012   100   100   000    Old_age   Always       -       0
169 Unknown_Attribute       0x0013   100   100   010    Pre-fail  Always       -       0
171 Unknown_Attribute       0x0032   000   000   000    Old_age   Always       -       0
172 Unknown_Attribute       0x0032   000   000   000    Old_age   Always       -       0
173 Unknown_Attribute       0x0012   200   200   000    Old_age   Always       -       124571812043
174 Unknown_Attribute       0x0022   100   100   000    Old_age   Always       -       57
175 Program_Fail_Count_Chip 0x0022   100   100   010    Old_age   Always       -       0
180 Unused_Rsvd_Blk_Cnt_Tot 0x0033   100   100   000    Pre-fail  Always       -       510
187 Reported_Uncorrect      0x0032   100   000   000    Old_age   Always       -       0
192 Power-Off_Retract_Count 0x0012   100   100   000    Old_age   Always       -       98
194 Temperature_Celsius     0x0022   033   033   000    Old_age   Always       -       33 (Min/Max 22/36)
206 Unknown_SSD_Attribute   0x0032   200   200   000    Old_age   Always       -       29
207 Unknown_SSD_Attribute   0x0032   200   200   000    Old_age   Always       -       271
208 Unknown_SSD_Attribute   0x0032   200   200   000    Old_age   Always       -       203
209 Unknown_SSD_Attribute   0x0032   200   200   000    Old_age   Always       -       1
210 Unknown_Attribute       0x0032   200   200   000    Old_age   Always       -       4375
211 Unknown_Attribute       0x0032   200   200   000    Old_age   Always       -       3748
231 Unknown_SSD_Attribute   0x0023   087   087   005    Pre-fail  Always       -       13
241 Total_LBAs_Written      0x0032   100   100   000    Old_age   Always       -       16946
242 Total_LBAs_Read         0x0032   100   100   000    Old_age   Always       -       15761
243 Unknown_Attribute       0x0032   050   050   000    Old_age   Always       -       4294311925
245 Unknown_Attribute       0x0032   100   100   000    Old_age   Always       -       44

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  Extended offline    Completed without error       00%      4120         -

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.

The above only provides legacy SMART information - try 'smartctl -x' for more

Edit:
Yesterday I copied 140 gib of data from the partition where my Arch is installed to a different hard disk without any problem.

Last edited by Strangiato (2025-02-26 13:48:48)

Offline

#5 2025-02-26 13:56:00

gromit
Package Maintainer (PM)
From: Germany
Registered: 2024-02-10
Posts: 1,013
Website

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

This could also be yet another case of this:

Niklas Cassel wrote:

We recently (kernel v6.9) enabled LPM for all AHCI controllers if:
-The AHCI controller reports that it supports LPM, and
-The drive reports that it supports LPM (DIPM), and
-CONFIG_SATA_MOBILE_LPM_POLICY=3, and
-The port is not defined as external in the per port PxCMD register, and
-The port is not defined as hotplug capable in the per port PxCMD register.

However, there appears to be some drives (usually cheap ones that we've never
heard about) that reports that they support DIPM, but when actually turning
it on, they stop working.

https://lore.kernel.org/all/ZlY8SbGVMHho-dLz@ryzen.lan/

Offline

#6 2025-02-26 14:27:01

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

gromit wrote:

This could also be yet another case of this:

Niklas Cassel wrote:

We recently (kernel v6.9) enabled LPM for all AHCI controllers if:
-The AHCI controller reports that it supports LPM, and
-The drive reports that it supports LPM (DIPM), and
-CONFIG_SATA_MOBILE_LPM_POLICY=3, and
-The port is not defined as external in the per port PxCMD register, and
-The port is not defined as hotplug capable in the per port PxCMD register.

However, there appears to be some drives (usually cheap ones that we've never
heard about) that reports that they support DIPM, but when actually turning
it on, they stop working.

https://lore.kernel.org/all/ZlY8SbGVMHho-dLz@ryzen.lan/

Interesting. The hd I'm using today involved in the problematic data transters is TOSHIBA HDWD110 too.
The hd I used yesterday without any problem is Seagate.
My cpu is intel i7 4790.

Offline

#7 2025-02-26 15:48:26

seth
Member
Registered: 2012-09-03
Posts: 61,477

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

The CPU doesn't matter, check whether they're set to dipm (likely) and disable that, https://wiki.archlinux.org/title/Power_ … Management (set to "medium_power")
Do you have a complete journal covering those errors or only those few lines?
(You could also be facing a bus error, actually powersaving stuff makes limited sense when this happens on heavy load *explicitly*)

Offline

#8 2025-02-26 16:58:15

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

it's already set to "medium_power"

$ grep . /sys/class/scsi_host/host*/link_power_management_policy
/sys/class/scsi_host/host0/link_power_management_policy:medium_power
/sys/class/scsi_host/host1/link_power_management_policy:medium_power
/sys/class/scsi_host/host2/link_power_management_policy:medium_power
/sys/class/scsi_host/host3/link_power_management_policy:medium_power
/sys/class/scsi_host/host4/link_power_management_policy:medium_power
/sys/class/scsi_host/host5/link_power_management_policy:medium_power

My pc has two sata ssds and two hard disks. Kernel log reports no problem when copying from an hard disk to second sata ssd.
And Toshiba hd is not the culprit: failure also occurs when copying from Seagate hd to main sata ssd.

I think my main ssd has bad quality, and its SMART reports fake info. (:
Weirdly I can copy data from the problematic ssd to another device without errors.

More errors:

[qua fev 26 13:06:51 2025] I/O error, dev sda, sector 264120504 op 0x1:(WRITE) flags 0x0 phys_seg 21 prio class 0
[qua fev 26 13:06:51 2025] sd 0:0:0:0: [sda] tag#1 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=31s
[qua fev 26 13:06:51 2025] sd 0:0:0:0: [sda] tag#1 CDB: Read(10) 28 00 11 c0 08 58 00 00 08 00
[qua fev 26 13:06:51 2025] I/O error, dev sda, sector 297797720 op 0x0:(READ) flags 0x3000 phys_seg 1 prio class 0
[qua fev 26 13:06:51 2025] EXT4-fs error (device sda1): ext4_wait_block_bitmap:582: comm kworker/u32:6: Cannot read block bitmap - block_group = 1147, block_bitmap = 37224459
[qua fev 26 13:06:51 2025] sd 0:0:0:0: [sda] tag#31 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=31s
[qua fev 26 13:06:51 2025] sd 0:0:0:0: [sda] tag#31 CDB: Write(10) 2a 00 0f be 20 f8 00 07 c0 00
[qua fev 26 13:06:51 2025] I/O error, dev sda, sector 264118520 op 0x1:(WRITE) flags 0x4000 phys_seg 168 prio class 0
[qua fev 26 13:06:51 2025] EXT4-fs warning (device sda1): ext4_end_bio:342: I/O error 10 writing to inode 6030880 starting block 33015063)
[qua fev 26 13:06:51 2025] EXT4-fs (sda1): Delayed block allocation failed for inode 6030880 at logical offset 16568 with max blocks 220 with error 5
[qua fev 26 13:06:51 2025] EXT4-fs (sda1): This should not happen!! Data will be lost

[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014559
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014560
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014561
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014562
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014563
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014564
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014565
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014566
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014567
[qua fev 26 13:06:51 2025] Buffer I/O error on device sda1, logical block 33014568
[qua fev 26 13:30:35 2025] sd 0:0:0:0: [sda] tag#8 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=42s
[qua fev 26 13:30:35 2025] sd 0:0:0:0: [sda] tag#8 CDB: Read(10) 28 00 2c 1f ed 38 00 00 08 00
[qua fev 26 13:30:35 2025] I/O error, dev sda, sector 740289848 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 2
[qua fev 26 13:30:35 2025] ntfs3(sda2): failed to read volume at offset 0xbfca7000
[qua fev 26 13:56:24 2025] calling  init_exfat_fs+0x0/0xff0 [exfat] @ 10961
[qua fev 26 13:56:24 2025] initcall init_exfat_fs+0x0/0xff0 [exfat] returned 0 after 33 usecs
[qua fev 26 13:56:24 2025] exFAT-fs (sde1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[qua fev 26 13:58:17 2025] ata1.00: exception Emask 0x0 SAct 0x78 SErr 0x0 action 0x6 frozen
[qua fev 26 13:58:17 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 13:58:17 2025] ata1.00: cmd 61/00:18:00:3c:57/0a:00:2a:00:00/40 tag 3 ncq dma 1310720 ou
                                    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 13:58:17 2025] ata1.00: status: { DRDY }
[qua fev 26 13:58:17 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 13:58:17 2025] ata1.00: cmd 61/00:20:00:46:57/02:00:2a:00:00/40 tag 4 ncq dma 262144 out
                                    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 13:58:17 2025] ata1.00: status: { DRDY }
[qua fev 26 13:58:17 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 13:58:17 2025] ata1.00: cmd 61/00:28:00:08:6a/0a:00:0f:00:00/40 tag 5 ncq dma 1310720 ou
                                    res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 13:58:17 2025] ata1.00: status: { DRDY }
[qua fev 26 13:58:17 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 13:58:17 2025] ata1.00: cmd 61/00:30:00:12:6a/0a:00:0f:00:00/40 tag 6 ncq dma 1310720 ou
                                    res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 13:58:17 2025] ata1.00: status: { DRDY }
[qua fev 26 13:58:17 2025] ata1: hard resetting link
[qua fev 26 13:58:17 2025] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[qua fev 26 13:58:18 2025] ata1.00: configured for UDMA/133
[qua fev 26 13:58:18 2025] ata1: EH complete
[qua fev 26 14:02:47 2025] ata1.00: exception Emask 0x0 SAct 0x1f8000 SErr 0x0 action 0x6 frozen
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/40:78:08:a0:ef/05:00:1e:00:00/40 tag 15 ncq dma 688128 out
                                    res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/c0:80:48:a5:ef/02:00:1e:00:00/40 tag 16 ncq dma 360448 out
                                    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/40:88:08:a8:ef/05:00:1e:00:00/40 tag 17 ncq dma 688128 out
                                    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/c0:90:48:ad:ef/02:00:1e:00:00/40 tag 18 ncq dma 360448 out
                                    res 40/00:00:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/50:98:08:b0:ef/05:00:1e:00:00/40 tag 19 ncq dma 696320 out
                                    res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:02:47 2025] ata1.00: cmd 61/c0:a0:58:b5:ef/02:00:1e:00:00/40 tag 20 ncq dma 360448 out
                                    res 40/00:01:09:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:02:47 2025] ata1.00: status: { DRDY }
[qua fev 26 14:02:47 2025] ata1: hard resetting link
[qua fev 26 14:02:47 2025] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[qua fev 26 14:02:47 2025] ata1.00: configured for UDMA/133
[qua fev 26 14:02:47 2025] sd 0:0:0:0: [sda] tag#14 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=32s
[qua fev 26 14:02:47 2025] sd 0:0:0:0: [sda] tag#14 CDB: Write(10) 2a 00 1e ef 9d 48 00 02 c0 00
[qua fev 26 14:02:47 2025] I/O error, dev sda, sector 519019848 op 0x1:(WRITE) flags 0x0 phys_seg 88 prio class 2
[qua fev 26 14:02:47 2025] EXT4-fs warning (device sda1): ext4_end_bio:342: I/O error 10 writing to inode 5809902 starting block 64877481)
[qua fev 26 14:02:47 2025] ata1: EH complete
[qua fev 26 14:02:48 2025] buffer_io_error: 316 callbacks suppressed
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877057
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877058
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877059
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877060
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877061
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877062
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877063
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877064
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877065
[qua fev 26 14:02:48 2025] Buffer I/O error on device sda1, logical block 64877066
[qua fev 26 14:14:54 2025] ata1.00: exception Emask 0x0 SAct 0x7 SErr 0x0 action 0x6 frozen
[qua fev 26 14:14:54 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:14:54 2025] ata1.00: cmd 61/00:00:00:d2:7f/0a:00:21:00:00/40 tag 0 ncq dma 1310720 ou
                                    res 40/00:ff:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:14:54 2025] ata1.00: status: { DRDY }
[qua fev 26 14:14:54 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:14:54 2025] ata1.00: cmd 61/00:08:00:dc:7f/0a:00:21:00:00/40 tag 1 ncq dma 1310720 ou
                                    res 40/00:01:00:4f:c2/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:14:54 2025] ata1.00: status: { DRDY }
[qua fev 26 14:14:54 2025] ata1.00: failed command: WRITE FPDMA QUEUED
[qua fev 26 14:14:54 2025] ata1.00: cmd 61/00:10:00:e6:7f/02:00:21:00:00/40 tag 2 ncq dma 262144 out
                                    res 40/00:01:00:00:00/00:00:00:00:00/00 Emask 0x4 (timeout)
[qua fev 26 14:14:54 2025] ata1.00: status: { DRDY }
[qua fev 26 14:14:54 2025] ata1: hard resetting link
[qua fev 26 14:14:55 2025] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[qua fev 26 14:14:56 2025] ata1.00: configured for UDMA/133
[qua fev 26 14:14:56 2025] ata1: EH complete

Last edited by Strangiato (2025-02-26 17:22:50)

Offline

#9 2025-02-26 21:12:37

seth
Member
Registered: 2012-09-03
Posts: 61,477

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

More errors:

seth wrote:

Do you have a complete journal covering those errors or only those few lines?

Starting with a line that says "error" is in most cases too late to get any idea what went wrong. Esp. w/ IO.

Offline

#10 2025-02-27 13:06:36

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

I'm unable to reproduce the file system corruption after replacing the sata cable. However, the write speed is inconsistent and very low, 130 MiB/s or less.

Offline

#11 2025-02-27 13:15:33

cryptearth
Member
Registered: 2024-02-03
Posts: 1,309

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

just replace the drive - with all that errors and inconsistencies it will fail sooner than later

Online

#12 2025-02-27 13:23:36

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

Any device can fail sooner or later. Unfortunately hardware is expensive in the third world. Otherwise, I would replace it by another one reliable and with better performance.

Offline

#13 2025-02-27 13:25:27

seth
Member
Registered: 2012-09-03
Posts: 61,477

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

Do you still get any kind of IO or bus related errors/warnings (downshifts, corrections, etc et pp)?

Offline

#14 2025-02-27 13:31:09

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

kernel and journal logs after several data transfers:

https://0x0.st/8mXt.txt

https://0x0.st/8mXJ.txt

Offline

#15 2025-02-27 17:49:27

cryptearth
Member
Registered: 2024-02-03
Posts: 1,309

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

Strangiato wrote:

Any device can fail sooner or later. Unfortunately hardware is expensive in the third world. Otherwise, I would replace it by another one reliable and with better performance.

skill issue
I'm well aware about priorities and that a new storage medium is something not everybody can just walk into the next electronics store and buy cash when needed - I myself spent over 500 euros for new drives due to failure - a co-worker paid 350 euro just today because his drive also failed last week - and it sure hurts us both as we work for minimum wage and have quite high fixed expenses - but as you can afford copying 140gig for fun you sure can afford a new ssd

Online

#16 2025-02-27 20:01:44

seth
Member
Registered: 2012-09-03
Posts: 61,477

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

There're no errors in that journal (did you enable some debug parameters? The kernel commandline is missing…)

However, the write speed is inconsistent and very low, 130 MiB/s or less.

Between what devices? There's notably

fev 27 09:31:20 Arch-PC kernel: ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)]
fev 27 09:31:20 Arch-PC kernel: ata6.00: ATAPI: HL-DT-ST BD-RE  WH14NS40, 1.03, max UDMA/100
fev 27 09:31:20 Arch-PC kernel: ata6.00: ACPI cmd f5/00:00:00:00:00:00(SECURITY FREEZE LOCK) filtered out
fev 27 09:31:20 Arch-PC kernel: ata6.00: ACPI cmd b1/c1:00:00:00:00:00(DEVICE CONFIGURATION OVERLAY) filtered out
fev 27 09:31:20 Arch-PC kernel: ata6.00: configured for UDMA/100

and

fev 27 09:31:20 Arch-PC kernel: usb 3-1: new SuperSpeed USB device number 2 using xhci_hcd
fev 27 09:31:20 Arch-PC kernel: usb 3-1: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10
fev 27 09:31:20 Arch-PC kernel: usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
fev 27 09:31:20 Arch-PC kernel: usb 3-1: Product: DataTraveler 3.0
fev 27 09:31:20 Arch-PC kernel: usb 3-1: Manufacturer: Kingston

The ATAPI drive will not be any faster ever and for

fev 27 09:31:20 Arch-PC kernel: ata1.00: ATA-11: Asgard AS1TS3-S7, SN09553, max UDMA/133
fev 27 09:31:20 Arch-PC kernel: ata1.00: 2000409264 sectors, multi 1: LBA48 NCQ (depth 32), AA

(which is also right on the money w/ your original errors)
see https://wiki.archlinux.org/title/Solid_ … NCQ_errors

Offline

#17 2025-02-27 20:13:58

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

I use a benckmark app called KDiskMark to measure the speeds. I also have Windows 10 installed on the drive, write speed is slow on it too.
The file system was corrupted again a few minutes ago. Definitely this drive cannot be used to write large amount of data.

Offline

#18 2025-02-27 21:25:43

seth
Member
Registered: 2012-09-03
Posts: 61,477

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

Blogging won't help.
Post the complete journal of the relevant boot and also see the wiki reg. ncq.

write speed is slow on it too

3rd link below. Mandatory.
Disable it (it's NOT the BIOS setting!) and reboot windows and linux twice for voodo reasons.

Is sda from the smart output actually the relevant device?

Offline

#19 2025-02-28 19:42:01

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

sda is the affected device, my Arch is installed on it.
After my previous comment I got a blue screen of death after copying large amount of data repeatedly while using Windows 10. Fast-Start is disabled on my Windows 10.
I have dactivated the ncq feature of sda with this kernel parameter:

libata.force=1.00:noncq

Since then I have done many data transfers with hundreds or thousands of files, more than 20 GiB each time, and kernel log has not reported any failure so far.

Last edited by Strangiato (2025-02-28 19:59:08)

Offline

#20 Today 16:57:48

Strangiato
Member
Registered: 2020-01-10
Posts: 417

Re: [Solved] Data transfer to SATA SSD corrupts EXT4 fs

The file system is no longer corrupted since the ncq feature of the affected sata ssd was deactivated. I'm going to mark this topic as solved.

Thank you very much for your help, seth. smile

Offline

Board footer

Powered by FluxBB