• [gentoo-user] USB and fstrim

    From Peter Humphrey@21:1/5 to All on Wed Mar 5 17:00:01 2025
    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and a Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I
    tried running fstrim on it I got a "not supported" error. The same result came from an older 20TB USB-3 spinning disk.

    Is this simply because of the USB link?

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From mad.scientist.at.large@tutanota.com@21:1/5 to All on Wed Mar 5 17:20:01 2025
    Most likely.  You also can't run smart test on them, unless you read the manual and jump through hoops.  I have had 1 external hard drive enclosure that actually communicated properly and that did support SMART without hoops.  I've had several others
    that didn't work easilly and I've never bothered to learn the SMART command options to try and make the others work.  As usual there's an ideal way to implement drives over usb, and then there's the easy/lazy/incomplete way most of them actually work.

    --"Fascism begins the moment a ruling class, fearing the people may use their political democracy to gain economic democracy, begins to destroy political democracy in order to retain its power of exploitation and special privilege." Tommy Douglas




    Mar 5, 2025, 08:54 by peter@prh.myzen.co.uk:

    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and a Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I tried running fstrim on it I got a "not supported" error. The same result came
    from an older 20TB USB-3 spinning disk.

    Is this simply because of the USB link?

    --
    Regards,
    Peter.





    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Frank Steinmetzger@21:1/5 to All on Wed Mar 5 21:10:01 2025
    Am Wed, Mar 05, 2025 at 03:53:51PM +0000 schrieb Peter Humphrey:
    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and a Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I tried running fstrim on it I got a "not supported" error.

    To get confirmation, try to find out what controller chip is used in the enclosure. I looked at a product search for “Ugreen M.2 USB” and just on the
    first page found three different models with three different controller
    chips, from Asmedia, JMicron and Realtek. Then you can check the data sheet whether it supports the necessary functions.

    The same result came from an older 20TB USB-3 spinning disk.

    Spinning disks only support TRIM if they are SMR.

    Is this simply because of the USB link?

    The link itself not. The controller needs to support and implement the relevant functions. Sometimes it’s also an issue of discovery. Pages like https://kb.plugable.com/data-storage/trim-an-ssd-in-linux mention a udev
    rule which helps linux at detecting TRIM.

    --
    Grüße | Greetings | Salut | Qapla’
    Please do not share anything from, with or about me on any social network.

    You don’t come into this world. You are pushed.

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCgAdFiEEVbE9o2D2lE5fhoVsizG+tUDUMMoFAmfIq+kACgkQizG+tUDU MMp4Zw/9EVMddAL4rzuRCeQb4121HlkWMypi27Toch9Mt5VifO5Xxov+M6v8GBrM h/mO4dI/gwGNHapVnSScgmwLGDo8NLmDvo0Wq8FTaUD4ZKjpt/5ZAXhHYfqZxDGG CUqZroMKBaOlP9I0B8/86Eucg3UVOxyo6FV4nVT/XpjPKY4rc9Il76RTdgWxJSio bjDwZGrZwoLwZK6GCS/l2+YJoXgt/Ci8yb1ZxEy/R3Az3ErGbBrfhdBJe0MNUP6N 8bonjCvQFgZeSnI7p4398tShfqXKpsiqquANrZHIWBbpMkMEr2Wb/X2R2+DJvjp4 VTbKzgglnm1zK5f6Q3nq1kMn/wO9WRbwJqrHqVhtG1ekD8CpWZw4btyq8BPE1OFx LQDfeZp/8dud+x0rex/AVvKl/aLSzClZrPYiA7H4jsBWp+IryBXKllvblW+Pk7oq 5Ghw+cFqeq4SmHngHRBrpsxfGnFf4veJaXH0j8WBc3oJDfxR39VcLs7U0fUBxKw6 y4euKN2eXYXyVpPjpsTJxHd8gLKazFwuccVHZ0QWcTmvpOMizlttTg1orjo+wMyh KyiCQZw3m1ufKEDcG+gwoYmBiPOhfTnRBXUhx3EQ2yRy/Gn26r/4Wpz+GNZHmauT I94OhajTDLqAlmJ+QLKD1FY6HfNGLnLSHzmNdfF4ekdCICJ6lrM=
    =jG+a
    -----END PGP SIGNATURE-----
  • From Michael@21:1/5 to All on Wed Mar 5 20:50:41 2025
    On Wednesday, 5 March 2025 19:54:19 Greenwich Mean Time Frank Steinmetzger wrote:
    Am Wed, Mar 05, 2025 at 03:53:51PM +0000 schrieb Peter Humphrey:
    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and
    a
    Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I tried running fstrim on it I got a "not supported" error.

    To get confirmation, try to find out what controller chip is used in the enclosure. I looked at a product search for “Ugreen M.2 USB” and just on the
    first page found three different models with three different controller chips, from Asmedia, JMicron and Realtek. Then you can check the data sheet whether it supports the necessary functions.

    The same result came from an older 20TB USB-3 spinning disk.

    Spinning disks only support TRIM if they are SMR.

    Is this simply because of the USB link?

    The link itself not. The controller needs to support and implement the relevant functions. Sometimes it’s also an issue of discovery. Pages like https://kb.plugable.com/data-storage/trim-an-ssd-in-linux mention a udev
    rule which helps linux at detecting TRIM.

    Yes, you need a compatible USB controller and suitable firmware to have the appropriate UASP SCSCI-to-ATA command for TRIM (unmap). Now somewhat aged, but detailed discussion on this topic can be found here:

    https://unix.stackexchange.com/questions/744891/fstrim-for-usb-ssd-boot-drive

    -----BEGIN PGP SIGNATURE-----

    iQIzBAABCAAdFiEEXqhvaVh2ERicA8Ceseqq9sKVZxkFAmfIuSEACgkQseqq9sKV ZxmCyA//cfdyk/c4pabshQvgXHXjRVRfMbg0cHIFXH9MGO4D/Vy8lM1PnQ3kSM3R e3phxJR86Dx9I4INgPayNhHKUIxnN1JSE93nsxcKkDIsMdPRfIK+JZWVTVAa9SRj dciy8mkoDt8Fk/Oow3Qm7ru5vdGV/zMTyLiGDZGT2Rw0jDpmKhTK+DmEqNcOFp3a oiRKVXD/dtnx+G+3rBNGohGwS/ikt/bXS9HAH84iLNQlWEFw6Inwqor2G7laU39g rUggj+/Mu2ugDEzWTsCG8V2jTriGG/FGXpU+VEBa2qnekRfV6ccrvC1dXuZ96IYj cK7pKe1SmYhpUpWTQcsK9eTclqDPicDsgwCnf6I2meVwMPrEQEj6pfvX2eCyAPbg WeRyvcohjJcExdYYoPXUD7fyGpzbx/tOynt4ncsuDYTIt4fjlkr0X6JZnNQtP+0R zxEp005jBgFGD9gyI/jvquQHEvb96PxRcuYmm368tos7VZvkNU9VkqPH7qF7aAwr 3ebbMmOzAFP6IoE02u39CEXIv2Hk+eqlSWZufaVBv7sOzJMNNvDhd2iHfjRg/LUo Y0i86LiyKEfExcvDWxmrGC5ba1rc6vy/3F5p3SuOHqt+F1kvgh0/Bq89bejNNZi0 YBhbGwZ6wzJBbxWVY+g7KaIbjbsGnBM0uBRj3maIHm2EvGZF25g=
    =Qixe
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Sun Mar 23 13:10:01 2025
    On Wednesday, 5 March 2025 19:54:19 Greenwich Mean Time Frank Steinmetzger wrote:
    Am Wed, Mar 05, 2025 at 03:53:51PM +0000 schrieb Peter Humphrey:
    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure, I decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD and
    a
    Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when I tried running fstrim on it I got a "not supported" error.

    To get confirmation, try to find out what controller chip is used in the enclosure. I looked at a product search for “Ugreen M.2 USB” and just on the
    first page found three different models with three different controller chips, from Asmedia, JMicron and Realtek. Then you can check the data sheet whether it supports the necessary functions.

    Thank you Frank.

    I revisited this today and found that the enclosure I bought does not support TRIM, but another one, barely distinguishable, does. I'll return the one I have and replace it with the other.

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Peter Humphrey@21:1/5 to All on Mon Mar 24 17:20:01 2025
    On Sunday, 23 March 2025 12:01:55 Greenwich Mean Time Peter Humphrey wrote:
    On Wednesday, 5 March 2025 19:54:19 Greenwich Mean Time Frank Steinmetzger

    wrote:
    Am Wed, Mar 05, 2025 at 03:53:51PM +0000 schrieb Peter Humphrey:
    Greetings,

    After reading the recent conversation on m.2 SSDs in a USB-3 enclosure,
    I
    decided to give it a try. I bought a 4TB Samsung 990 PRO NVMe M.2 SSD
    and
    a
    Ugreen NVMe USB-3 enclosure. I'm pleased with the performance, but when
    I
    tried running fstrim on it I got a "not supported" error.

    To get confirmation, try to find out what controller chip is used in the enclosure. I looked at a product search for “Ugreen M.2 USB” and just on
    the first page found three different models with three different
    controller chips, from Asmedia, JMicron and Realtek. Then you can check
    the data sheet whether it supports the necessary functions.

    Thank you Frank.

    I revisited this today and found that the enclosure I bought does not
    support TRIM, but another one, barely distinguishable, does. I'll return
    the one I have and replace it with the other.

    Hah! Not only does the new one still not support discard, but it can't handle 4TB drives.

    Back to the drawing board...

    --
    Regards,
    Peter.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)