How to resolve " folder marker missing" error

Hi,

I have a syncthing network with multiple clients, they’re all Linux based systems, one being the “server” and the other clients should keep their files in sync. I now realized that one of the clients dosen’t seem to download a particular directory that is present on the “server” and I pulled up it’s admin page on localhost:8384 to see thatr it “stopped” with: Error folder marker missing (this indicates potential data lo… how can I tell it to re-sync it’s sdtuff with the server (there should be local changes that need to be uploaded as well as remote changes that should be downloaded) how can I proceed?

Hi,

this error indicates, that syncthing can’t find a folder named “.stfolder” at the root of the shared folder.

If the folder is not there, chances are that something potentially bad has happened, e.g. a filesystem has not been mounted, which would cause all peers’ data to be removed.

So I think your first step should be to find out why that folder has disappeared.

My guess would be that you deleted it unknowingly, but of course there are other possibilities, like a hard shutdown or hardware failure.

On Linux, folders with a “.” at the beginning are hidden, so when looking for it, make sure you can see hidden files and folders (CTRL+H toggles this on my filesystem browser)

To resync with the peers, I’d suggest to remove the folder from syncthing on the affected peer, deleting any content of that folder on the filesystem and then readding it. If you are syncing hundreds of GB, there may be “faster” ways, but they are more complicated.

1 Like

Hi Arneko,

Could it have something to do with me having the directory mounted as a btrfs subvolume? For the size, it’s about 75GB in size.

I created the said subvolume rather recently. For subvol creation, i first renamed my syncthing dir to ~/dir~/, created the subvol at ~/dir and then rsynced all changes from ~/dir~/* to ~/dir/ and I think this is when the issue could have first appeared, possible?

I rsynced all contents from server:/dir/ to ~/dir/ and from ~/dir to server@:/dir/ and after this, my problem seems to be resolved! Yay!

The file got removed most certainly while using rsync - rsync does not copy hidden files under all circumstances (I wasn’t aware of this behavior either, but see here: https://www.baeldung.com/linux/rsync-and-hidden-files)

I am glad that the error is resolved, but the steps you mention here shouldn’t have fixed that, so either you followed my suggestion above in one way or the other, or you created said folder “.stfolder” manually, which would also work.

Nope, I did only do rsync which I ran like: rsync -avz SRC DST (the -a may take care of it, wouldn’t it?)

If you append the asterisk, then rsync will never get to see the hidden .stfolder file, even though you use “-a”, as explained in the link I provided.

So I kind of assume now that ~/dir was a syncthing share as well, which had a .stfolder , and since you did not use the asterisk this time:

This has fixed your problem.

I just comment on this, because if someone stumbles across your “solution” one should not repeat your steps, as they obviously just fixed the issue by accident.

1 Like