I have lots of out-of-sync items shown for transfer to a peer, but none are progressing and the count remains the same.
Device A (macOS / ExFAT):
Device B (Raspberry Pi / Linux / NTFS):
This situation arised after having file permission trouble with the badly-maintained ntfs3 filesystem on Linux where it wouldn’t respect user/group/chmod flags and Syncthing failed to sync a few files (but not all). Therefore, I changed my disk mount back to ntfs-3g where permissions are much easier to handle.
I saved the state of one affected file with curl --fail-with-body -s -X GET -H "X-API-Key: ${apikey}" "http://127.0.0.1:8384/rest/db/file?folder=xxx&file=foobar/whatever.jpg"
on each of the devices (a.json
and b.json
):
$ diff <(jq .local b.json) <(jq .global b.json) && echo "No difference"
No difference
$ diff <(jq .local a.json) <(jq .global a.json) && echo "No difference"
No difference
$ diff -U0 <(jq .global a.json) <(jq .global b.json) && echo "No difference"
--- /dev/fd/63 2024-02-13 12:13:31
+++ /dev/fd/62 2024-02-13 12:13:31
@@ -5 +5 @@
- "inodeChange": "2009-06-12T17:55:06+02:00",
+ "inodeChange": "2017-10-22T14:00:18.5667277+02:00",
@@ -9 +9 @@
- "modifiedBy": "MRMPTP5",
+ "modifiedBy": "5FH2SUZ",
@@ -12 +12 @@
- "noPermissions": true,
+ "noPermissions": false,
@@ -13,0 +14 @@
+ "permissions": "0770",
@@ -22 +23 @@
- "sequence": 1210,
+ "sequence": 69284,
@@ -26 +27 @@
- "MRMPTP5:1705429511"
+ "5FH2SUZ:1706256259"
$ diff -U0 <(jq .local a.json) <(jq .local b.json) && echo "No difference"
--- /dev/fd/63 2024-02-13 12:14:06
+++ /dev/fd/62 2024-02-13 12:14:06
@@ -5 +5 @@
- "inodeChange": "2009-06-12T17:55:06+02:00",
+ "inodeChange": "2017-10-22T14:00:18.5667277+02:00",
@@ -9 +9 @@
- "modifiedBy": "MRMPTP5",
+ "modifiedBy": "5FH2SUZ",
@@ -12 +12 @@
- "noPermissions": true,
+ "noPermissions": false,
@@ -13,0 +14 @@
+ "permissions": "0770",
@@ -22 +23 @@
- "sequence": 1210,
+ "sequence": 69284,
@@ -26 +27 @@
- "MRMPTP5:1705429511"
+ "5FH2SUZ:1706256259"
Restarting Syncthing didn’t help. Toggling “Ignore file permissions” to force a rescan didn’t help. Nothing in the logs.
touch
-ing an affected file makes its modification timestamp get actively synced and therefore reduces the total “out of sync” count by one. Not a great solution because I don’t want to rewrite each file’s timestamp. touch -a
(only access timestamp) does nothing – I guess Syncthing only cares about modification timestamp which is reasonable.
On the left-hand side (Folders widget), no file transfers are shown.
Is there a way to reconcile the database/state, since both local
and global
state is identical on each device? I couldn’t find a REST API endpoint to enforce that. FolderSummary
of the Events API seems to contain the out-of-sync items but I have no idea how to change that state. My idea is to bump the files’ sequence number in the Syncthing database, or fix the bug overall by having Syncthing mark files as synced once they’re identical.