In Debian bug #889668 the question of enabling fstrim by default on Debian came up. It looks like the intention of fstrim's -a flag was to be sort of equivalent to mount -a. Unfortunately the current behavior is to crawl /proc/self/mountinfo instead of /etc/fstab for mounts and then trimming all of them. This seems to be undesirable if removable media are attached or certain file systems have been mounted somewhat temporarily. fstrim -a seems to be designed as a background action anyway so the current behavior of a weekly timer stomping over your currently mounted disk is a little surprising. Would it be possible to add another mode (or fix the existing one) to read from /etc/fstab instead? That'd seem to be safer to enable by default.
In Debian bug #889668 the question of enabling fstrim by default on Debian came up. It looks like the intention of fstrim's
-aflag was to be sort of equivalent tomount -a. Unfortunately the current behavior is to crawl/proc/self/mountinfoinstead of/etc/fstabfor mounts and then trimming all of them. This seems to be undesirable if removable media are attached or certain file systems have been mounted somewhat temporarily.fstrim -aseems to be designed as a background action anyway so the current behavior of a weekly timer stomping over your currently mounted disk is a little surprising. Would it be possible to add another mode (or fix the existing one) to read from/etc/fstabinstead? That'd seem to be safer to enable by default.