File changes on a network drive made outside Obsidian are not shown

Steps to reproduce

  • Open a file in the Obsidian vault (stored on network drive) using an external text editor on a different computer
  • Edit the file

Expected result

  • Obsidian Sync should propagate changes to the remote vault

Actual result

  • Obsidian Sync often fails to update files in remote vault

Environment

  • Operating system: macOS
  • Obsidian version: latest version (not at my computer currently so can’t check, but I keep my installation up to date)

Additional information

I found this thread in the Bug Graveyard that seems to describe the problem I’ve been having: File changes made outside Obsidian are not shown (AppImage version)
To me this indicates that the bug was never fixed. Specifically, my use case is that my main vault is on a Synology network drive, and I often edit these files directly using Vim on a Raspberry Pi. Obsidian is constantly running on my Mac with Obsidian Sync connected to a remote vault, but it often fails to pick up changes. Sometimes it does, but it’s inconsistent! If I revisit the file in Obsidian then changes are sometimes picked up and propagated to sync, but if I forget to do this then the changes are often overwritten by the most recent version to sync back in from my iPad or iPhone (which are both connected to the remote vault via Obsidian Sync). The result is frustrating data loss.

Note that I am absolutely certain that the files are being correctly edited and saved externally using Vim.

Usually, an OS’s internal file watcher doesn’t or cannot watch file changes on a remote filesystem (would also make for too much network overhead).

You might be able to work around this on Linux by mounting the remote filesystem into a local folder (like with NFS), so it appears to the OS as “local”. This usually won’t work when using inferior network protocols like smb: shares.

Then again, file watching resources are rather costly, and thus minimized in the standard install of a distro, often to only 4096 or 8192. So if you have 100,000 files to watch, it simply won’t work, except if you increase the number of inotify user watches (I use 524,288 here). This will affect performance.

So the best bet might be to have your vault local and just sync it to your NAS.

We don’t support network drives for the very reason you are reporting this bug.
The file watcher doesn’t work on network drives.

1 Like

Oh, I did not know this! It breaks my workflow in a big way, unfortunately. Back to the drawing board. :frowning: