I'm knowingly taking a naive approach to a warm standby NFS server setup. I have two servers (CentOS 7.7) sharing a directory (not a filesystem) via NFS. This directory is kept in sync on both servers with rsync. The /etc/exports file on both servers uses the same fsid for the export. I have a service IP for the NFS service which is used by clients. Clients are using "soft,nosharecache" mount options.
Now I tested manual failover for this IP twice and watched client behaviour (and silently hoped that it "just works"...). Unfortunately my hopes were smashed, but client behaviour is "inconsistent" IMHO and I want to know for educational purposes why this doesn't "just work" and what could be done to make it work (outside of dedicated HA setups like pacemaker).
On the first try my setup seemed to work for some clients (could access the share on new server without noticing the switch), others showed the "stale filehandle" error (which I resolved with umount -fl and remount).
On the second try (using arping for faster IP switch) again some clients had "stale filehandle" errors, others seemed to have lost the mount completely (disappeared from "mount" output), but still had a line in /proc/fs/nfsfs/volumes for the mount. When I remounted the share for those clients I "sometimes" got duplicate entries in /proc/fs/nfsfs/volumes (which don't seem to cause harm). No clients "just worked" this time.
Can somebody explain the (probably obvious) causes why this approach fails?
thanks a lot