Re: incron with a shared NFS-mounted filesystem

From: Nicolas Bélan <nicolas.belan_at_gmail.com>
Date: Thu, 17 May 2012 01:38:40 +0200

Hi,

I had the same kind of problem, and there is no solution, well, simple
solution ....
The problem is not an incron pb, but a inotify problem.
This is quite logic in fact, because inotify "catch" i/o events from
userland to filesystem (more or less).
when a file is created on other server, there are no i/o on client,
because the file "appears" on client, but was not
opened/written/closed on client.
I simplify but this is what is happening.
If you use drbd+ocfs2, an active-active cluster, you will have the
same behavior.
Shell script in these cases is your friend :-)

Best regards,
Nicolas

Le 16 mai 2012 à 22:11, Whit Blauvelt <whit_at_transpect.com> a écrit :

> Hi,
>
> I see that incron works fine with an NFS-mounted file system when a file is
> added or edited from the same host that incron is running on. But when the
> file is added or edited to an NFS-mounted directory that incron is watching
> from a different host also using the NFS mount, then incron doesn't pick it
> up. (At least not right away. Not sure if it does or not after some delay.)
>
> Is there a way to get this to work? It would be convenient when a file is
> added or edited in a shared NFS space to have multiple hosts act on that
> through incron, rather than have that restricted to just the host the file
> action was performed through.
>
> I suppose I could have a script on each host that, if triggered through
> incron, sends a command through ssh to each of the other hosts and touches
> the file from each - which should trigger the local incrons on those hosts
> to act. Is there a simpler way?
>
> Thanks,
> Whit
>
Received on Tue Jun 05 2012 - 22:14:21 CEST

This archive was generated by hypermail 2.2.0 : Tue Jun 05 2012 - 22:14:21 CEST