Data integrity on untrusted devices.

I have read some wiki pages and forum posts about it but I still don’t understand how it works on my setup:

I have multiple “Clients” (PCs, Phones…) and a single Pi with an SD card.

All my Clients mainly connect to the PI and only a couple also share dirs with each other.

I have set my PI everywhere as an untrusted device, BC I don’t have disk encryption on it. But it still is my “main interconnect and single point of truth” between my devices.

Now to data integrity. I usually use Btrfs with BTRBK on my PCs so I do have some insurance.

But I don’t understand what would happen if a file gets corrupted on my PI and a Client requests it. I worry that it will override the good copy without me noticing and possible even evade my FS Snapshots.

I can’t request any SMART data from the PI and also currently have no money for an SSD that I could use instead with the PI (of course a COW system on it).

Data stored on a device is encrypted, and as part of that encryption it is also validated and hashed. That means that should it become corrupted in any way it will fail to decrypt and can’t be used by other devices. This gives you a level of integrity checking above and beyond the usual, as it’s impossible for data to be modified on the untrusted device and still be accepted by any other device.

4 Likes

thanks takes away all my worries :slight_smile:

I think it would be usefull to add this info the wiki page (if I didn’'t miss it) https://docs.syncthing.net/users/untrusted.html