None of this is useful unless I have the autofs mount map at least. The last message you sent me looked more like this was not an autofs problem but without the map I can't tell. An autofs debug log is needed as well.
I would like to see an autofs debug log of the workaround I described being used for this as well.
Ok, so I have checked the workaround I mentioned previously in email. Note that this will still leave noise in the log but it will prevent the attempted NFS mount and so should fail quickly. Although I am a little puzzled why the NFS mount takes a long time to fail since it should return a failure quickly when the path is found to not exist on the server. But that's possibly due to the form of the wildcard map entry. Anyway that won't affect the usefulness of the workaround. As I have said in email you can use a map entry that triggers a bind mount (so there is no NFS mount involved) with an invalid location to workaround this. For example, if you are using a map called auto.home that has a wildcard entry you can put the bogus map entry before the wildcard map entry like this: auto.home: .hidden :/this/is/a/bogus/path * hqna2:/vol/vol1/home/& This will cause some log noise but will fail straight way. For example (there's a bunch more in this because of the debug logging setting): Aug 18 09:11:34 donald.themaw.net automount[6217]: handle_packet: type = 3 Aug 18 09:11:34 donald.themaw.net automount[6217]: handle_packet_missing_indirect: token 4, name .hidden, request pid 6589 Aug 18 09:11:34 donald.themaw.net automount[6217]: attempting to mount entry /test/.hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: lookup_mount: lookup(file): looking up .hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: lookup_mount: lookup(file): .hidden -> :/this/is/a/bogus/path Aug 18 09:11:34 donald.themaw.net automount[6217]: parse_mount: parse(sun): expanded entry: :/this/is/a/bogus/path Aug 18 09:11:34 donald.themaw.net automount[6217]: parse_mount: parse(sun): gathered options: Aug 18 09:11:34 donald.themaw.net automount[6217]: parse_mount: parse(sun): dequote(":/this/is/a/bogus/path") -> :/this/is/a/bogus/path Aug 18 09:11:34 donald.themaw.net automount[6217]: parse_mount: parse(sun): core of entry: options=, loc=:/this/is/a/bogus/path Aug 18 09:11:34 donald.themaw.net automount[6217]: sun_mount: parse(sun): mounting root /test, mountpoint .hidden, what :/this/is/a/bogus/path, fstype nfs, options (null) Aug 18 09:11:34 donald.themaw.net automount[6217]: mount(nfs): root=/test name=.hidden what=:/this/is/a/bogus/path, fstype=nfs, options=(null) Aug 18 09:11:34 donald.themaw.net automount[6217]: mount_mount: mount(nfs): calling mkdir_path /test/.hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: mount_mount: mount(nfs): .hidden is local, attempt bind mount Aug 18 09:11:34 donald.themaw.net automount[6217]: mount_mount: mount(bind): calling mkdir_path /test/.hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: mount(bind): calling mount --bind -o defaults /this/is/a/bogus/path /test/.hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: do_spawn: >> mount: /test/.hidden: special device /this/is/a/bogus/path does not exist. Aug 18 09:11:34 donald.themaw.net automount[6217]: do_spawn: >> dmesg(1) may have more information after failed mount system call. Aug 18 09:11:34 donald.themaw.net automount[6217]: mount(nfs): nfs: mount failure :/this/is/a/bogus/path on /test/.hidden Aug 18 09:11:34 donald.themaw.net automount[6217]: dev_ioctl_send_fail: token = 4 Aug 18 09:11:34 donald.themaw.net automount[6217]: failed to mount /test/.hidden Assuming this works for the customer I will explain how I will implement this in autofs to eliminate the extra work that is being done, essentially creating a mountpoint and attempting a mount and so eliminating the log noise, I will however leave some debug logging in though. If the customer doesn't want to or can't make this change in the map because it is distributed from a network service such as NIS then it can be done by using the plus map inclusion much the same way as you described in comment #13. For example: In /etc/nsswitch.conf you need (assuming NIS is being used as a central map source) and order "is" important: automount: files nis Create or update /etc/auto.home (convention is to use the same map name as the remote map source but is not required) to include entries for the map keys that are causing a problem and lastly include the existing unchanged NIS map: .hidden :/this/is/a/bogus/path +auto.home The first match will be used so the NIS map won't be consulted for a lookup on .hidden. If the lookup doesn't find a match auto.home from the next nsswicth map source will be tried (assuming nsswitch behaviour has not been alerted by the addition of non-default options). If there's anything you don't understand please ask. Please also understand that this needs to fit in with existing autofs map functionality so it may need to be done in a way that the customer may not like. They may complain that they shouldn't need to make any map changes and we should "just fix it" but that simply cannot happen if they insist on using a wildcard map entry. I'll describe what I'm going to do once you have checked the workaround and we can discus it further. If the customer objects to what I'm proposing the only other option will be to add an option (in some way) that lists the particular keys (ie. .hidden) to ignore. That will actually be difficult because it might cause problems where other maps might need to honour these keys or there may be other problems with alternate implementation approaches. Beware, if the customer refuses to accept the implementation that we arrive at in discussions then I will not be very accommodating because I do need to concern myself with what's best for the upstream autofs project as well. Don't get me wrong I will try and come up with something that's sensible and ok with the customer and there will be reasons we arrive at for doing it the way we do, so to accept this should be a reasonable ask of the customer.