Title. I need a USB 3 to SATA adapter to use a spare 2.5" SSD with a machine that doesn’t have any spare SATA ports and no place to put it at this point.

I’ve read that most of these adapters have issues with supporting TRIM on Linux. I need one that supports TRIM.

So any recommendations for something that will survive reboots which I’m planning to use for semi-permanent game storage?

An enclosure style is fine.

(Note: I too can search Amazon. When looking into the reviews from Linux users most of the adapters that claim to work with Linux have people clarifying TRIM doesn’t work.)

  • Brickfrog@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    6 hours ago

    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:

    echo unmap | sudo tee /sys/block/sdX/device/scsi_disk/*/provisioning_mode
    

    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.

  • MonkderVierte@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    9 hours ago

    Sata SSD support TRIM? They are already m.2-on-a-adapter-in-a-enclosure. Just take the SSD out and get a m.2 external case.

  • BrianTheeBiscuiteer@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    11 hours ago

    Sounds like it would be actively used so I wouldn’t go without a powered adapter or hub. I struggled for months with an external adapter that would work 90% of the time but suddenly unmount at the worst times.

    • lost_faith@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      11 hours ago

      I have 2x orico enclosures, at usb 3.0(not C, I haven’t used that one yet, it has a 2tb m.2) holding a 2tb and an 8 tb SATA platters, and according to the orico site several of their enclosures explicitly state they support TRIM, my 2 don’t explicitly say they support TRIM but I can see the smart status on them

  • RedWeasel@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    13 hours ago

    The feature you are going to want to look for is USB Attached SCSI (UAS) or USB Attached SCSI Protocol (UASP) support.

  • fozid@feddit.uk
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    15 hours ago

    I have 4 startech usb3 to SATA cables connected to a powered atolla usb3 hub, running on Debian. Had no problems at all with them over the last 12 months. My setup is is using lvm and raid1 with 2tb ssd’s.

  • CameronDev@programming.dev
    link
    fedilink
    arrow-up
    7
    ·
    21 hours ago

    If you share your approximate location, there might be someone in your area with a harddrive enclousure that they shucked the drive from.

    If your in Australia, I can send you a bunch of Western digital harddrive enclosures for free if you pay shipping.

    • Majestic@lemmy.mlOP
      link
      fedilink
      arrow-up
      3
      ·
      14 hours ago

      Thanks for the kind offer.

      Funnily enough I have a WD HDD enclosure that I shucked a drive from not too long ago. I do recall someone mentioning the circuit boards on those being functional as a USB to SATA bridge but I suppose I presumed they need mains power and didn’t want the extra mess. That and I guess I wanted to keep the one I had pristine in case I need to RMA after putting it back together again as I’ve heard people have real mixed experience with RMAing shucked drives and with prices the way they are well I’d rather not take chances given I’ve only the one.

  • flowque@lemmy.ml
    link
    fedilink
    English
    arrow-up
    5
    ·
    20 hours ago

    This from Amazon works for me: https://a.co/d/09FcGlfr SABRENT SATA to USB Cable - USB 3.0 to 2.5” SATA

    I’ve used it with a few Samsung SSDs with Linux Mint, OSX , even works with Xbox.

  • over_clox@lemmy.world
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    21 hours ago

    I don’t know about TRIM compatibility specifically, but I must suggest you don’t get one of those combo SATA/PATA adapters. Although I don’t know about TRIM compatibility, I do know for a fact that those combo adapters do not support SMART stats for mechanical hard drives. So I assume combo adapters won’t support TRIM either.

    • Brickfrog@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      2
      ·
      edit-2
      18 hours ago

      That’s good info! I’ve been looking around for a PATA to USB adapter with SMART support and haven’t had a ton of luck narrowing one down. Thinking offhand I may need to cobble together a PATA-to-SATA adapter connected to a SATA-to-USB adapter to actually get some SMART info moving from a PATA drive via USB. It’s not the only way to do this but it would be a lot easier if it can be done via USB :/

      Also some fun info since you mentioned PATA adapters - The Maxtor OneTouch II is a terrible ATA enclosure, especially on Linux. For whatever reason the built-in chipset does some sort of disconnect right at the end of long operations like formatting, partitioning, etc. so you’re never entirely sure if the command worked correctly. I guess it was designed with Windows in mind, or maybe its Linux compatibility isn’t 100% there. And of course no SMART info gets passed through.

      • over_clox@lemmy.world
        link
        fedilink
        arrow-up
        2
        ·
        5 hours ago

        Sadly I’ve never seen a PATA to SATA adapter that supports SMART stats either. I spent quite a while late last year on eBay looking for a direct USB to PATA only adapter on eBay, with no luck though, all I keep finding are those combo adapters ☹️

        The last ancient USB to PATA only adapter I once had did actually support SMART stats, but apparently the adapter’s firmware didn’t support drives over 128GB ☹️

        Sigh, maybe I’ll stumble into something someday at a thrift store or something 🤷

        • Brickfrog@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          4 hours ago

          The last ancient USB to PATA only adapter I once had did actually support SMART stats, but apparently the adapter’s firmware didn’t support drives over 128GB

          So close, you almost had it!

          Same, been thinking of just keeping an eye out at thrift stores and such for an antique USB drive enclosure… one that isn’t a Maxtor OneTouch, heh. Or maybe my idea of a janky PATA-to-SATA connected to SATA-to-USB will actually work for SMART info by some miracle.

          If I had more space for storing old tech I’d maybe just adopt or buy an ancient desktop that actually has PATA ports in it. I’ve actually seen them come up on Craigslist, like ancient Compaq desktops from back in the day before SATA existed.

          • over_clox@lemmy.world
            link
            fedilink
            arrow-up
            2
            ·
            3 hours ago

            That ancient USB to PATA adapter I had, before it got stolen anyways, was actually a repurposed adapter for an external USB 4X CD burner, so it kinda makes sense that it would never support any drives over 128GB (120GB in practice), as it was never actually meant to be used on hard drives in the first place. But for 120GB and less, it worked just fine.

            It sucked for me though, as I had and still have a 1.8" 160GB hard drive from an OG iPod 1 and all the other relevant adapters to connect it to 2.5" PATA. Also sadly, my old Dell B130 apparently also has the 120/128GB firmware limit, so I can’t even use it natively, I had sooo wanted to upgrade that thing from 80GB to 160GB…

            🤷

  • ScoffingLizard@lemmy.dbzer0.com
    link
    fedilink
    arrow-up
    1
    ·
    19 hours ago

    Maybe search for internal drive enclosure. I got one for old data ssd and it works fine. It’s just a case with a USB cable. You put drive in the case. I bought it a while back so will not bother sending link.

    • AbidingOhmsLaw@lemmy.ml
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      8 hours ago

      Ditto, I’ve one that will power a full size sata hdd (external power supply), use it for backups to magnetic, never had an issue. Got it years ago from a defunct computer shop, so no link but I Willi post the model later and put a ssd in and check TRIM.

      Edit: the enclosure I have is a ORICO 3588US3 if you use it with a ssd you don’t need the external power supply, I put a ssd in it and ‘sudo hdparm -I /dev/sdb’ reports ‘Data Set Management TRIM supported’