Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've set my Raspberry Pi up as an NFS server, but I cannot connect to it with NFS version 4. However, version 3 works. From my Kubuntu 13.04 client:

$ sudo mount -t nfs -o proto=tcp,port=2049,vers=4 192.168.1.91:/export /mnt/pi -v
mount.nfs: timeout set for Tue Sep 17 09:47:26 2013
mount.nfs: trying text-based options 'proto=tcp,port=2049,vers=4,addr=192.168.1.91,clientaddr=192.168.1.7'
mount.nfs: mount(2): Permission denied
mount.nfs: access denied by server while mounting 192.168.1.91:/export
$ sudo mount -t nfs -o proto=tcp,port=2049,vers=3 192.168.1.91:/export /mnt/pi -v
mount.nfs: timeout set for Tue Sep 17 09:47:31 2013
mount.nfs: trying text-based options 'proto=tcp,port=2049,vers=3,addr=192.168.1.91'
mount.nfs: prog 100005, trying vers=3, prot=6
mount.nfs: trying 192.168.1.91 prog 100005 vers 3 prot TCP port 35976

From the server, it seems that NFS version 4 is compiled in the kernel.

$ rpcinfo -p
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100024    1   udp  51953  status
    100024    1   tcp  42383  status
    100003    2   tcp   2049  nfs
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    2   tcp   2049
    100227    3   tcp   2049
    100003    2   udp   2049  nfs
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    2   udp   2049
    100227    3   udp   2049
    100021    1   udp  41873  nlockmgr
    100021    3   udp  41873  nlockmgr
    100021    4   udp  41873  nlockmgr
    100021    1   tcp  35095  nlockmgr
    100021    3   tcp  35095  nlockmgr
    100021    4   tcp  35095  nlockmgr
    100005    1   udp  60943  mountd
    100005    1   tcp  44936  mountd
    100005    2   udp  52342  mountd
    100005    2   tcp  56312  mountd
    100005    3   udp  57888  mountd
    100005    3   tcp  35976  mountd

Server logs at /var/log/messages are unchanged for both attempts. Server logs at /var/log/syslog are unchanged for unsuccessful v4 attempts, but are appended for successful v3 attempts, as follows.

Sep 17 21:48:27 raspberrypi rpc.mountd[24098]: authenticated mount request from 192.168.1.7:1021 for /export (/export)
Sep 17 22:09:12 raspberrypi rpc.mountd[24098]: authenticated mount request from 192.168.1.7:790 for /export (/export)
Sep 17 22:09:51 raspberrypi rpc.mountd[24098]: authenticated mount request from 192.168.1.7:1002 for /export (/export)

Oddly enough, it seems like the port is changing, despite me specifying 2049?

Contents of server's /etc/export

/export       192.168.1.0/24(rw,fsid=0,insecure,no_subtree_check,async,crossmnt)

N.B. this was originally posted at the Raspberry Pi Stackexchange site two weeks ago, but I'm trying here since I haven't had a decent response. I'll delete the other if I get a good response here.

==EDIT==

Contents of /etc/default/nfs-common on the server:

# If you do not set values for the NEED_ options, they will be attempted
# autodetected; this should be sufficient for most people. Valid alternatives
# for the NEED_ options are "yes" and "no".

# Do you want to start the statd daemon? It is not needed for NFSv4.
NEED_STATD=

# Options for rpc.statd.
#   Should rpc.statd listen on a specific port? This is especially useful
#   when you have a port-based firewall. To use a fixed port, set this
#   this variable to a statd argument like: "--port 4000 --outgoing-port 4001".
#   For more information, see rpc.statd(8) or http://wiki.debian.org/SecuringNFS
STATDOPTS=

# Do you want to start the idmapd daemon? It is only needed for NFSv4.
NEED_IDMAPD=yes

# Do you want to start the gssd daemon? It is required for Kerberos mounts.
NEED_GSSD=no
share|improve this question
    
What distro do you have on your RPI box? If it is Raspian, what do you have in the file /etc/default/nfs-common? –  dsmsk80 Sep 27 '13 at 13:39
    
Drop the port from your mount command. –  slm Sep 27 '13 at 13:59
    
@dsmsk80 I've edited the question. Yes, it's Raspian. –  Sparhawk Sep 28 '13 at 0:04
    
@slm: that didn't seem to help. I got identical output for v4. However, I tried omitting port with v3 and this time it tried port 2049 before going to 35976. Then, I tried port 35976 with v4, and this time the error was mount.nfs: mount(2): Protocol family not supported; mount.nfs: Protocol family not supported –  Sparhawk Sep 28 '13 at 0:08
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.