this post was submitted on 26 Mar 2026
24 points (96.2% liked)
Linux
64170 readers
619 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 6 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Your post title and post body are asking for two different things :P Tons of SATA to USB adapters and drive enclosures work well on Linux, that part isn't too difficult.
But what you probably want is one that has both UASP support and TRIM support for best SSD support. Here's the tricky part, even if the adapter or drive enclosure has TRIM support that doesn't mean it was auto enabled in the Linux system it was plugged into. Often times Linux can't tell if an adapter or drive enclosure has TRIM support so the safe thing to do is to not enable it by default. That means you can see the drive supports TRIM, hdparm says the drive supports TRIM, yet when you run fstrim it still complains that TRIM isn't supported.
Take a look at
https://wiki.archlinux.org/title/Solid_state_drive#External_SSD_with_TRIM_support
and https://glump.net/howto/desktop/enable-trim-on-an-external-ssd-on-linux
If you already have an external adapter or enclosure that claims TRIM support but it isn't working in Linux maybe try to enable TRIM and see how it goes?
For what it's worth I do have a drive enclosure, with ASMedia ASM1351 chipset, that claims TRIM and UASP support but by default fstrim still won't run TRIM on any drives inside it. If I get some free time maybe I'll see if I can get Debian to enable TRIM on the device just for testing but it could be a bit.
EDIT: Confirmed the instructions in archlinux seem to work and I was able to temporarily enable TRIM on my external drive enclosure to successfully run fstrim on an SSD inside it. I only did a quick test, setting provisioning_mode to "unmap" so it'll lose TRIM configuration once I disconnect the drive or restart the system. You'll probably want to go the extra step and set up udev rules to keep it enabled.
Tested on Debian with a Startech S251BMU313 (USB 3.1 enclosure for 2.5" SATA drives with ASMedia ASM1351 chipset). In theory the archlinux instructions should work with any external USB adapter or enclosure with TRIM support.
Also note the instructions are a bit confusing, I did notice that running sg_readcap immediately resets the configuration in provisioning_mode so in my case I had to avoid re-running sg_readcap after enabling "unmap".
EDIT2: Forgot one important tidbit :P for whatever reason the actual echo "unmap" command in archlinux would not work for me, I think you may need to have root permissions to actually do that? Instead I ran this with my non-root admin user:
Replace sdX with the drive device you're working with. I'm not entirely sure why the above command works for me in Debian, and not the archlinux version, but figured I'd document it here just in case.