Score:0

Is it safe tu turn off fstrim service because of possible data loss due to fstrim

id flag

So, on one of our servers (and we have 154), we saw this log entry:

Feb 21 00:00:03 vps-442 fstrim[3162507]: /boot/efi: 97.8 MiB (102542848 bytes) trimmed on /dev/sda15
Feb 21 00:00:03 vps-442 fstrim[3162507]: /: 15.6 GiB (16687521792 bytes) trimmed on /dev/sda1
Feb 21 00:00:03 vps-442 systemd[1]: fstrim.service: Succeeded.
Feb 21 00:00:03 vps-442 systemd[1]: Finished Discard unused blocks on filesystems from /etc/fstab

And we have corrupted and missing files on that system!

Is it safe to turn off fstrim on vps server service?

in flag
Even if `fstrim` is disabled in the virtual machine or on the host, most modern SSDs will continue to run TRIM commands at regular intervals as it’s built into the firmware of the storage device itself. If you are seeing evidence of data loss or write degradation, you will want to replace the SSD as soon as possible
waltinator avatar
it flag
You haven't diagnosed the problem (corrupted and missing files). Picking a "solution" out of thin air is premature at best. Don't solve the problem before you understand the problem.
id flag
@matigo it's VPS, I guess host would be doing the trim...
id flag
@waltinator what should I look for? I don't find anything at syslog at the time that folder was last modfied... No intrusions on that machine, and some svn files are corrupted or missing... Only logical explanation is they were on some blocks which were trimmed...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.