OCFS2 is POSIX-compliant and "simple" to set up, I tried it and it works:
apt-get update
apt-get install -y ocfs2-tools
# Only step that needs to be done once on any node
mkfs.ocfs2 /dev/sdb
# Hostname MUST be correct or else it doesn't work
o2cb add-cluster CLUSTER_NAME
o2cb add-node CLUSTER_NAME S1_HOSTNAME --ip S1_PRIVATE_IP
o2cb add-node CLUSTER_NAME S2_HOSTNAME --ip S2_PRIVATE_IP
# Manually copy /etc/ocfs2/cluster.conf to all other nodes
# On all nodes, need to run this to set CLUSTER_NAME as default
# This can be skipped if using "ocfs2" (default cluster name)
# dpkg-reconfigure ocfs2-tools
# On all nodes (required)
echo "kernel.panic_on_oops = 1" > /etc/sysctl.conf
echo "kernel.panic = 30" > /etc/sysctl.conf
# On all nodes:
# Enable port 7777 (used by OCFS2 heartbeats) in firewall
# On all nodes
service o2cb online
# On all nodes
mkdir -p /mnt/shared
echo "/dev/sdb /mnt/shared ocfs2 defaults 0 0" >> /etc/fstab
mount -a
This is as simple as it gets for setting up a shared read-write POSIX-compliant filesystem on two or more servers. Nearly all steps need to be run on each node. And if a new node is added to the cluster, all nodes need to be updated with o2cb add-node CLUSTER_NAME SX_HOSTNAME --ip SX_PRIVATE_IP
.
This also uses local heartbeat by default, which is supposedly easier to setup than global heartbeat.