Edit: Switching to CARP triggers rather than the IFNET triggers described in the handbook solved the NFS issues.
I'm trying to set up a NAS with high availability using the aforementioned services.
First off, regarding the devd triggers and example script in the handbook. Together they can change the role of the node on which the link state changes, but that has no effect on the other node. In the short run I added remote-master and remote-slave cases to the script, which are called in the slave and master cases, respectively. The standard cases call the remote cases via ssh:
The remote cases differ from the standard cases only in the lack of the ssh command. It's pretty terrible but it was the first thing that came to mind, and it seems to work. I'm sure there must be a better way though.
It works at least in theory. The HAST nodes swap roles, the HAST volume is mounted and nfs starts. Shares are visible from the client (Arch Linux) after the transition according to showmount. But existing NFS connections become useless until the nodes transition back to the original state, failing with either 'stale file handle' or input/output errors. And I have no idea where to go from here.
I'm trying to set up a NAS with high availability using the aforementioned services.
First off, regarding the devd triggers and example script in the handbook. Together they can change the role of the node on which the link state changes, but that has no effect on the other node. In the short run I added remote-master and remote-slave cases to the script, which are called in the slave and master cases, respectively. The standard cases call the remote cases via ssh:
Code:
...
case "$1" in
master)
...
remote_node=$( hastctl status |awk 'NR==2 {print $5}' )
ssh $remote_node /usr/local/sbin/carp-hast-switch remote-slave 2>&1
...
The remote cases differ from the standard cases only in the lack of the ssh command. It's pretty terrible but it was the first thing that came to mind, and it seems to work. I'm sure there must be a better way though.
It works at least in theory. The HAST nodes swap roles, the HAST volume is mounted and nfs starts. Shares are visible from the client (Arch Linux) after the transition according to showmount. But existing NFS connections become useless until the nodes transition back to the original state, failing with either 'stale file handle' or input/output errors. And I have no idea where to go from here.