how to move the index folder on a readynas 4 device?

I recently setup syncthing on my old readynas 4 ultra to sync to a freenas 11 device. there is a bit over 7tb on the readynas and everything was going good for a couple of days but then it stopped syncing. after some research it looks like the built in storage of the readynas has been filled by the index folder.

How do I move this folder off the built in storage and on to the raid array of the ReadyNas?

dont know if it helps but I took some screenshots

You can use the -home parameter to set the configuration directory.

This will move the index folder which is in c/etc/syncthing/index-v0.14.1.db? the home folder is currently in c/home/admin/sync but is only taking up 204kb.

You have a lot of panic logs. What does it say in one of the recent, non-empty ones?

currently i am getting alot of errors on too many open files. I did change the home directory and % free space in the config.xml. I also moved about 668mb of ldbs out of the index directory.

as soon as i moved the files off the “too many open files” errors started. additionally it doesnt look like the index directory moved.

what lines are you looking for in the panic logs? most of them contain specific information about files and the devices that i would rather not publish.

panic logs from a day or so ago showed out of space errors which is consistent with what i am seeing.

“too many open files” or “out of space” from the database layer will both panic, so that’s probably it. You probably need to convince your NAS to give Syncthing more file descriptors; ulimit -n in the shell, if you have shell access and can tweak whatever is starting Syncthing.

it was working fine when i first set it up. the too many open files errors only started after i set the home drive different.

Nonetheless it’s not a factor of where the files live. It will be a factor of the limit imposed by the OS, which I guess might be lower than standard on the NAS, how much data is in the database (where most of the open files are), and what Syncthing’s doing.

theres a bit over 7tb of data to sync. 3tb has synced so far before the nas onboard storage filled up. 2.83gb of ldb files left in the index folder.

also getting an error saying to increase the inotify limit. I ran the command suggested “echo “fs.inotify.max_user_watches=204800” | sudo tee -a /etc/sysctl.conf” but it doesnt seem to of made a difference.

You need to restart the system for that to take effect.

done several times.

Then that number is not high enough, yet I’d check with sysctl -a if it’s applied correctly.

it appears to be.

Try setting it higher then.

it still doesnt make sense that all this stuff would be working fine before the onboard storage ran out of space but doesnt now.

I have no idea, if that’s the only error and you have many directories and files, perhaps just disable change watching and resort to periodic scans. Are you sure filecount etc is simillar as it was before in all the directories?

yes. its set to only sync 1 way.nothing from the readynas has been deleted. before i moved the home directory and deleted some ldb files there was only the out of space error. now that has been remedied but replaced with the too many connections and inotify limit error.

Perhaps your ulimit is set too low, you can google how to adjust that. The fact that it ran out of space doesn’t mean it worked ok, perhaps it was just the first problem.

moved the home directory back to default and deleted all but todays lbd. ulimit ad inotify errors are gone but now im getting

“panic: This file must exist in the db panic: runtime error: invalid memory address or nil pointer dereference”

after a minute or so of syncthing being up and then it crashes.