autofs NFS auto failover

Posted by eng33@reddit | linuxadmin | View on Reddit | 0 comments

OS: Ubuntu 24.04

My file server has two iface. One is 10G the other is 1G.

I'd like to setup autofs to try the 10G interface first then then 1G interface if it fails.

My auto.master has "/- auto.home"

The closest I found in auto.home was:

/mountpoint -fstype=nfs,rw,sync 192.168.10.1,192.168.1.1:/export

but this seems to always use the second address.

chatgpt said to try

/mountpoint -fstype=nfs,rw,sync 192.168.10.1:/export;192.168.1.1:/export

but this does not work at all.

Another suggestion was to use DNS

192.168.10.1 host

192.168.1.1 host

but then it affects all services. for example if someone tries to ssh to host, it takes forever to fail