I am looking for the simplest way to share a single file in a high availability way between a pair of linux servers. (Version and distribution are unimportant, I’m looking for a generic solution.)
I have two servers, each with their own local disks and NFS shares and other services between them. I have a file that both servers need to access, but nothing other than those servers needs to access it.
If either server crashes, I want the most recent possible contents of that file to be available to the remaining server. (Obviously the other server should pick up changes on recovery.)
The file is a state file, and likely only one server at a time will be writing to it.
Without adding external hardware, what options are there for a high availability file share like this?