Rescan single folder / set syncthing-inotify -delay-scan to infinity?

I’ve been trying to understand the behaviour of inotify in relation to blocking unmounting a filesystem. I need to kill inotify to unmount my external HDD.

This is a more general question:

  1. Is there a way of telling syncthing directly to only rescan a particular folder?
  2. Is there a way of telling inotify to tell syncthing to trigger a scan on a folder?

I may be seeing it incorrectly, but ideally, wouldn’t one of these methods exist so we can:

syncthing-inotify -delay-scan 999999999999

BTW, what is the current maxium allowed value for -delay-scan?

Click rescan on the folder in the question.

I’m not sure the indirection would make sense, as -inotify doesn’t have a GUI etc.

It’s an integer of seconds, so 231-1 or 263-1 depending on platform, both of which should be sufficient for the foreseeable future. :slight_smile:

I don’t think any of this has anything to do with unmounting filesystems. Watching a file/directory (like -inotify does) means having an open file descriptor on it, which prevents unmounting it.

When this gets integrated into Syncthing I expect the proper action is to pause the folder in Syncthing to be able to unmount it. Or, to not run inotify on removable disks.

1 Like

Sorry, I wasn’t clear: Is there a way from the command line of telling syncthing directly to only rescan a particular folder?

You can use the rest API that inotify uses. I suggest you refer to the docs.

1 Like

I’ve found:

There’s stuff about devices, but I can’t find anything there about pausing/resuming a folder

You wanted to rescan, no?

1 Like

Doh! *polishes eyeballs*

That’s perfect, thanks Jakob.

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