(E-Mail Removed) wrote:
> [...] is there a way to force autofs/automount to mount a file-system
> using NFS instead of a local mount even if the file-system in question
> can be accessed locally in addition to via NFS on a given server?
> If it helps, the content of "/etc/auto.master" file on both servers
> used in the test is:
> #/misc /etc/auto.misc --timeout=60
> #/misc /etc/auto.misc
> #/net /etc/auto.net
> /shares /etc/auto.shares
> while the content of the "/etc/auto.shares" map file on the same
> servers is:
> usr4 -fstype=nfs,rw,soft lk_rmsvip:/usr4
It seems to me that you might be better off using the built-in features
of /etc/auto.net?
Personally I have auto.master containing this line:
/var/autofs /etc/auto.net --timeout=300
and then I symlink the expected directories back to /net, so that
they (the links) are always visible.
In your case, I think you could include /etc/auto.net in /etc/auto.master
and then set up your configuration on each system as follows:
mkdir /shares && cd /shares # Or wherever
ln -s /var/autofs/lk_rmsvip/usr4 .
Oh, you'll probably want to edit the options declaration in the
(executable) file /etc/auto.net. The default on my debian system is:
opts="-fstype=nfs,hard,intr,nodev,nosuid,nonstrict,async"
which may be a little sharper than you appear to want.
Chris