I was wondering whether mounting an SSD using the
discard option (documented in
man mount) is actually required for ATA TRIM to be sent to the SSD's controller.
The evidence is a bit circumstantial: Whether or not I mount a partition with
discard on a SanDisk SSD PLUS, deleted files can't be restored by running TestDisk moments after the deletion. File paths are intact, but file content is gone. From this I suspect that TRIM ran on the SSD and made the file contents irrecoverable.
systemctl list-timers, there doesn't seem to be a unit that runs
Does the kernel send TRIM after file deletion although the partition is not mounted with
discard? Or is it another reason why TestDisk reliably can't restore files from the SSD?
I'm on Arch Linux 5.12.3.
findmnt tells me this about the partitions and their mount options:
TARGET SOURCE FSTYPE OPTIONS / /dev/sda3 ext4 rw,relatime └─/sda1 /dev/sda1 ext4 rw,relatime,lazytime,discard