Using CentOS and SSD-units. How to enable TRIM?
1. First check that the disk actually supports TRIM:
# hdparm -I /dev/sda | grep -i trim
If support is available, you should get the below returned:
* Data Set Management TRIM supported
2. Add "discard" to filesystem entry in /etc/fstab.
Eg. (below line is to be typed in one line, ie no linebreaks):
UUID=a8c04737-93ca-437e-a8a2-ed0a96951474 / ext4 defaults,discard 1 1