Comment 1 for bug 1332720

Revision history for this message
Michael Webster (miketwebster) wrote :

It's not well-documented, but have a look at this, the contents of your /etc/cron.weekly/fstrim:

#!/bin/sh
# call fstrim-all to trim all mounted file systems which support it
set -e

# This only runs on Intel and Samsung SSDs by default, as some SSDs with faulty
# firmware may encounter data loss problems when running fstrim under high I/O
# load (e. g. https://launchpad.net/bugs/1259829). You can append the
# --no-model-check option here to disable the vendor check and run fstrim on
# all SSD drives.
exec fstrim-all

If you have a Samsung or Intel brand SSD, it's already there, and runs on a schedule, otherwise (and if you're sure your drive is capable), you have to add the --no-model-check flag to this.

This article explains a bit why the discard flag isn't used: http://www.howtogeek.com/176978/ubuntu-doesnt-trim-ssds-by-default-why-not-and-how-to-enable-it-yourself/