Hi,
Anyone care to venture an opinion on the following? I recently put an msata solid state drive in my laptop. As far as I am aware, Slackware does nothing out of the box to manage TRIM etc on this type of drive.
I came across the following script:
"The following script can be used to automatically detect and fstrim all filesystems that have TRIM support enabled."
Code:
#!/bin/sh
#
# To find which FS support trim, we check that DISC-MAX (discard max bytes)
# is great than zero. Check discard_max_bytes documentation at
# https://www.kernel.org/doc/Documentation/block/queue-sysfs.txt
#
for fs in $(lsblk -o MOUNTPOINT,DISC-MAX,FSTYPE | grep -E '^/.* [1-9]+.* ' | awk '{print $1}'); do
fstrim "$fs"
done
This script assuming it does as advertised, would suit rc.6 on machines that are shutdown, probably better as a cron job on an always up box. Possibly even a candidate for inclusion in rc.6 as standard?
For reasons explained here:
http://blog.neutrino.es/2013/howto-p...m-and-dmcrypt/
it seems a better option than the discard parameter in fstab.
regards,
tobyl