Page 1 of 1

NFSv4 bug

Posted: 10 Feb 2019 19:21
by maarten
Unfortunately I still cannot get exporting NFSv4 directories to work with XigmaNAS.
Clients are able to mount but when I want to read the mountpount,e.g. ls -al /mnt/mountpoint always gives Input/output error.

What can I do, has to be done to get it work?

Thanks, Maarten

Re: NFSv4 bug

Posted: 10 Feb 2019 22:33
by ms49434
maarten wrote:
10 Feb 2019 19:21
Unfortunately I still cannot get exporting NFSv4 directories to work with XigmaNAS.
Clients are able to mount but when I want to read the mountpount,e.g. ls -al /mnt/mountpoint always gives Input/output error.

What can I do, has to be done to get it work?

Thanks, Maarten
Sounds more like a configuration problem than a bug.
This error message usually appears on the client when an NFS V4 root has been configured but no exports have been defined.
Please read the definition of the exports configuration file: exports

Re: NFSv4 bug

Posted: 11 Feb 2019 20:51
by maarten
ms49434 wrote:
10 Feb 2019 22:33
maarten wrote:
10 Feb 2019 19:21
Unfortunately I still cannot get exporting NFSv4 directories to work with XigmaNAS.
Clients are able to mount but when I want to read the mountpount,e.g. ls -al /mnt/mountpoint always gives Input/output error.

What can I do, has to be done to get it work?

Thanks, Maarten
Sounds more like a configuration problem than a bug.
This error message usually appears on the client when an NFS V4 root has been configured but no exports have been defined.
Please read the definition of the exports configuration file: exports
Client is working fine. I have Raspberry SBC running NFS server and everyhthing is workig fine.

I think that it is a XigmaNAS fault

NFSv4 NOT enabled (works fine with client)
(1) cat /etc/exports

Code: Select all

/mnt/shared_folder -mapall=root -network 192.168.0.0 -mask 255.255.255.0
(2) showmount -e 192.168.0.2
Exports list on 192.168.0.2:

Code: Select all

/mnt/shared_folder 192.168.0.0
[NOTE: netmask in casu /24 is omitted]

NFSv4 enabled (client cannot mount or can mount but accessing share remotely on client gives Input/output error)
(1) cat /etc/exports

Code: Select all

V4: /mnt/shared_folder -network 192.168.0.0 -mask 255.255.255.0
[NOTE: mapall=root is omitted in /etc/exports when NFSv4 is enabled]

(2) showmount -e 192.168.0.2 [NOTE: is empty, no exports shown]

In short when enabling NFSv4 option in Xigmanas:
(1) the shared folder is not exported !
(2) "map to root" option is not exported (-mapall=root is omitted from line in /etc/exports)

Re: NFSv4 bug

Posted: 12 Feb 2019 00:13
by ms49434
Your configuration confirms an incomplete setup.
I kindly ask you again to read the documentation of the exports configuration file: exports

Step 1: Configure the NFS service (enable NFSv4):
services_nfs.png
Step 2: Set NFSv4 root:
services_nfs_share_v4.png
Step 3: Add export:
services_nfs_share_export.png
Result:
services_nfs_share.png
The exports file is:

Code: Select all

xigmanas: ~# cat /var/etc/exports 
V4: /mnt/p1/shared_folder -network 192.168.0.0 -mask 255.255.255.0
/mnt/p1/shared_folder -mapall=root -network 192.168.0.0 -mask 255.255.255.0
xigmanas: ~# 
The client machine (Ubuntu 18.10) reports:

Code: Select all

#showmount -e 192.168.0.44
Export list for 192.168.0.44:
/mnt/p1/shared_folder 192.168.0.0

Re: NFSv4 bug

Posted: 12 Feb 2019 03:19
by maarten
UPDATE II: I CHEERED TO EARLY

Now mounting NFSv4 on client works but rsync to remote shared_folder does not work anymore (worked with NFSv3)
drwxr-xr-x 8 nobody 4294967294 512 Dec 6 02:30 shared_folder

I will stick to NFSv3 for XimaNAS.

Thanks again for the help.

UPDATE: I HAVE REPEATED PROCEDURE A SECOND TIME, NOW IT WORKS

THANKS !!

Followed your suggestions... to add shared_folder twice (one as NFSv4 root) still does not work work Xigmanas:

client can mount but get error:

root@DietPi:~# ls -al /mnt/shared_folder
ls: reading directory '/mnt/shared_folder': Input/output error
total 0

root@DietPi:~# ls -al /mnt/
total 12
drwxr-xr-x 4 root root 4096 Feb 10 18:58 .
drwxr-xr-x 9 root root 4096 Feb 10 23:42 ..
drwxrwxr-x 2 dietpi dietpi 0 Nov 21 18:14 audio
drwxr-xr-x 8 nobody 4294967294 512 Dec 6 02:30 shared_folder

Apparently exported folder is not mapped to root and a very strange group.