Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

How to create /etc/exports for NFSv4?

Sat Nov 19, 2016 10:16 am

I don't understand how to configure for the new NFSv4?
In the exportsfile there is an example:

Code: Select all

# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
My old exports did looks like:

Code: Select all

/home/ewh 192.168.2.0/24 (rw)
Please help to change my old export to the new standard

User avatar
PeterO
Posts: 5138
Joined: Sun Jul 22, 2012 4:14 pm

Re: How to create /etc/exports for NFSv4?

Sat Nov 19, 2016 10:30 am

I just checked on my MINT-17 machine, and it seems to be using NFSV4 and my /etc/exports file looks like it always did (i.e. the V3 example )

Have you tried it ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: How to create /etc/exports for NFSv4?

Sat Nov 19, 2016 10:45 am

Yes. But not working I do have allready several days trouble mounting
Sometimes it works. Most off the times not
I re-installed severall times everything. Sometimes it works then, sometimes not.
If it works it is until a updat/upgrade

It makes me crazy

User avatar
PeterO
Posts: 5138
Joined: Sun Jul 22, 2012 4:14 pm

Re: How to create /etc/exports for NFSv4?

Sat Nov 19, 2016 11:27 am

How does it fail ? Anything in log files when it works or fails ?

PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Canedje
Posts: 265
Joined: Thu Mar 26, 2015 7:18 am

Re: How to create /etc/exports for NFSv4?

Sat Nov 19, 2016 11:51 am

Thats one off the problems.
There are not realy error files for mounting.

if I try to mount:
sudo mount -v -t nfs 192.168.2.202:/home/ewh /mnt/PI

Code: Select all

mount.nfs: timeout set for Sat Nov 19 12:49:29 2016
mount.nfs: trying text-based options 'vers=4,addr=192.168.2.202,clientaddr=192.168.2.185'
mount.nfs: mount(2): Connection refused
sudo exportfs at the other RPI shows:
sudo exportfs

Code: Select all

/home/ewh       192.168.2.202
/home/ewh       <world>
The nfs kernel is running
RPCbind is running

That all looks correct

EDIT:
It is running again.
It looks like something is wrong after update/upgrade with the nfs kernel
If I do:

Code: Select all

sudo /etc/init.d/nfs-kernel-server restart
The mount is working again

Return to “Troubleshooting”