Re: How to get autofs to use NFS v4?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been doing some more work on this issue, and have to update my previous claim. While it is true that autofs was mounting home directories using NFSv3, this is because I had misconfigured the rpc.nfsd environment variables on the NFS server. Putting

   RPCNFSDARGS="-N 2 -N 3 -U"

in the /etc/default/nfs-kernel-server doesn't work on Ubuntu 16/18.04 systems because of the way the nfs-config service file is set up. The correct configuration option (mapped to /run/sysconfig/nfs-utils) is

  RPCMOUNTDOPTS="--manage-gids -N 2 -N 3"

With this restriction in place (disallow NFSv2 and NFSv3 exports), autofs running on Ubuntu 18.04 is correctly mounting home directories from an Ubuntu 18.04 NFS server.


Unfortunately if I switch to an Ubuntu 16.04 server with exactly the same configuration, it doesn't seem to work. I can mount directories by hand:

================================
root@viper:~# df -h /mnt
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       228G  9.2G  207G   5% /
root@viper:~# mount -t nfs4 snakeskin:/home/pgoetz /mnt
root@viper:~# df -h /mnt
Filesystem              Size  Used Avail Use% Mounted on
snakeskin:/home/pgoetz   55G   52M   53G   1% /mnt
================================

But automounter (version 5.1.2) gives me these error messages when I attempt to login remotely:

These are the messages up to and including the ssh connection, but before authenticating
=============================================================
root@viper:~# automount -f -v --debug
Starting automounter version 5.1.2, master map /etc/auto.master
using kernel protocol version 5.02
lookup_nss_read_master: reading master file /etc/auto.master
do_init: parse(sun): init gathered global options: (null)
lookup_read_master: lookup(file): read entry /home
master_do_mount: mounting /home
automount_path_to_fifo: fifo name /var/run/autofs.fifo-home
lookup_nss_read_map: reading map file /etc/auto.home
do_init: parse(sun): init gathered global options: (null)
mounted indirect on /home with timeout 300, freq 75 seconds
st_ready: st_ready(): state = 0 path /home
handle_packet: type = 3
handle_packet_missing_indirect: token 46, name pgoetz, request pid 1723
attempting to mount entry /home/pgoetz
lookup_mount: lookup(file): looking up pgoetz
lookup_mount: lookup(file): pgoetz -> snakeskin:/home/&
parse_mount: parse(sun): expanded entry: snakeskin:/home/pgoetz
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("snakeskin:/home/pgoetz") -> snakeskin:/home/pgoetz
parse_mount: parse(sun): core of entry: options=, loc=snakeskin:/home/pgoetz
sun_mount: parse(sun): mounting root /home, mountpoint pgoetz, what snakeskin:/home/pgoetz, fstype nfs, options (null) mount_mount: mount(nfs): root=/home name=pgoetz what=snakeskin:/home/pgoetz, fstype=nfs, options=(null)
get_nfs_info: called with host snakeskin(128.83.133.19) proto 6 version 0x30
get_nfs_info: called with host snakeskin(128.83.133.19) proto 17 version 0x30
mount(nfs): no hosts available
dev_ioctl_send_fail: token = 46
failed to mount /home/pgoetz
st_readmap: state 1 path /home
handle_packet: type = 3
handle_packet_missing_indirect: token 47, name pgoetz, request pid 1723
dev_ioctl_send_fail: token = 47
re-reading map for /home
lookup_nss_read_map: reading map file /etc/auto.home
do_init: parse(sun): init gathered global options: (null)
st_ready: st_ready(): state = 4 path /home
=============================================================

And after successfully authenticating and getting dumped into /, I get many iterations of this message:

=============================================================
re-reading map for /home
lookup_nss_read_map: reading map file /etc/auto.home
do_init: parse(sun): init gathered global options: (null)
failed to mount /home/pgoetz
st_ready: st_ready(): state = 4 path /home
handle_packet: type = 3
handle_packet_missing_indirect: token 59, name pgoetz, request pid 1723
attempting to mount entry /home/pgoetz
lookup_mount: lookup(file): looking up pgoetz
lookup_mount: lookup(file): pgoetz -> snakeskin:/home/&
parse_mount: parse(sun): expanded entry: snakeskin:/home/pgoetz
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("snakeskin:/home/pgoetz") -> snakeskin:/home/pgoetz
parse_mount: parse(sun): core of entry: options=, loc=snakeskin:/home/pgoetz
sun_mount: parse(sun): mounting root /home, mountpoint pgoetz, what snakeskin:/home/pgoetz, fstype nfs, options (null) mount_mount: mount(nfs): root=/home name=pgoetz what=snakeskin:/home/pgoetz, fstype=nfs, options=(null)
get_nfs_info: called with host snakeskin(128.83.133.19) proto 6 version 0x30
get_nfs_info: called with host snakeskin(128.83.133.19) proto 17 version 0x30
mount(nfs): no hosts available
dev_ioctl_send_fail: token = 59
failed to mount /home/pgoetz
st_readmap: state 1 path /home
handle_packet: type = 3
handle_packet_missing_indirect: token 60, name pgoetz, request pid 1723
dev_ioctl_send_fail: token = 60
re-reading map for /home
lookup_nss_read_map: reading map file /etc/auto.home
do_init: parse(sun): init gathered global options: (null)
handle_packet: type = 3
st_ready: st_ready(): state = 4 path /home
handle_packet_missing_indirect: token 61, name pgoetz, request pid 1723
attempting to mount entry /home/pgoetz
lookup_mount: lookup(file): looking up pgoetz
lookup_mount: lookup(file): pgoetz -> snakeskin:/home/&
parse_mount: parse(sun): expanded entry: snakeskin:/home/pgoetz
parse_mount: parse(sun): gathered options:
parse_mount: parse(sun): dequote("snakeskin:/home/pgoetz") -> snakeskin:/home/pgoetz
parse_mount: parse(sun): core of entry: options=, loc=snakeskin:/home/pgoetz
sun_mount: parse(sun): mounting root /home, mountpoint pgoetz, what snakeskin:/home/pgoetz, fstype nfs, options (null) mount_mount: mount(nfs): root=/home name=pgoetz what=snakeskin:/home/pgoetz, fstype=nfs, options=(null)
get_nfs_info: called with host snakeskin(128.83.133.19) proto 6 version 0x30
get_nfs_info: called with host snakeskin(128.83.133.19) proto 17 version 0x30
mount(nfs): no hosts available
dev_ioctl_send_fail: token = 61
=============================================================

I tried monitoring the NFS server logs, but didn't see anything there. Am at a complete loss as to why this isn't working on 16.04.


--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux