Insufficient free space error

I was going to synchronize folders that both contain the same big file (~20 GiB). It was copied with an error so the source copy differs from the destination copy (1 byte or so). There is a little free space on the drive the destination folder resides on (less than this big file’s size). I got “Insufficient free space error”. WTF? If Syncthing uses torrent protocol doesn’t it wotk with files as other torrent client do? I was expected that it will copy just one file block, 4 MiB or so, in my case. Am I wrong?

If there are two versions of the file under the same name, that counts as a conflict. Syncthing will create both versions of the file on both devices (one version with a name containing “sync-conflict”), and let you choose which one is correct. Obviously it can’t so this if there isn’t enough space.

Syncthing is not like a torrent client. With a torrent there is an obvious correct version of the file, and everyone copies it. With Syncthing all devices are equals, so there’s no “correct” version of the file.

Um, I supposed Master Folder means “correct”.

Is there a way to cheat around it? FAQ defines a conflict as “When a file has been modified on two devices simultaneously”, which means that if a file is modified only on one device there’s no conflict and the old version on another device will be overwritten (hopefully partially?). So how to mark “incorrect” file as “old”?

A master folder is one that won’t accept changes from other devices. There’s an “override changes” button if any of the other devices do differ.

In your case, as far as syncthing is concerned there are no modifications: two different files appeared at the same location on two devices at the same time. Not sure what the best approach is for you: perhaps @AudriusButkevicius or @calmh had an idea?

two different files appeared at the same location on two devices at the same time

How does Syncthing track this? For example, we have to sync a folder on 2 devices. One folder is empty, another has a file. After sync, both folders has the same file. If it will be changed on one device then the change will be propagate to the another one - no conflict, right?

That’s correct, yes. Syncthing keeps a database of all of your files, and the hash of each. It can tell a modified file apart from a new file.

We don’t do in-place updates (as that is not atomic), so even to replace 1 byte, we will create a second file of the same size to produce the correct end result and then swap it, which is essentially your issue. Sadly, this is by design.

I suggest you run rsync or some other alternative for this, as we need to have atleast ‘your biggest file’ of space to work correctly.

1 Like