8

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

  • 1
    fstrim via USB is not supported as discussed extensively here: ubuntuforums.org/showthread.php?t=2315800 – WinEunuuchs2Unix Dec 14 '16 at 17:49
  • Irregardless of whether drive supports trim, when connected thru usb you can't run a trim command as it's a SATA command. Case closed... – doug Dec 14 '16 at 17:52
  • 2
    I don't think so, that USB generally does not support it. Trim should work via USB Attached SCSI Protocol. Question is if USAP is proper implemented in Linux - en.wikipedia.org/wiki/USB_Attached_SCSI – Luckyrings Dec 15 '16 at 19:39
  • 2
    Maybe fstrim does not support USAP. But the Samsung SSD T3 Portable drive support USAP. While in Windows 8+ it connects with USB Attached SCSI (UASP), enabling advanced functionality like NCQ and TRIM (SCSI Unmap). So what about Linux now? – Luckyrings Dec 15 '16 at 19:45
  • 4
    I second that. Trim works over USB and should definitely work on linux. The attitude of the user @doug is really unacceptable. – Pa_ Aug 6 '17 at 16:09
3

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.