You are not logged in.

#1 2025-02-12 16:22:09

fredbezies
Member
Registered: 2011-07-28
Posts: 367

SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

Hello.

I noticed some partition table corruption when I plugged either an USB powered HDD or SSD. In dmesg, I got a lot of message about USB reset happening:

[  114.674453] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  115.184251] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  115.690709] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  116.200505] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  116.710288] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  117.220101] usb 6-2: reset SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[  117.234361] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=2s
[  117.234368] sd 6:0:0:0: [sdb] tag#0 CDB: Write(10) 2a 00 07 47 13 18 00 08 00 00
[  117.234370] I/O error, dev sdb, sector 122098456 op 0x1:(WRITE) flags 0x4800 phys_seg 2048 prio class 0

Is anybody having this bug? I reported it on kernel.org bugzilla here: https://bugzilla.kernel.org/show_bug.cgi?id=219773

Thanks for the help you can bring me here.

Offline

#2 2025-02-12 17:51:57

xerxes_
Member
Registered: 2018-04-29
Posts: 881

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

These errors wasn't/aren't displayed in previous kernel versions? What if you run now pre-6.12 kernel - will these errors show up (so drive is really permanently corrupted)?

Can you post output of commands:

sudo fdisk -l /dev/sdb
sudo smartctl -x /dev/sdb

Can you mount some partition(s), even in read-only mode, from that drive?

Did you run badblocks on that drive?

I don't have usb3 (xhci_hcd), so I can't test it.

Last edited by xerxes_ (2025-02-12 17:56:38)

Offline

#3 2025-02-12 18:13:06

jonno2002
Member
Registered: 2016-11-21
Posts: 765

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

i had the same or very similar problem with external hdd/ssd's on 2 of my machines and this fixed it:
https://leo.leung.xyz/wiki/How_to_disab … rage_(UAS)

surprised this info isnt in the arch wiki

Offline

#4 2025-02-12 18:25:41

fredbezies
Member
Registered: 2011-07-28
Posts: 367

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

xerxes_ wrote:

These errors wasn't/aren't displayed in previous kernel versions? What if you run now pre-6.12 kernel - will these errors show up (so drive is really permanently corrupted)?

I tried previous kernels without any luck.

Can you post output of commands:

sudo fdisk -l /dev/sdb
sudo smartctl -x /dev/sdb

First command:

sudo fdisk -l /dev/sdb
Disk /dev/sdb: 465,76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: MobileDataStar  
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0D820E40-5858-9090-8081-828310111213

Device     Start       End   Sectors   Size Type
/dev/sdb1   2048 976773119 976771072 465,8G Microsoft basic data

Second command: see this mega.nz shared file: https://mega.nz/file/Sy4VBYaC#Uk-m192Gz … gjE1DSZdTU

Can you mount some partition(s), even in read-only mode, from that drive?

Did you run badblocks on that drive?

No for both.

I don't have usb3 (xhci_hcd), so I can't test it.

Thanks anyway.

Offline

#5 2025-02-12 18:26:21

fredbezies
Member
Registered: 2011-07-28
Posts: 367

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

jonno2002 wrote:

i had the same or very similar problem with external hdd/ssd's on 2 of my machines and this fixed it:
https://leo.leung.xyz/wiki/How_to_disab … rage_(UAS)

surprised this info isnt in the arch wiki

I think I tried this, without luck. Will try it again later, just to be sure.

Offline

#6 2025-02-12 20:13:19

xerxes_
Member
Registered: 2018-04-29
Posts: 881

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

Offline

#7 2025-02-13 08:16:14

fredbezies
Member
Registered: 2011-07-28
Posts: 367

Re: SSD / HDD on USB: corruption happening in both Linux 6.12.x / 6.13.x

I prefer not restoring USB HDD/SSD.

I'll try tweaking UAS this weekend. I won't have time to try this before.

Edit: find some time yesterday, but no luck. Still getting these errors in dmesg log sad

Last edited by fredbezies (2025-02-14 07:34:55)

Offline

Board footer

Powered by FluxBB