all synced files prepended with .syncthing.

After searcing I have only found one post with my issue and it pointed to a non existant artical as an aswer.

I have a decent size file server (40TB used) and I want a local copy at my house. both servers are truenas ElectricEel-24.10.2 with syncthing 1.1.12.

I have them both in the same rack and connected with 100gbE. I setup the shared folder and begain the sync. howevere all the files on the new server have .syncthing. infront of the name and are hidden. it shows 10TB transfered so far but 0% complete.

Is this normal for an initial sync?

See Understanding Synchronization — Syncthing documentation — this is normal while the file is being synced, after the file is fully synced it should revert to the correct filename.

this is what I am saying. there are 10TB of files downloaded and every one still has .syncthing. prepended to them and both sideds say 0 file and 0 folders synced. but were is the 10tb of data? is it leteraly gonna do 99.9% of every file befor it says its done? I guess this just seems like a strange behavior. It does apear that a ton of the files are done but never got the filename chaged.

Two possibilities come to my mind: It’s taking a long time to hash the temporary files after they’ve been transferred, and patience will solve the issue. If you’re seeing non-temporary files starting to appear, chances are that the issue will solve itself.

The other possibility is that something isn’t working right. Is there anything in the log that offers a clue? If not, please consider using the “sync”, “fs”, and “scanner” debug facilities — I would definitely do those one at a time.

I am ok with being patience but it takes more than a day to transfer all this data and I dont want to do it 20 times while trying random things.

I would suggest testing with a much smaller folder first. This way, you will know whether synchronisation actually works or not.

I wonder if syncthing is having trouble renaming the files on the destination file system or if there’s some other reason why the file transfer can’t complete so everything still shows in progress.

1 Like

This sounds a bit like ST fills preseeded device with tmp files, probably when copy_file_range is set. ¡ Issue #9856 ¡ syncthing/syncthing ¡ GitHub to me?

Not preseeded. I built a brand new ElectricEel-24.10.2, made a pool, added syncthing and connected it. looked like all was good but everything is a temp and it still showes 0%. 27tb in now with no real files. the odd thingis the stats say no folders have synced but they are all there and not hidden other than the ones that should be. Hoping to see it fully synced in the next 24 hours and then we will see what it does.

1 Like

I have gone through all the permissions I can find. Apps user has full control over the dataset. I looked in the log but there are no errors. Is there a more verbose log I should be looking at? It really feels like it has read/write permissions but not modify.

another issue is now its really slow and bursty. it will sit idle for 2 minutes then transfer 2-4 files at 4bps then go back idle. These are not slow machines. 4x 12cor Xeons with 768GB ram

I used bulk renamer to drop the .syncthing. and .tmp tags and all the data is definitely there. syncthing even sees that it has completed all those files now.

I am almost at the point were I am going to blow this away and start over. Its been days and I still don’t have a backup.

Hello @Guentha ,

Hmmm… I think you should heed the piece of advice below. It will make it much quicker and easier to see if the sync works as it should, and to sort out any problems.

You wrote:

Be aware that you will get a synchronized/redundant copy. Not a backup. The difference is important. A synchronized copy is worthless for example when you are hit by ransomware.

I have tried a smaller folder. same issue. I have checked all the permissions. I tried running the container as root but it fails in a boot loop. It runs as user “APPs” and has full control of the dataset. the same user runs my ftp, file browser, and plex and has no issues with permissions.

I understand it’s not a “Backup” we take nightly backups but full restores take days. This copy will live at my house for quick local access and serve as a quick recovery in case of a hardware or array failure.

What I really need is a way to dig deeper. I am new to syncthing and its not throwing any errors so I don’t know where to look.

Good that you have tested using a small folder! Please continue doing ONLY that, to decrease the risk of problems because of running out of resources like ram, CPU etc. Once the small folder works properly, you are ready to move on to the big folder.

This is the first time you mentioned that you are running Syncthing in a container. Good to know!

Regarding the use of the word “backup”: I understand. The reason why I brought up this subject is that it would be sad if diaster struck and someone actually thought they had a backup, when all they had was a synchronized/redundant copy.

I will let others try to help you with the other stuff, as I have never used Syncthing in a container. Good luck!

There are detailed log options you can enable in the second tab in the logging UI. I don’t know where you may find the error but probably enabling kne of those logs will indicate the problem.

In Syncthing’s native web UI, under Actions → Logs → Debugging Facilities, is a long list of options.

You haven’t shared a screenshot yet of what’s shown in the “Out of Sync Items” pop-up panel, but I suspect that it and/or the extra debugging options will say it’s a permissions issue.

I recommend logging into the Syncthing container and trying to manually read/write a text file in the volume mount point as the user Syncthing is running under (a simple test that’ll reveal a lot). From there, work your way out of the container, tracing back each stage of file access.

35.3TB means Syncthing will be doing a SHA256 hash on anywhere from 2 to 275 million chunks of data – that’s a lot of hashing and system I/O even with beefy hardware. You’ll likely have to try out Syncthing’s tuning options in order to make best use of your rig.

making progress. I have now built 4 total machine in an attempt to track down this issue. 3 give no errors and one now throws a “chmod ‘operation not permitted’” with the path and filename of all transferred files.

even with extended logs on, none of the other machine ever have errors.

I now have a workaround but I am still looking for a real answer. for anyone who is reading and in the same situation and just needs a quick fix you can make your truenas dataset a SMB share. then mount it as local storage in the Truenas app settings instead of mapping the dataset directly. not sure if this has performance issues yet but at this point I am taking the little wins.

to make things easy I made a new users called syncthing and gave it full access to the dataset, then mapped my storage with the server being 127.0.0.1 and the path being the shared folder name. works like a charm.

all other apps run under user APP(568) and that is usually enough. Filebrowser can read write and modify files all day with no extra config. There may be something wrong with the implementation of syncthing in truenase. I am using syncthing stable from the discovery catalog and not enterprise or another charts.

There’s a performance hit, but how noticeable it’ll be depends a lot on if it’s a large number of small files versus a much small collection of large files.

The biggest impact is that file watching won’t work because change notifications generally don’t traverse network filesystems, so Syncthing will have to rely on its rescan interval to detect changes.

Good to know. I am still working on this but for once it is acting as I expected. I hve a full sync and with my rescan set at 10 minutes on my main sefver and 30 on the remaote its all good. I am the only one making chages between the 2 and it takes ten minutes to drive from my office to home so everthing should always be synced in that time. I would like it to work right as its fasterat chages and less resouce intencive but for now brute force is working.

I am in the process of building yet another machine to test with but having weid drive failuer iissues so its slowing me down. nothing to do with syncthing, either a truenas issue or cabling. once its done I will bring both machiones home and I can play in the confort of my home instead of driving back and forth to my office.

OMG OMG OMG. It’s solved. After weeks of fighting this, watching tutorial after tutorial, scowering the forums, not one person mentions a crucial setting. The tutorial from Lawrence Systems, however, did mention that he sets his datasets in TrueNAS as “apps” and not “SMB shares”. This got me to go through all the setting differences between the two. There is one setting. “ACL MODE”. in SMB share it is set to restricted and in apps it is set as passthough. Making this change immediately let Syncthing correctly write and rename files.

For others on truenas trying to get this to work. go to your dataset and select edit, open advanced properties, and find ACL mode. chage this to passthough and you are golden.

2 Likes