You are not logged in.

#1 2010-08-07 02:47:19

sleeping2620
Member
Registered: 2010-08-07
Posts: 6

autofs doesn't automount nfs4 shares

I'm trying to automount NFS shares using autofs. All in all, NFS is configured correctly, as I can manually mount the share on the command line.

user@client:~$ sudo mount -t nfs4 myserver:/home /mnt
user@client:~$ mount | grep myserver
myserver:/home on /mnt type nfs4 (rw,addr=192.168.9.20,clientaddr=192.168.9.8)
user@client:~$ df | grep myserver
myserver:/home       480719104 421950976  34348800  93% /mnt
user@client:~$ sudo umount /mnt
user@client:~$ 

Following the instructions on the wiki, I install the autofs package, I add the required line in /etc/nsswitch.conf, and modprobe nfs4. Here is my /etc/autofs/auto.master file :

# Sample auto.master file
# Format of this file:
# mountpoint map options
# For details of the format look at autofs(5).

#/media /etc/autofs/auto.media

/net -hosts --timeout=60

Finally, I start the autofs daemon as such :

user@client:~$ sudo /etc/rc.d/autofs restart

The daemon starts fine, but I can't access the NFS shares as I should :

user@client:~$ cd /net
user@client:/net$ ls -l
total 0
dr-xr-xr-x 2 root root 0 Aug  6 22:40 localhost.localdomain
dr-xr-xr-x 2 root root 0 Aug  6 22:40 myserver
user@client:/net$ cd myserver
bash: cd: myserver: No such file or directory
user@client:/net$ 

What have I done wrong? What more must I do to use my NFS shares with autofs?


Thanks.

Offline

#2 2010-08-08 13:33:24

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: autofs doesn't automount nfs4 shares

good luck.
I'm having this problem since autofs5 came out. (which is a few years now), and no one knows the solution.

see https://bbs.archlinux.org/viewtopic.php?id=79513


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB