I created a sync pair, one on my PC that only sends, and another on my RPi that only receives, with the idea that I’ll be able to move and remove files from my PC, and it will replicate on my RPi, which actually hosts that folder on a Plex server.
My problem is that since last week, I first noted that from my PC, it would never complete the blue sync messages in the “Other devices” section, which after searching, found that could be solved by opening Syncthing in my RPi, and click on a red button that appeared to “Undo local changes”, but ever since, any time I want to sync a new file in the folder, the RPi folder goes into a blue message saying “Analyzing()”, process that might last over 30 min, and it’s only after it completes that receives the files from my PC, and also shows again the Red button, process that I dislike since I don’t want to wait that much just to pass one file.
Also, from the PC side it shows that it needs to send over 60 GB, which is false since the folder should be updated, which I guess has something to do with the fact that the red button keeps appearing. Now, this issue has worsened even more, since now the RPi, upon completing the analisis, starts all over again! I’m pretty sure that I don’t want a 30 min process doing constant readings to my External HDD happening oftenly. Is there a way to fix this behavior where apparently “Detected”(I say it this way, because apparently is that when I remove a file from my PC, and syncthing deletes from my RPi, it causes to be detected as a local change) changes in the RPi are causing that Red button to appear? I just want the folder to be a 1:1 with the PC one, I don’t even modify the files from the RPi. I’ve already turned off the “Monitor changes” from the advanced in the RPi, but hasn’t done anything.
Sorry, but other than knowing that you’ve got a PC, a Raspberry Pi, and possibly a USB HDD, there’s not enough technical details to diagnose anything other than something on your RPi is definitely changing and/or adding stuff to the sync folder.
At the bare minimum…
What OS is on the PC?
What OS is on the RPi?
What filesystem is on the HDD?
How is Syncthing configured on the PC and RPi beyond the folder sync mode? (e.g. syncing permissions?)
What type of files are being synced from the PC to the RPi for Plex?
Is Plex configured to optimize any of the media its receiving from your PC?
Hi, sorry, I wasn’t sure what info was needed, since I’m not sure either what might be wrong, here is what you asked:
PC OS: Windows.
RPi: Raspberry Pi OS.
IIRC, NTFS.
I’m not sure how to answer this, when I created the folders I did not modify anything from the defaults, aside from the folder path, and the mode. If it serves of something, I followed this guide for it.
Videos.
No.
On it’s own folder, at a different path in the HDD.
Maybe this could be related to the root cause, but when I originally created the sync pair, I did not set the Pi one as only receive, but send and receive, after it first appeared the red button, when I first deleted a file from the PC, I changed it to only receive, and after the problem started to get worse, I deleted the sync pair(Kept the folders in the HDD), and then created the sync pair again, but is still happening.
Definitely keep Syncthing’s “Ignore Permissions” setting enabled and leave “Sync Ownership” and “Send Ownership” disabled.
Easiest and quickest way to confirm is with the following command:
df -hT
The USB HDD is most likely at device /dev/sda1, but either way it’ll be easy to find in the output due to its storage capacity.
It’s sometimes necessary to increase the slack for timestamp accuracy. Setting modTimeWindowS to 2 seconds is usually enough. Timestamp inaccuracy can cause the file/directory metadata between your PC and your RPi to look like something has changed even though it actually hasn’t.
Unless there’s a great reason not to, it’s better to reformat the drive with an ext4 filesystem because there’s a lot of overhead with NTFS on Linux (chances are the ntfs-3g module is being used). You also won’t have the timestamp accuracy issue.
That Pi My Life Up guide is very well done. Syncthing auto-adjustss some settings based on the host and peer devices, so it’s worth reviewing the settings even if they haven’t been manually changed to make sure that they are a good fit for your particular environment.
Plex collects a lot of small files (e.g. media posters, images of actors, subtitles, etc.), which doesn’t work as well on NTFS for various reasons, so switching to a more suitable filesystem will reduce the system load on your RPi and improve overall performance.
There have been recent reports of things being out of sync when they aren’t, but repeatedly syncing a Syncthing folder and the “red button” warning of local changes on the RPi almost always means there are local changes detected that may not be immediately obvious.
Have you checked Syncthing’s log under Actions → Logs? There are also lots of additional debugging options for a deeper dive into what changes were detected.
Hi, only thing I did was enable the “Ignore permissions”, the other 2 were disabled already, and for the moment no new analisis has happened in the RPi, will have to test a little more with file removal, but looks like this has worked for the moment since now both appear as Up to Date. Thank you very much!