Syncthing prevents idle spindown of disks on NAS


I’ve setup Syncthing to run on my ZyXEL NSA325 NAS via a third party addon (running 0.14.8, but upgraded to 0.14.9 today). I’ve also setup Syncthing on a Rpi2 with a 2.5" disk attached. The idea is to sync several folders from NAS to Rpi2 at ‘weekly intervals’.

The Rpi2 will be placed at another geographical site and function as a ‘backup location’. I know Syncthing is probably not the ideal backup solution, but having an offsite backup of data syncing over the internet though NAT routers with little effort is better than no backup at all. To prevent all to frequent updates and sync behaviour, I’ve set the scan interval of each sync folder to 604800 seconds. This should rescan all folders about once a week. At this moment, this setup is running in my own LAN @ home te see if the concept works.

The rescan interval seems to work just fine; I can tell from the webGUI that the last scan interval on separate folders is several days ago. Syncing between NAS and Rpi2 also works as expected.

The problem is that my NAS should do a disk spindown after 70min of inactivity, to limit energy consumption. With Syncthing running, my NAS doesn’t do a spindown of disks anymore. This is however only the case, when the Rpi2 is also running in the LAN. When I shutdown the Rpi2, my NAS will do a spindown of disks after 70min of inactivity. (i.e. after the last folder scan in Syncthing has finished).

Somehow, when both devices are running, they seem to keep each other ‘busy’ even when the scan interval is set to 604800 seconds (is there a max value here anyway?). In any case, it seems te generate disk I/O on the NAS, as it doesn’t preform the spindown. I assume this has something to do with logfile updates; I can see that the file ‘lastlog’ get’s updated every 10 minutes or so. I’m fairly familiar with troubleshooting Windows and network setups; but I’m a complete Linux n00b. So troubleshooting this is quite daunting.

Does anyone have the same problem and is there a solution to this?

They periodically track “last seen” value which is recorded in the database. You could try and move syncthings database on a media that does not involve your disks.

This doesn’t directly answer your question, but you may find hd-idle useful.

I use it on a rpi under Raspbian. It lets me spin down the disk after a configurable idle time.

It states that it runs on some NASs. You may wish to try it if you think 70 mins is too long.

Thanks for the quick replies! I’ve thought about moving database / logfiles to a ‘permanently mounted’ usb-stick, but I’m unsure on howto perform the move. Is there some config file I should modify? Any tips on that?

About hd-idle: I suspect my NAS already implements something like that to perform the spindown. I could add this functionality via another third party app though, but I think that won’t help much when there’s some process that keeps writing to disk every 10mins or so. I’m planning on implementing it on the Rpi2. Thanks for the tip!

You just copy syncthings home directory to the new location and symlink it to the old place. Check syncthing -paths and -help

OK, that makes sense. I’ll try and see if I can get that to work. I’ll report back when I’ve found the time and heart to give it a try :wink: Thanks!

Subscribing to the topic since I just installed Syncthing and have the same issue (on a ReadyNAS). Just one thought: Maybe it’s feasible to create, mount and run Syncthing off a ramdisk instead of an external USB stick. I guess that would make the system more reliable…

I might give it a try one of those days; just not sure if/how auto-upgrade would work in such a case.

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