You are not logged in.

#1 2012-06-30 13:56:57

azmeuk
Member
Registered: 2012-06-30
Posts: 27
Website

[Solved] Troubles with autofs, nfs and magic discovery

Hi,
I can't get nfs mounts working with autofs, while I can make them work manually.

[azmeuk@florizarre ~]$ showmount ramoloss -e
Export list for ramoloss:
/home/ramoloss/Bac-à-sable        192.168.122.0/255.255.255.0,192.168.0.0/255.255.0.0

[azmeuk@florizarre ~]$ sudo mount ramoloss:/home/ramoloss/Bac-à-sable tmp

[azmeuk@florizarre ~]$ ls tmp/
Arrivage  Bordel  Documents  Images  Musique  Playlists  Vidéos

[azmeuk@florizarre ~]$ sudo umount tmp

Then, if I launch (here manually) autofs, and try to access "/net/ramoloss/home/ramoloss/Bac-à-sable" I get an unexisting directory error.

[azmeuk@florizarre ~]$ cat /etc/autofs/auto.master 
# 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


[azmeuk@florizarre ~]$ sudo automount -f -v
Starting automounter version 5.0.6, master map auto.master
using kernel protocol version 5.02
syntax error in nsswitch config near [ syntax error ]
mounted indirect on /net with timeout 60, freq 15 seconds
ghosting enabled
attempting to mount entry /net/ramoloss
lookup(hosts): can't find path in hosts map /net/ramoloss
lookup_mount: exports lookup failed for ramoloss
key "ramoloss" not found in map source(s).
failed to mount /net/ramoloss
attempting to mount entry /net/ramoloss
failed to mount /net/ramoloss

What is wrong with my configuration ? Where can I investigate ?
Thanks for your help !

Last edited by azmeuk (2012-07-01 19:49:58)

Offline

#2 2012-06-30 16:03:43

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: [Solved] Troubles with autofs, nfs and magic discovery

have you loaded the nfs and the autofs modules ?

how about your domain names? are they set correctly in the server and the client?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#3 2012-07-01 18:37:32

azmeuk
Member
Registered: 2012-06-30
Posts: 27
Website

Re: [Solved] Troubles with autofs, nfs and magic discovery

Yes modules autofs4 and nfs are loaded.
Domain names are ok in client and server (I can manually mount nfs shares using domain names).

Last edited by azmeuk (2012-07-01 18:38:47)

Offline

#4 2012-07-01 18:57:45

cmudik
Member
From: Czech Republic
Registered: 2010-06-02
Posts: 12

Re: [Solved] Troubles with autofs, nfs and magic discovery

I've got this in /etc/autofs/auto.master

~ >>> cat /etc/autofs/auto.master
# 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	/etc/autofs/auto.nfs
/media/ssh	/etc/autofs/auto.ssh	--timeout=60 --ghost

and in /etc/autofs/auto.nfs

~ >>> cat /etc/autofs/auto.nfs
cmudik-htpc-sda -fstype=nfs4,rw,async,rsize=32768,wsize=32768    10.109.253.155:/sda3
cmudik-htpc-sdb -fstype-nfs4,rw,async,rsize=32768,wsize=32768   10.109.253.155:/sdb1
cmudik-htpc-sdc -fstype-nfs4,rw,async,rsize=32768,wsize=32768   10.109.253.155:/sdc1

Offline

#5 2012-07-01 19:19:00

azmeuk
Member
Registered: 2012-06-30
Posts: 27
Website

Re: [Solved] Troubles with autofs, nfs and magic discovery

Actually I followed the wiki instructions, so I don't have any auto.nfs file since magic mount should work. In my case it is weird, because autofs finds nfs shares, but I can't access them.

Offline

#6 2012-07-01 19:49:38

azmeuk
Member
Registered: 2012-06-30
Posts: 27
Website

Re: [Solved] Troubles with autofs, nfs and magic discovery

Solved reading http://www.autofs.org/autofs-base.html#nfs
Actually Inxsible I didn't understood that server also needs to knows client domain.

Offline

Board footer

Powered by FluxBB