Raspberry Pi, here's how to activate the TRIM command on SSD

Raspberry Pi, here's how to activate the TRIM command on SSD
The increasingly active community dedicated to Raspberry Pi periodically discovers some really interesting hacks. One of these was recently shared by Jeff Geerling, a Raspberry Pi enthusiast who conducted a fantastic analysis of how to enable TRIM on an external USB SSD.

In case the name tells you nothing, TRIM is a ATA interface command that tells an SSD which parts of the drive are no longer used. When the machine is idle, the Active Garbage Collection component deletes any data that is no longer in use marked by the TRIM command. What Geerling has done is find a way to enable TRIM on an SSD using a Raspberry Pi.

According to Geerling, the process of enabling TRIM in Linux is not simple:

While microSD cards internal devices seem to support TRIM without making any changes, none of the external USB drives I tested supported it right away. They all needed a little help.

You will need to verify that TRIM is even supported on the drive before you can proceed and Geerling recommends using root level access to complete the process. If your device supports TRIM, you can follow the steps in the guide created by Geerling which explains step by step how to enable TRIM. If everything works without any errors, it may take a few seconds, depending on the size of the drive, for the operation to run.

It will also be essential to take additional steps to save the changes, otherwise the previous values ​​will be fully restored when the Raspberry Pi restarts. You can also enable the automatic TRIM feature, so that the process runs on its own. Obviously, to learn more about it, we recommend that you consult the full post on the Geerling website, full of other interesting information for makers.





Powered by Blogger.