I know that the Linux kernel supports TRIM as of version 2.6.33, so there should be TRIM support in ubuntu 10.10.
Is TRIM enabled by default or do I need to change some settings or install additional software for it to work? If so, how?
feedback
|
|
There are two forms of TRIM, manual (wiper.sh) and automatic: 1) Manual TRIM In ubuntu this can be performed with fstrim, but is not needed when automatic TRIM is enabled. fstrim first appeared in 11.10, on earlier systems you have to use 2) Automatic TRIM Automatic TRIM is supported since kernel 2.6.33 with the EXT4 file system For automatic TRIM to work, the drive needs to be mounted with the "discard" option in fstab. To add this option run:
add
reboot, automatic TRIM should now be working. Testing automatic TRIM: To Test if Trim is working issue the following commands (adapted from here):
From the output copy the number under "begin_LBA" and use it in the next command. Also check the system name of your SSD: System->Administration->Disk Utility (sda, sdb, or sdc ...)
you should receive a a long string of characters for those sectors
even after removing the file the sectors are still not empty. Wait a while then run the command again
if you get only zeros, then automatic TRIM is working. | |||||||||||||
feedback
|
|
Note that if you are using encryption the solutions posted here so far won't help you, because you need to enable TRIM support in the encryption layer as well. This can be done with kernel versions 3.1+ and cryptsetup versions 1.4+, both of which are included in Ubuntu 12.04. Find my guide on setting TRIM up for LUKS encrypted partitions here: http://worldsmostsecret.blogspot.com/2012/04/how-to-activate-trim-on-luks-encrypted.html Feel free to comment / enhance / copy / share. | |||
|
feedback
|
This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.