You are not logged in.

#1 2025-07-15 23:19:14

kitsuna
Member
Registered: 2015-12-18
Posts: 8

Cant seem to get USB UASP trim working

I assume this would be the right section since its a hardware issue sorry if thats wrong. I am trying to get my UASP/TRIM supported external NVME working however i seem to be stuck. lsblk --discard seems to suggest its working after adding the udev rules but fstrim still reports unsupported.

Dmesg on drive connection and mounting the partition

 [   66.377177] usb 6-1: new SuperSpeed Plus Gen 2x1 USB device number 2 using xhci_hcd
[   66.390020] usb 6-1: New USB device found, idVendor=174c, idProduct=2463, bcdDevice= 1.00
[   66.390034] usb 6-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[   66.390038] usb 6-1: Product: Ugreen Storage Device
[   66.390043] usb 6-1: Manufacturer: Ugreen
[   66.390046] usb 6-1: SerialNumber: 2504178502FC
[   66.393844] scsi host0: uas
[   67.247922] scsi 0:0:0:0: Direct-Access     ASMT     2462 NVME        0    PQ: 0 ANSI: 6
[   67.355232] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   67.355390] sd 0:0:0:0: [sda] Write Protect is off
[   67.355402] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[   67.355699] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   67.380769] sd 0:0:0:0: [sda] Preferred minimum I/O size 512 bytes
[   67.380786] sd 0:0:0:0: [sda] Optimal transfer size 2097152 bytes
[   67.401339]  sda: sda1
[   67.401606] sd 0:0:0:0: [sda] Attached SCSI disk
[   69.795621] SGI XFS with ACLs, security attributes, realtime, scrub, repair, quota, no debug enabled
[   69.803269] XFS (sda1): Mounting V5 Filesystem b7f6bf38-5660-45b2-8054-422dd3165235
[   69.814440] XFS (sda1): Ending clean mount

lsusb

Bus 006 Device 002: ID 174c:2463 ASMedia Technology Inc. Ugreen Storage Device

udev rule

ACTION=="add|change", ATTRS{idVendor}=="174c", ATTRS{idProduct}=="2463", SUBSYSTEM=="scsi_disk", ATTR{provisioning_mode}="unmap"

lsblk --discard

NAME   DISC-ALN DISC-GRAN DISC-MAX DISC-ZERO
sda           0      512B       0B         0
└─sda1        0      512B       0B         0

Offline

#2 2025-07-16 20:59:12

topcat01
Member
Registered: 2019-09-17
Posts: 282

Re: Cant seem to get USB UASP trim working

I don't think disc-max should be zero for working trim. Can you confirm the current setting?

find /sys/ -name provisioning_mode -exec grep -H . {} +  2>/dev/null | sort

I also have a few UGreen UAS devices with NVMEs in them, and can confirm that TRIM works fine.

Last edited by topcat01 (2025-07-16 21:01:11)

Offline

#3 2025-07-16 21:59:25

kitsuna
Member
Registered: 2015-12-18
Posts: 8

Re: Cant seem to get USB UASP trim working

topcat01 wrote:

I don't think disc-max should be zero for working trim. Can you confirm the current setting?

find /sys/ -name provisioning_mode -exec grep -H . {} +  2>/dev/null | sort

I also have a few UGreen UAS devices with NVMEs in them, and can confirm that TRIM works fine.

returns

 
/sys/devices/pci0000:00/0000:00:08.3/0000:07:00.3/usb6/6-1/6-1:1.0/host0/target0:0:0/0:0:0:0/scsi_disk/0:0:0:0/provisioning_mode:unmap

Offline

#4 2025-07-17 18:04:30

topcat01
Member
Registered: 2019-09-17
Posts: 282

Re: Cant seem to get USB UASP trim working

On my devices, I get disc-max and disc-gran both > 0. So, I think it's not enabled. What happens if you disable the udev rule and set unmap manually after connecting?

Offline

Board footer

Powered by FluxBB