[SOLVED] Trim not working on a USB 3.0 drive

That’s good news. I found this on Amazon - is this what you have?

Many thanks tbg - I’ll look into it.

1 Like

Apparently Apple supports trimming via thunderbolt OOTB.

Following on from what you mentioned, I found this website:

Using the information on this site, I then checked to see if the UASP driver is installed - this will be shown as Driver=uas. Unfortunately, it is not there, but have Driver=xhci_hcd/6p instead:

[mike@G750 ~]$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 13d3:5188 IMC Networks 
Bus 003 Device 002: ID 8087:07dc Intel Corp. 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[mike@G750 ~]$ lsusb -t
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 5000M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
    |__ Port 5: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
    |__ Port 5: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 7: Dev 3, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 7: Dev 3, If 1, Class=Video, Driver=uvcvideo, 480M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/8p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/6p, 480M

Can’t remember if I mentioned it, but the laptop is an Asus G750JS (CPU i7-4010HQ), made in 2014, so yes it’s relatively new. Even though UASP driver doesn’t seem to be in the machine, file transfer rates between the internal SSD and the external one is still very fast, and is at times maxing out at a bit more than 500MB/s, though is typically between 300 & 450 MB/s for a mix of different file types & sizes. I think 500MB/s is close to the write-speed limit for this make of SSD.

Well as far as I can see you don’t have many options then. The best one would involve swapping the drive out periodically to a desktop Linux box if you have one. They sell mini drive caddies with swing open tops that you can easily pop an SSD drive in and out of in seconds.
If you have a desktop box with estata you could then get a hot swap dock with estata to trim the drive occasionally. Hardly ideal, but it’s about the only thing I can think of that wouldn’t be a major headache of disassembly reassembly simply to perform a trim operation now and then.

If you don’t work out some kind of system for periodic trim then there won’t be much point in using an SSD for storage. After a while it will slow down to slug speed as the drive fills with deleted clutter. Unfortunately, this appears to be one of those cases where the hardware hasn’t become common enough except on newer computers to support this. Too bad.

1 Like

Really appreciated the discussions here - very helpful even if I haven’t as yet been able to sort out the Trim side of things. I think Hipster’s idea & experience with a drive docking station (reply #16) is a really good one. I’ve had a look on Amazon and there seem to be a few which look pretty similar.

Of course, the other thing I could do is to periodically clone the internal data-only SSD to the external backup. That way the cumulative mess,caused by repeated file deletions, will not occur.

If I find anything that works I’ll post it on the forum, re. a USB controller, etc. Many thanks again :sunglasses:

I have 2 mediasonic 4bay hot wap docking stations that have USB 3 and esata ports. I use esata and its controler works well on linux. I also have 2 thermaltake blackX 2bay docking stations their controlers I’ve had issues with. I wouldn’t recommend the thermaltake one’s, but the mediasonic one’s are great. Best of luck.

1 Like

Yep that’s the one. Install it with -S pcsclite ccid. Easy.

Only drawback with this one is that I could not get it to work with ide. It is a cheapy though.

I’ve never tried the cloning feature. Would rather use clonezilla. Don’t even know if cloning works in linux.

1 Like

Going off topic a bit here I know.
In Linux there is the ‘dd’ command, my preferred cloning tool for backing up my entire OS-drive - I like it’s simplicity. The only snag is that it’s slow as it copies all the ‘gaps’ as well as the data-filled areas. I believe Clonezilla is faster (never tried it) as it ignores the ‘gaps’, i.e. unallocated space

I was talking about the cloning feature that comes with the dock. Not linux itself. :wink:

Many thanks for that. The spec on Amazon (reply #16 weblink) doesn’t mention SSDs, just HDDs, I guess that doesn’t matter …?

Pardon me! I’ve just got up, still half asleep …:pensive:

Had a closer look at the one I have. Two slots. One for ide. One for sata (SSD). Also has slots for various cards & usb. Shop around for a cheap one. Seems to be quite a few round. But as I said the ide did not work on mine so those drives got the flick. :scream:

1 Like

I’ve ordered a USB caddy with the JMS578 chip - there seem to be a few of them on Amazon.co.uk, and they’re not expensive (~ £11) - many thanks for this tip, tbg.

Following on from what you said, about installing the UASP driver, would I need then to first install Windows 8 or 10, i.e. UASP driver can only be installed under Windows OS, not Linux ? I guess I’ll just do what needs to be done - I still have a Windows OS disk which I could use…

UASP is supported on windows 8 & 10, but the problem with that is Windows will not recognize an ext4 formatted drive. You could format the SSD as NTFS, it will read/write on both Window & Linux. Unfortunately, that is not a workable solution for Linux system backups as it does not retain the proper Linux file permissions. Fine for Music and Video, but no good if Linux file permissions must be maintained. You may still run into the issue on Windows that the motherboards USB controller must also support UASP. Not sure if that is a requirement on Windows. Haven’t used Windows since 7, so I’m not up on recent Windows developments.

1 Like

Why TRIM :stuck_out_tongue_winking_eye:

1 Like

Because it’s an SSD & it needs ‘tidying-up’ every now-and-then to sort out the clutter - a bit like a child’s bedroom …

I searched on Amazon and bought this caddy for the SSD - it’s USB controller has the jms578 chip:

It works!
Just to show trimming took place here is the terminal output:

[mike@G750 ~]$ sudo fstrim -v /media/BACKUP
[sudo] password for mike: 
/media/BACKUP: 450.8 GiB (484030390272 bytes) trimmed
[mike@G750 ~]$ sudo fstrim -v /media/BACKUP
/media/BACKUP: 0 B (0 bytes) trimmed

Many thanks tbg. I’ll now mark the trimming issue as solved, and indicate reply #9 of this thread as the solution, as the key point here was the presence of the jms578 chip in the USB controller, which supports Trim.
Job done :ballot_box_with_check:

Have a great day :sunglasses:


That is awesome, I’m so glad it worked for you. To be honest I had my doubts that would work without a UASP capable controller on your mobo as well. Nice of you to post the enclosure that worked so other know there is a working solution to this problem. Great stuff. :+1:

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by