Master remains out of sync despite override

I know I am bumping an old thread, but this issue still exists, because I am still dealing with it. Here is a real live example:

Master Folder (FreeBSD)

ls -lah: -rwxrwxr-x 1 syncthing wheel 701M 13 Sep 14:01 .../DAT/SOME_INFO_2OF2_/SOME_INFO_2OF2_.wav

ls -la: -rwxrwxr-x 1 syncthing wheel 734816588 13 Sep 14:01 .../DAT/SOME_INFO_2OF2_/SOME_INFO_2OF2_.wav

sha1: dcbceffc399f13244e546e4f988459d08654321a

Remote Folder (Synology NAS)

ls -lah -rwxrwxr-x 1 someuser users 700.8M Sep 13 14:01 .../DAT/SOME_INFO_2OF2_/SOME_INFO_2OF2_.wav

ls -la: -rwxrwxr-x 1 someuser users 734816588 Sep 13 14:01 .../DAT/SOME_INFO_2OF2_/SOME_INFO_2OF2_.wav

sha1: dcbceffc399f13244e546e4f988459d08654321a

So from the above, we see that the files have the same date, and the same size, and the same SHA1 hash. So, they are the same, but the file in the master folder shows as Out Of Sync. If I click Override Changes, then it will scan, then say it is syncing for a while (but there will be no traffic) and then it will go back to Out Of Sync again.

I guess the main question is: how to remedy this?

Second, where would one look in the source code to find the logic that is determining if a file is out of sync?

Note: I have checked to ignore permissions.

Does the Synology box use the FAT32 filesystem maybe?

“Out of Sync” means something differs. In the code, this means the version vector has changed on the Synology box, i.e. it has announced an update to the file with something being different than what the master side wants. The things we look at that could differ are

  • The modification time stamp
  • The permissions (unless permissions are disabled like in your setup)
  • The type (file vs dir etc)
  • The contents, obviously

I suspect that the time stamp is the problem. FAT32 stores time stamps with a two second resolution only. If the timestamp of the file on the master has an odd number of seconds, the following chain of events would happen:

  • Master says timestamp should be 12:34:55, override!
  • Synology updates timestamp to 12:34:55 (filesystem actually stores 12:34:54)
  • Synology scans, notices timestamp has changed from the expected value, rehashes and sends out an update.
  • Master goes out of sync
  • Repeat

Check with ls -lT to confirm?

We may need something similar to rsync’s --modify-window;

--modify-window
      When  comparing  two  timestamps, rsync treats the timestamps as
      being equal if they differ by no  more  than  the  modify-window
      value.   This  is  normally  0 (for an exact match), but you may
      find it useful to set this to a larger value in some situations.
      In  particular,  when  transferring to or from an MS Windows FAT
      filesystem (which represents times with a 2-second  resolution),
      --modify-window=1 is useful (allowing times to differ by up to 1
      second).

I moved this to a new topic as the topic this came from ends on a rather confused note that has nothing to do with what’s going on here as far as I can tell.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.