mounting nfs directory using autofs

Steve Brown sbrown at valueline.com
Thu Mar 24 16:32:56 UTC 2005


Chris Rouch wrote:

>On Sun, 20 Mar 2005 22:30:43 -0500, Steven J. Brown
><sbrown3 at optonline.net> wrote:
>  
>
>>I'm trying to use autofs in its simplest possible form, following
>>examples in Red Hat's documentation, to mount an nfs directory from my
>>desktop pc to my notebook.  Everything seems to be in place because I
>>can mount the nfs export manually (at the command line or with
>>/etc/fstab) with no problem.  I want to do this because I connect my
>>notebook to three different networks (or sometimes I don't connect to a
>>network) and on startup, the notebook seems to take forever looking for
>>the networks (to mount smbfs/nfs/ncpfs directories) that arent' there.
>>I'm hoping that autofs will reduce boot time.  To get started, I tried a
>>simple one.  Here's how I've set it up:
>>
>>Server (Desktop PC):
>>/etc/exports:
>>/home/sbrown    192.168.2.3(rw,sync)
>>
>>Notebook:
>>/etc/auto.master:
>>/misc   /etc/auto.misc
>>
>>/etc/hosts:
>>192.168.2.4   dadlx
>>
>>/etc/auto.misc:
>>dad   -rw,soft,intr,rsize=8192,wsize=8192   dadlx:/home/sbrown
>>    
>>
>
>For my nfs automounts I always use '-fstype=nfs', e.g.
>dad      -fstype=nfs             dadlx:/home/sbrown
>
>Regards,
>
>Chris
>
>  
>
As it turns out, it's working.  I didn't think it was working because 
when I did 'ls /misc', I expected to see an /misc/dad directory.  Had I 
tried typing 'ls /misc/dad', the dad subdirectory would be mounted and 
I'd be able to see the contents.

The interesting thing is that when I changed 'dad' to '*' as suggested 
by Ankush Grover, I could type 'ls /misc/anythingiwant' and see the 
contents of the nfs directory.  I could mount the same directory 
multiple times just by typing something else after '/misc'.

Thanks for your reply.


--------------------------------------------------
This transmission contains information intended to be confidential and solely for the use of Value Line, Inc., and those persons or entities to whom it is directed. It is not to be reproduced, retransmitted, or in any other manner distributed. If you receive this message in error, please immediately delete it and all copies of it from your system, destroy any hard copies of it and notify the sender.





More information about the fedora-list mailing list