fstrim on external SSD drives don't work

I have two external USB 3.0 SSD drives from Samsung (one is Model T1, other T3).

I would like to trim them with my Ubuntu 16.04.1 LTS.

While doing that I receive a error message. Here an example:

sudo fstrim -v  /media/techo/Samsung_T3
fstrim: /media/techno/Samsung_T3: the discard operation is not supported

But the device support the TRIM Command:

techno@server:~$ sudo hdparm -I /dev/sdb |grep -i TRIM
       *    Data Set Management TRIM supported (limit 8 blocks)

thx. What do I wrong?

luckyrings


USB drives use a USB<>SATA translation via an IC. Different ICs offer slightly more or less SATA command translations. They all translate the SATA commands required for typical disk usage.

So, the hdparm -I (inquiry) command will work. It will tell the user that 'trim' is supported. But that doesn't mean the USB<>SATA translation includes translating the trim command.

It isn't that the inquiry -I command gives incorrect information. The USB<>SATA translation chip just isn't designed to translate the trim command. If enough users complain, something might be done to make the translations more complete.