You are not logged in.

#1 2014-09-14 18:13:40

nesk
Member
Registered: 2011-03-31
Posts: 181

[SOLVED] Can't get autofs to work with NFS4

NFS share mounts successfully either from fstab or manual mount, but autofs doesn't seem to be able to handle it.
My /etc/autofs/auto.master:

/nfs	/etc/autofs/auto.nfs

/etc/autofs/auto.nfs:

mountpoint -fstype=nfs4 serv1:/mnt/stor

And then:

# systemctl reload autofs
$ cd /nfs/mountpoint/
bash: cd: /nfs/mountpoint/: No such file or directory

Am I doing something wrong with autofs?

Last edited by nesk (2014-09-15 06:23:44)

Offline

#2 2014-09-14 19:32:00

Rexilion
Member
Registered: 2013-12-23
Posts: 784

Re: [SOLVED] Can't get autofs to work with NFS4

I remember my struggles with automounter being quickly resolved by doing:

automount -d -f

after shutting it down through systemd. This way, you can see how it moves.

Do post the logs if this does not work for you.


fs/super.c : "Self-destruct in 5 seconds.  Have a nice day...\n",

Offline

#3 2014-09-14 19:41:31

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [SOLVED] Can't get autofs to work with NFS4

Here they are:

# automount -d -f -v
Starting automounter version 5.1.0, master map auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master files auto.master
parse_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /nfs
master_do_mount: mounting /nfs
automount_path_to_fifo: fifo name /run/autofs.fifo-nfs
lookup_nss_read_map: reading map file /etc/autofs/auto.nfs
parse_init: parse(sun): init gathered global options: (null)
mounted indirect on /nfs with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /nfs
handle_packet: type = 3
handle_packet_missing_indirect: token 565, name mountpoint, request pid 2124
attempting to mount entry /nfs/mountpoint
lookup_mount: lookup(program): looking up mountpoint
lookup(program): lookup for mountpoint failed
dev_ioctl_send_fail: token = 565
failed to mount /nfs/mountpoint
handle_packet: type = 3
handle_packet_missing_indirect: token 566, name mountpoint, request pid 2124
dev_ioctl_send_fail: token = 566
handle_packet: type = 3
handle_packet_missing_indirect: token 567, name mountpoint, request pid 2124
dev_ioctl_send_fail: token = 567

Those last 3 lines appear every time I try to cd into /nfs/mountpoint/

Offline

#4 2014-09-15 06:23:26

nesk
Member
Registered: 2011-03-31
Posts: 181

Re: [SOLVED] Can't get autofs to work with NFS4

Turned out my auto.nfs had executable bit and autofs is finicky about it: http://serverfault.com/questions/265744 … nfs-issues
After removing executable bit it works.

Offline

#5 2014-12-21 23:09:19

fmouse
Member
Registered: 2014-12-21
Posts: 1

Re: [SOLVED] Can't get autofs to work with NFS4

The same problem, with exactly the same symptoms, can be caused by a failure to connect to rpcbind.  This is a server side issue since rpcbind is built against libwrap.so, so /etc/hosts.allow must permit a connection from the remote client, assuming you have a suitably restrictive /etc/hosts.deny policy in place.  Add

rpcbind : <address spec> : allow

to your /etc/hosts.allow file.

Offline

Board footer

Powered by FluxBB