Description of problem: autofs always chooses a local entry, if present. This is fine in the general case, but not when weights have been explicitly assigned to the hosts such that localhost only be chosen as a last resort. autofs-4.1.3-12 How reproducible: Always Steps to Reproduce: 1. Set up a replicated entry in /etc/auto.misc (eg: 'rep host1(1):/exports/e1,localhost(10):/exports/e2) and restart autofs 2. ls /misc/rep 3. cat /proc/mounts | grep nfs Actual results: The localhost mount was chosen in spite of it's higher weight. Expected results: host1's export should have been mounted since it was given the lower weight. Additional info: See /usr/share/doc/autofs-4.1.3/README.replicated-server for explanation of professed behavior.
It is our goal to maintain compatibility with the Sun automounter, so that it will integrate seemlessly in mixed environments. To that end, please refer to the Sun documentation for the desired behaviour, and report bugs on devaiations there from. In this particular instance, the following paragraph from the Sun automount(1M) man page apply: Server proximity takes priority in the selection process. In the example above, if the server delta is on the same network segment as the client, but the others are on different network segments, then delta will be selected; the weighting value is ignored. The weighting has effect only when selecting between servers with the same network proximity. I'm a little puzzled by what the client is doing, here. Why would you want to fall back to a local mount? In the Sun implementation, replicated server functionality is only available if the mounts are read-only. In that case, why wouldn't you prefer to read the local copy?
The customer would like to be able to specify to use a local mount point last when he has replicated servers for automount. In his case he will back up his NFS exports locally at regular intervals, but they will be out of date since they only sync occasionally to the nfs servers. He would only like to use this local backup only if the two other servers become unavailable.
Unfortunately this is the expected (but not quite documented) behavior in the linux automounter. I have updated the documentation to reflect its behavior. (We try to provide compatability as much as possible with the Sun automounter, and it behaves this way as well). The documentation has been updated in autofs-4.1.3-81.