I have installed Ubuntu 14.04 LTS 64bit, and would like to make sure that TRIM is enabled (as much as I know - it is enabled by default). Is there some sort of command which would help me to find out if it is working correctly?
I have installed Ubuntu 14.04 LTS 64bit, and would like to make sure that TRIM is enabled (as much as I know - it is enabled by default). Is there some sort of command which would help me to find out if it is working correctly?
You can perform a
sudo fstrim -v /
(replace "/" with other mountpoints, if you have any), to check if fstrim gives any errors. If it doesn't, type incat /etc/cron.weekly/fstrim
which should give you an output like:If it does, it means, that your Ubuntu automatically recognized that you have an SSD and will trim it once a week as a cron job.
If you like to optimize your system for SSD, check out this article.
I would suggest that a more direct, if somewhat more complex, way to ensure that trim is working is by creating a file, identifying precisely where this file is stored, checking the contents of the file at this location, deleting the file, and then re-checking the contents of the file's location. If trim is working, the original contents of the file will have been replaced by zeros. The method and the specific commands to conduct this test are documented at: http://andyduffell.com/techblog/?p=852. A specific example of the technique is provided at: https://linuxnorth.wordpress.com/2014/03/18/trim-your-ssd-down-to-size/
On 18.04, you may check it in syslog:
if you see recent dates and all your SSD's mountpoints, it's working. Sample output:
To be sure of any possible errors, verbose fstrim manually: