Thank you for your information and for sharing your /etc/fstab-file. As far as I know a better way as the "discard" option (which is called "online discard") is "batched discard" because online discard "slows operation considerably; there's also been some claims that excessive trimming can, itself, shorten drive life." (http://lwn.net/Articles/417809/)

To use batched discard, you need to create a file /etc/cron.weekly/batched_discard (weekly) /etc/cron.daily/batched_discard (daily) respectively with this text:

#!/bin/sh
LOG=/var/log/batched_discard.log
echo "*** $(date -R) ***" >> $LOG
fstrim -v / >> $LOG
fstrim -v /home >> $LOG

(This example presumes that you have a root and home partition; you may need to modify it to your needs.)

Than you need to make it executable:

sudo chmod 755 /etc/cron.weekly/batched_discard

Reply via email to