Inotify on disk devices not working

Hello,

Consider the following setup:

I’ve a host with a directory at /data/shared that is mounted to VM1 and VM2 with this:

incus config device add VM1 shared disk source=/data/shared path=/mnt/shared shift=true

My goal is to have some system in place where if a file is written from the host on /data/shared then the VMs would pick on the changes via inotify (systemd path unit) and run some service.

I did some tests and it doesn’t seem to work at from the host to the VMs. However If I set the host to watch for file changes on the path and write something from a VM it works.

Is there any way to get inotify to work in both directions? Ideally I would even like to have VM2 write a file and have VM1 detect the change and run a service.

Thank you.

1 Like

Thanks for the clarification. Looks like I’ll have to find another way around this. :slight_smile: