To get TRIM working I did this
- make sure the BIOS is using AHCI and not IDE for the disks. You can tell it is by:
dmesg | grep AHCI
- use the Ext4 file system. This supports TRIM.
To see if trim is supported on the drive do this:
hdparm -I /dev/sde
(where /dev/sde is the drive).
That should say “Data Set Management TRIM supported” somewhere.
- make sure you add “discard” to the options for the mount points in /etc/fstab