Where did Syncthing put my data?

I have just copied 161GiB of data from a server to a dataset on TrueNAS, using Syncthing.

Or, at least, that’s what I thought I was doing; I can’t find the data, it’s not in the target dataset.

I did think it was odd that no new data seemed to be showing up, either in the target dataset or anywhere else, during the copy.

But the overall size of the pool has gone up. So it’s put it somewhere.

I’ve looked for it via the shell, and via midnight commander, but I can’t find it anywhere, so far.

I can’t see anything wrong with the definition of the Syncthing folders; both ‘ends’ definitely exist, and I could see file and folder counts, and sync % changing, as Syncthing did its thing.

So where is it? Or how can I find it, so that I can either move it to where it’s supposed to be, or delete it?

TIA

(TrueNAS 25.10.2.1)

The first thing comes to my mind is that the data has been put somewhere in in the Syncthing default docker volume. If the pool is the same where you use the app that can also explain why your pool has grow in data used terms

I’ve had a look around, and I can’t find anything within the /.ix-apps/docker hierarchy that looks likely; nothing with today’s date or likely size.

When you sai you have looked, have you already tried a simple zfs list -r *YourPool for a volume approx of 160gb?
Or another way, have you tried to find a specific file just to grab the path? find /mnt/*YourPool -name "*YourFile"?
Other than that, i’m really out of idea :smile:

No, I hadn’t (though I’d done a ‘df -h’ which appears to produce the same result as the zfs list).

I’ve just tried both those things:

  • The zfs list (like the df -h) shows three locations with a size big enough to potentially hold my 161GiB, but when I look in those locations I can’t see anything that corresponds (name, today’s date, size).
  • Doing a file search doesn’t produce any result.

I also had a look in the Syncthing logs, but there’s nothing there to suggest any problem.

It seems bizarre that it’s possible for this sort of thing to happen. If this stuff is hidden, it’s hidden very well. Grasping here, but: perhaps it’s not really there, but some ‘referencing’ (a database somewhere?) has nevertheless been changed/created to show that it exists (i.e. the pool being larger).

When you installed Syncthing what did you use for the Host Path during the installation for the storage path? What did you use for the Host Path for the configuration?

If you used the default the data may be at or somwhere similar
/mnt/[PoolName]/ix-applications/releases/syncthing/volumes/
or could possibly be at /var/syncthing/Sync inside the container. Both of those would be more or less hidden from normal view.

I found a file (several), by searching /mnt, rather than /mnt/RAIDZ1.

The stuff has gone into:

/mnt/.ix-apps/docker/overlay2/[very-long-alphanumeric-gibberish-name]/diff/mnt/RAIDZ1/[target-destination-folder]

So, it’s somehow failed to put the data where it should, and put it in a same-named structure under …./diff/…

I had looked there (…/overlay2) before, but the folder dates are incorrect until I get down to the /RAIDZ1 folder, which does have today’s date. There are other folders alongside [target-destination-folder], perhaps from previous failed Syncthing operations.

Edit(1): these other folders don’t actually have any files in them, which I guess may be because the Syncthing operations succeeded. The [target destination folder] does have all of the files that were supposed to go elsewhere.

Edit(2): I can also find the same structure alongside /diff, in /merged.

So, the next question is: what can I do about it? How do I get rid of it, in a ‘proper’ way that TrueNAS would ‘notice’? (rather than, say, just deleting it via the shell).

When you installed Syncthing what did you use for the Host Path during the installation for the storage path? What did you use for the Host Path for the configuration?
These need to be set to a dataset on the desired Pool. Don’t let Truenas and the app decide for you. If you wish others access, then you will also need to set smb or some other access protocol to the dataset.
Once these are set properly and tested, you can either move or upload the data to the correct place.

2 Likes

I don’t have anything like this under the pool name; the nearest I have is /mnt/.ix-apps/docker/volumes, but there’s nothing apparently relevant to Syncthing in that folder.

There are lots of [alphanumeric-gibberish-name] folders under /mnt/.ix-apss/docker/containers, but none appear to contain anything relevant to Syncthing operations.

Will look into this…

Edit(1): For each folder that I wish Syncthing to reference, I have created a host path of the form /mnt/RAIDZ1/[target-destination-folder].

I realise, now, that I forgot to do that on this occasion, for this new destination dataset!

This isn’t the first time that I’ve been caught out by this; I created the dataset and SMB share, then created the folder to share, in Syncthing, but didn’t create the host path in additional storage, in the Syncthing configuration.

So, thank you!

(but, still wondering what to do with the ‘lost’ 161GiB; maybe it will automatically get moved to the correct place, when I define that place…).

Edit(2): Now, after adding the host path, and Syncthing restarting, it gives me: !Notice “Failed initial scan (error=“folder marker missing (this indicates potential data loss, search docs/forum to get information about how to proceed)”. WTF couldn’t it do this before? Why would it just go ahead and stick the data somewhere else, without flagging a problem immediately?

The data, though, exists (or is referenced?) in two (wrong) places. And, how will TrueNAS ‘know’, if I simply move the data from (one of) the two places? (or, if I delete it, from both?).

Edit(1): perhaps, if I delete and redefine the target folder, Syncthing will fix it… Edit(2): Done that. Syncthing has just started to work its way through it again. I guess that, when it’s finished, then I can just delete the wrongly-placed data, if it’s still there.

Edit(3): As Syncthing works through syncing the folder, the size of the pool is decreasing - which seems to suggest it’s taking care of the 'wrongly placed’ data. But the ‘source’ server’s Syncthing is also showing activity.