On Wednesday, 5 March 2025 19:54:19 Greenwich Mean Time Frank Steinmetzger 
wrote:
> Am Wed, Mar 05, 2025 at 03:53:51PM +0000 schrieb Peter Humphrey:
> > Greetings,
> > 
> > After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I
> > decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and
> > a
> > Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I
> > tried running fstrim on it I got a "not supported" error.
> 
> To get confirmation, try to find out what controller chip is used in the
> enclosure. I looked at a product search for “Ugreen M.2 USB” and just on the
> first page found three different models with three different controller
> chips, from Asmedia, JMicron and Realtek. Then you can check the data sheet
> whether it supports the necessary functions.
> 
> > The same result came from an older 20TB USB-3 spinning disk.
> 
> Spinning disks only support TRIM if they are SMR.
> 
> > Is this simply because of the USB link?
> 
> The link itself not. The controller needs to support and implement the
> relevant functions. Sometimes it’s also an issue of discovery. Pages like
> https://kb.plugable.com/data-storage/trim-an-ssd-in-linux mention a udev
> rule which helps linux at detecting TRIM.

Yes, you need a compatible USB controller and suitable firmware to have the 
appropriate UASP SCSCI-to-ATA command for TRIM (unmap).  Now somewhat aged, 
but detailed discussion on this topic can be found here:

https://unix.stackexchange.com/questions/744891/fstrim-for-usb-ssd-boot-drive

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to