Network drives: Monitor changes misses files created on different system after index.

Discussion related to "Everything" 1.5 Alpha.
Post Reply
wason92
Posts: 8
Joined: Tue May 10, 2022 1:35 pm

Network drives: Monitor changes misses files created on different system after index.

Post by wason92 »

On network shares
Files created in new folders on another machine, after an index aren't being "seen" by everything during monitoring.
Unless explorer is open to that folder.

Example.

 .
├── fileafterindexroot
├── dirafterindexfromclient
│ └── fileafterindexfromclient
├── dirafterindexroot
│ ├── fileafterindexnotroot
│ └── fileafterindexnotrootwithexploreropen
└── MadeBeforeScan
└── MadeBeforeScan

fileafterindexroot
A file at the root of a share, created on another machine, made after the drive is indexed.
Is seen by everything

dirafterindexroot
dirafterindexroot\fileafterindexnotroot
A folder created on another machine, and a file created in that folder
The file is not seen by everything

Video showing this here
https://streamable.com/1mky88


Is there any extra configuration that needs to be done to samba shares to help everything monitor changes?
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: Network drives: Monitor changes misses files created on different system after index.

Post by void »

Thank you for the bug report.

Could you please reproduce the issue with debug logging enabled:
  • In Everything 1.5, from the Tools menu, under the Debug submenu, click Start Debug Logging.
  • Reproduce the issue.
  • From the Tools menu, under the Debug submenu, click Stop Debug Logging.
    ---this will open your Everything Debug Log.txt in Notepad---
  • Could you please send this file to support@voidtools.com


Please ensure read_directory_changes is enabled (it's enabled by default):
  • In Everything, type in the following search and press ENTER:
    /read_directory_changes=1
  • If successful, read_directory_changes=1 is shown in the status bar for few seconds.


What hardware/OS is hosting your network share?
wason92
Posts: 8
Joined: Tue May 10, 2022 1:35 pm

Re: Network drives: Monitor changes misses files created on different system after index.

Post by wason92 »

Log sent

Host is running Debian on an intel NUC
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: Network drives: Monitor changes misses files created on different system after index.

Post by void »

Thank you for the log file.

Everything sees the following changes:
2022-05-18 09:31:32.311: RDC ADDED New_directory_made_after_scan
2022-05-18 09:31:40.368: RDC ADDED New_file_in_new_directory_made_after_scan_with_explorer_open
2022-05-18 09:31:40.369: RDC MODIFIED New_file_in_new_directory_made_after_scan_with_explorer_open

No other changes are detected.

This sounds like a limitation with the Debian Samba Server implementation.



Sorry, I don't have a good solution at this stage.

You may wish to update your folder indexes more frequently:
  • In Everything, from the Tools menu, click Options.
  • Click the Folders tab on the left.
  • Check Rescan every 1 hours.
  • Click OK.


Consider enabling the fast rescan option.
Only enable this if creating a file in a directory updates the date modified timestamp of the parent folder.



Another option is to add Each folder to your index and uncheck Index subfolders.
This might not be practical for complex folder structures.

For example:
Add the following to your Tools -> Options -> Folders with "Index subfolders" unchecked:
\\server\share
\\server\share\subfolder1
\\server\share\subfolder2
\\server\share\subfolder2\childfolder1




Try disabling ReadDirectoryChangesW:
  • In Everything, type in the following search and press ENTER:
    /read_directory_changes=0
  • If successful, read_directory_changes=0 is shown in the status bar for a few seconds.
  • Exit Everything (File -> Exit)
  • Restart Everything
Everything will now use ShellChangeNotify instead of ReadDirectoryChanges.
This may pickup more changes? but it's not likely.

To re-enable ReadDirectoryChangesW:
  • In Everything, type in the following search and press ENTER:
    /read_directory_changes=1
  • If successful, read_directory_changes=1 is shown in the status bar for a few seconds.
  • Exit Everything (File -> Exit)
  • Restart Everything


If you are indexing this server share with multiple clients, please consider running an Everything Server on one PC that indexes and updates the server shares frequently.
wason92
Posts: 8
Joined: Tue May 10, 2022 1:35 pm

Re: Network drives: Monitor changes misses files created on different system after index.

Post by wason92 »

So I've pinned down why this happens and there's nothing that can be done from everything, the widnows client or the samba server that can be done to change it.
The reason I thought it could be related to everything was that I used to alter files from a client rather than the host, which everything does catch.

I'll explain here incase anyone else comes across this issue.

say you have a network like this
X - Linux machine which hosts the samba share photos - root folder - /shares/photos
/shares/Photos/
/shares/Photos/Holidays
/shares/Photos/Birthdays

Y - Windows machine with the netowk share \\X\Photos indexed by everything

Z - Windows machine with the netowk share \\X\Photos

On Linux, the process responsible serving this share is smbd.
When Z makes a change to \\X\Photos, or any of it's subfolders this happens through smbd, so X can send a notification of that event to Y and everything will update it's index because its seen the event from windows.
On X smbd uses a process called inotify to monitor filesystem events that don't happen through smbd, however inotify is nonrecursive, and it only runs on the share root
So if any other process on X modifiys /shares/Photos/Holidays or /shares/Photos/Birthdays smbd has no idea so neither does Y or Z.

It's not to big an issue for me, but if anyone else is reading this and wanting changes made from the host to all clients, I think the only thing you can do is connect to share from the host machine, and point any software to the share rather than the host path. This will run everything through smbd
void
Developer
Posts: 16897
Joined: Fri Oct 16, 2009 11:31 pm

Re: Network drives: Monitor changes misses files created on different system after index.

Post by void »

Thank you for your reply wason92,

For other that would like to see what file system changes Everything is detecting:
  • In Everything, type in the following search and press ENTER:
    /debug
    (Tools -> Debug -> Console in Everything 1.5+)
    ---this will open a debug console---
  • File system changes are shown in Cyan color in the following format:
    RDC <action> <filename>
To close the debug console:
  • In Everything, type in the following search and press ENTER:
    /debug
Post Reply