You are not logged in.

#1 2009-09-05 14:38:03

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

Autofs5 does not mount Nfs4 exports automatically

Hi.
server: dieter-p4sci-arch
client: dieter-ws-a7n8x-arch

[dieter@dieter-p4sci-arch ~]$ pacman -Qs nfs
local/nfs-utils 1.2.0-3
    Support programs for Network File Systems
local/nfsidmap 0.21-2
    Library to help mapping IDs, mainly for NFSv4

dieter@dieter-ws-a7n8x-arch net pacman -Qs nfs
local/nfs-utils 1.2.0-3
    Support programs for Network File Systems
local/nfsidmap 0.21-2
    Library to help mapping IDs, mainly for NFSv4
dieter@dieter-ws-a7n8x-arch net pacman -Qs autofs
local/autofs 5.0.4-4
    A kernel-based automounter for Linux.

/etc/exports on server:

[dieter@dieter-p4sci-arch ~]$ cat /etc/exports
# /etc/exports
#
# List of directories exported to NFS clients.  See exports(5).
# Use exportfs -arv to reread.
#
# Example for NFSv2 and NFSv3:
#  /srv/home       hostname1(rw,sync) hostname2(ro,sync)
#
# Example for NFSv4:
#  /srv/nfs4       hostname1(rw,sync,fsid=0)
#  /srv/nfs4/home   hostname1(rw,sync,nohide)
# Using Kerberos and integrity checking:
#  /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt)
#  /srv/nfs4/home   gss/krb5i(rw,sync,nohide)
#
# /etc/exports
#
# See exports(5) for a description.

# /home is not really used anywhere i think, but we need a root...
/home                           192.168.1.213(fsid=0,sync,no_subtree_check,no_root_squash,ro) 192.168.1.65(fsid=0,sync,no_subtree_check,no_root_squash,rw,nohide)
/home/dieter            192.168.1.213(sync,no_subtree_check,no_root_squash,rw) ws(sync,no_subtree_check,no_root_squash,rw) 
/home/www              192.168.1.213(sync,no_subtree_check,no_root_squash,rw) ws(sync,no_subtree_check,no_root_squash,rw)
/home/backup                192.168.1.213(sync,no_subtree_check,no_root_squash,rw) ws(sync,no_subtree_check,no_root_squash,rw)
/home/hilde                     192.168.1.65(sync,no_subtree_check,no_root_squash,rw,nohide)
#/mnt/backup             192.168.1.213(sync,no_subtree_check,no_root_squash,rw)
/home/media/1tbdisk             192.168.1.213(sync,no_subtree_check,no_root_squash,rw,nohide)
/home/media                     192.168.1.213(sync,no_subtree_check,no_root_squash,ro) 192.168.1.64(sync,no_subtree_check,no_root_squash,ro)

Mounting manually works (both the nfs4 root export and a subdirectory):

dieter@dieter-ws-a7n8x-arch ~ mkdir server-nfs
dieter@dieter-ws-a7n8x-arch ~ sudo mount -t nfs4 server:/dieter server-nfs
dieter@dieter-ws-a7n8x-arch ~ sudo umount server-nfs/
dieter@dieter-ws-a7n8x-arch ~ sudo mount -t nfs4 server:/ server-nfs
dieter@dieter-ws-a7n8x-arch ~ sudo umount server-nfs/
dieter@dieter-ws-a7n8x-arch ~
# i checked that the directories show the correct content as well.

but not with autofs...
note the '/var/autofs/net     -hosts' line.  This is supposed to look for hosts (at least the ones in /etc/hosts) and mount their exports, bypassing auto.net which uses showmount.
see http://www.linux-consulting.com/Amd_Aut … ofs-5.html
and/or https://bugzilla.redhat.com/show_bug.cgi?id=197824

dieter@dieter-ws-a7n8x-arch ~ 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).

/var/autofs/misc       /etc/autofs/auto.misc
#/var/autofs/net           /etc/autofs/auto.net
/var/autofs/smb        /etc/autofs/auto.smb
#/media /etc/autofs/auto.media --timeout=3
/var/autofs/net     -hosts
dieter@dieter-ws-a7n8x-arch ~ cat /etc/hosts
#
# /etc/hosts: static lookup table for host names
#

#<ip-address>    <hostname.domain.org>    <hostname>
127.0.0.1        localhost.localdomain    localhost dieter-ws-a7n8x-arch
192.168.1.2    server
# End of file

dieter@dieter-ws-a7n8x-arch net ps aux | grep automount
root      8898  0.0  0.1   8436  1476 ?        Ssl  16:34   0:00 /usr/sbin/automount
dieter    9329  0.0  0.0   3616   800 pts/1    R+   16:35   0:00 grep automount
dieter@dieter-ws-a7n8x-arch net pwd
/var/autofs/net
dieter@dieter-ws-a7n8x-arch net ls -alh
total 4.0K
drwxr-xr-x 5 root root    0 2009-09-05 16:34 .
dr-xr-xr-x 5 root root 4.0K 2009-05-09 10:54 ..
dr-xr-xr-x 2 root root    0 2009-09-05 16:34 localhost.localdomain
dr-xr-xr-x 2 root root    0 2009-09-05 16:34 server
dieter@dieter-ws-a7n8x-arch net ls -alh server/
ls: cannot open directory server/: No such file or directory

why can't I use /var/autofs/net/server? sad
There is nothing relevant in syslog or daemon.log


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

Offline

#2 2009-09-26 07:39:47

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

Re: Autofs5 does not mount Nfs4 exports automatically

a beer for the person who can give me a good clue!


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

Offline

#3 2009-11-13 23:22:45

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

Re: Autofs5 does not mount Nfs4 exports automatically

2 beers!


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

Offline

#4 2009-11-28 19:47:28

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

Re: Autofs5 does not mount Nfs4 exports automatically

bump.. 3 beers.


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

Offline

#5 2010-01-02 21:07:03

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

Re: Autofs5 does not mount Nfs4 exports automatically

Still having this problem

dieter@dieter-ws-a7n8x-arch ~ pacman -Qs autofs
local/autofs 5.0.5-1
    A kernel-based automounter for Linux.
dieter@dieter-ws-a7n8x-arch ~ pacman -Qs nfs
local/nfs-utils 1.2.0-5
    Support programs for Network File Systems
local/nfsidmap 0.23-3
    Library to help mapping IDs, mainly for NFSv4

dieter@dieter-ws-a7n8x-arch ~ ssh server  pacman -Qs nfs
local/nfs-utils 1.2.0-5
    Support programs for Network File Systems
local/nfsidmap 0.23-3
    Library to help mapping IDs, mainly for NFSv4

also running 2.6.32 on both systems now.


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

Offline

#6 2010-02-18 12:41:09

mattmurdock
Member
Registered: 2010-02-18
Posts: 4

Re: Autofs5 does not mount Nfs4 exports automatically

Have you tried adding a timeout:

/var/autofs/net     -hosts    --timeout=60

Is rpcbind installed and running?

ps -ef | grep rpcbind

HTH

Offline

#7 2010-02-19 21:25:10

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

Re: Autofs5 does not mount Nfs4 exports automatically

mattmurdock wrote:

Have you tried adding a timeout:

/var/autofs/net     -hosts    --timeout=60

Is rpcbind installed and running?

ps -ef | grep rpcbind

HTH

thanks for the help.
/usr/bin/rpcbind is running on both the server and the client.
I tried the timeout option, but no change sad


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

Offline

Board footer

Powered by FluxBB