Folder Rescan And Hdd Lifetime


Recommended Posts

The folders I sync are on an external hdd and I worry about its lifetime.

 

I know the folder rescan setting. Per default it is set to 600s=10min. That seems rather short.

 

How does the folder rescan work ? Does it really spin up the disk every ten minutes ? Do I have to worry about hdd lifetimes with the default rescan interval ? What values are you using ?

 

If I set the rescan interval to some absurdly high value, like a day, is there a disadvantage ? The hdd is connected to the server which means that I'm never going to add or edit data on this hdd. The new information is synced onto the server by mobile devices and the notebook.

But even if I would edit the folders directly on the server, isn't there a notification service which can alert sync about filesystem changes ? There is inotify for example. But I don't know how that works, maybe it's based on rescans, too.

Link to post
Share on other sites

How does the folder rescan work ? Does it really spin up the disk every ten minutes ?

You'll find the answer in this Help Center article.

 

If I set the rescan interval to some absurdly high value, like a day, is there a disadvantage ?

If you're going to do that, why not just set it to zero and disable it completely, as outlined in the aforementioned Help Center article.

Link to post
Share on other sites

Thanks.

 

I had found the menu entry, but thought that the rescan interval was just like a safety net. Sync would rely on a service like inotify and to make sure that all changes are detected, rescan the folder itself eventually.

 

Ok, then I know what to do.

Link to post
Share on other sites

@mintwurm

 

Sync relies on 2 ways to detect changes:

1) notifications from OS

2) folder rescan.

 

Notifications from OS is not very reliable way: all OSes has their own edge cases when notification does not come. Therefore Sync is backed up with rescan.

 

Rescan was done as lightweight as it is possible: it only goes over folders and files structure, reading mtime and size. If either has changed, Sync is going to re-hash the file and verify if the content changed, and if yes - which part.

 

So, having the above, Sync with very-long-rescan interval may sometimes miss file updates, though will eagerly allow HDD to sleep (couple more tweaks - disabling logs - required).

Link to post
Share on other sites

My folder rescan is set to a day. (86400 seconds) on my nas and have the logs disabled. lets my drives sleep really well. also have my tracker / relay rescan set to 5 minutes (300 seconds) I've found this option doesn't wake my drives.

with these settings I've honestly never had an issue with syncs, they're almost instantaneous wherever I am, I can be using my laptop on a wireless network 200 miles from home and sync still picks up peers at home and syncs changes almost immediately with my home nas,

perhaps it's something to do with using trackers and relay server options but neither of these interfere with my drives sleeping. so you shouldn't have any issues at all with a high rescan.

did not know you could set it to 0 though. might try that at somepoint.

Link to post
Share on other sites

I've set folder-rescan to zero and added a debug.txt file with 0000 in my storage folder (to disable debug logs).

In the help article it is also advised to set config refresh and config save intervals very high. But I figured that since the configuration is in the .sync folder on the sd card it shouldn't spin up the drives when accessed. I'm using an rpi with an external HDD.

Unfortunately that doesn't work.

Could that be related to the config files, or do I have to look elsewhere ?

Link to post
Share on other sites

running anything else?

my nas runs a minidlna server which sometimes spins up the drives whenever any dlna device connected to my network is turned on, they will spin down again if not accessed though,

I have config save set at 86400 seconds, and rescan tracker and relay set to 300 seconds, my drives sleep normally with these options.

if I'm correct I believe "config refresh" is the same as "rescan tracker and relay" depends which sync you're running. (2.2.1 myself) and thus I don't believe config refresh should keep your drives awake. the save might though. although if it is to sd card I can't see why it would wake the drives. worth trying it to see? if 0 doesn't work try 86400 (24hours)

at one point I discovered a cause for my drives being awake was that my nas was mapped as a network drive on my pcs, so windows always connected to it. removed the mapping and solved the issue.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.