automount / autofs in Ubuntu 18.04.3

  automount, cifs, ubuntu, windows

automount / autofs in Ubuntu 18.04.3

I’m looking for a little help here…

I recently used automount / autofs to mount windows shares in my ubuntu server.
Occasionally the windows machine gets rebooted, which is why I’m using automount, I was hoping that if the windows machine was rebooted, autofs would be able to re-mount the shares the next time they were accessed on the Ubuntu server.
So far, I’ve not been able to accomplish this… when I reboot the windows machine, I get:

ls: cannot open directory '.': Stale file handle

I thought after the TIMEOUT parameter in the auto.master file was reached, the mount would be un-mounted, and then retried on-demand the next time something tried to access that share.

It’s very possible I’m misunderstanding the feature set of autofs.

Is there a way I can achieve this?



Source: StackOverflow