I have heard, that Ubuntu 14.04 will have Trim enabled by default. How will this be done? By adding a discards option to the ext4 mount options or by running a cron-job?
Will the default options for Trim be automatically compatible with the LVM and encryption layers of the standard Ubuntu-system encryption?
It would be great to see some details about this.
Best Answer
Claiming that 14.04 will enable trim by default is only 1/2 the story.
LVM is a container and is not a filesystem so this is not an issue.
Articles worth reading:
Blueprint
Conclusion from that link in German:
Only Intel and Samsung SSDs will have TRIM enabled by default in Ubuntu 14.04 because some cheap SSDs can even brick themselves when running TRIM. The contents of
/etc/cron.weekly/fstrim
on 14.04 beta 2:This doesn't mean TRIM should only be used with Samsung and Intel SSDs, but to avoid running into issues, this is the default option for now. Note that if you already know your SSD can handle TRIM, you can bypass the vendor check by editing the
/etc/cron.weekly/fstrim
file above and adding the--no-model-check
option to the last line:Alternatively, you can schedule TRIM manually a few other ways. How to do it manual.
Source: webupd8
The method to do trim is with this command:
And this is also how Ubuntu does this: by creating a cronjob that does this on a weekly basis.
Executed from my own system:
Takes a bit of time and it does not show any progress until done.