Syncthing on raspberry pi with SD card

I’m deploying Syncthing on a raspberry pi with a Sandisk “high endurance” 128GB SD card. Although it is a high-endurance card, I assume it will eventually fail like all SD cards do, due to wearing.

  • I don’t mind too much if I lose my files stored on the pi. The whole idea is I get redundancy by syncing across multiple devices.

  • But if the corruption on the pi caused by SD card failure spreads to all the other devices by the syncing, this could be a disaster.

Is my worry justified? Will I get warning about the failure so that I can do something to prevent the spread?

Thanks for any advice.

That depends entirely on the failure and how the OS reports it upwards. If Syncthing gets an I/O error when scanning for changes it will abort and not propagate the bad stuff. If listing a directory suddenly just returns half of the files Syncthing can’t conclude that it’s an error and will propagate those as deletes. You may want versioning and backups on other devices.

1 Like

Thanks! I’ve been using “unison” until now, and when an SD card failed, it did so in a way that was not seen by the OS. I just noticed that it was behaving erratically and reporting file differences that I couldn’t explain.

It sounds to me like syncthing on a raspberry pi (or other SD-card-based storage) is a bad idea for this reason. Curious to know what others think.

Has anyone got experience of what happened when an SD card failed? Does anyone know if SSD failures would be handled better (my hunch is that they would, since the firmware would detect the failure and report it better to the OS).

Unfortunately most legacy file systems have the mentality that they trust the underlying physical storage. If you could run something like zfs that explicitly distrusts the storage hardware you’d be fine, I expect. I run freebsd VMs on zfs with 512 megs of ram so it’s probably not impossible.