Successfully mounted nfs share gives 'ls: reading directory 'nfs2/': Input/output error'

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
I decided to try freenas out and have set the box up how ever the nfs share is not wanting to behave. I have used zfsguru in the past and have a linux zfs share that work just fine. freenas how ever does not want to work for me. when mounted in gui it shows an empty folder when from cli i get the io error above.

I looked through system logs and did not see any thing obvious

any thoughts about this would be appriciated.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
FreeNAS version? Client OS? Sharing a dataset or directory? Seen the FreeNAS guide section 12. 3?
Each pool or dataset is considered to be a unique filesystem. Individual NFS shares cannot cross filesystem boundaries.

Post the output of cat /etc/exports in the FreeNAS shell and the exact mount command used in your client OS togehter with the output of nfsstat -m if applicable.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
Code:
mount.nfs4 -vvv -w -o vers=4 10.1.100.101:/mnt/Store/Media /mnt/nfs2 

from ubuntu 18.04 client as well as just a mount.nfs4 wo options i have also used a centos system with the same results. the local media player in the jail also does not see any files on the share.

Code:
/mnt/nfs2 from 10.1.100.101:/mnt/Store/Media
 Flags: rw,relatime,vers=4.0,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=10.1.101.2,local_lock=none,addr=10.1.100.101 


I have tried no mapped users root and a local user added to the nas no changes. the jail has a 10.1.100.x ip as well
Code:
V4:  /   -sec=sys

/mnt/Store/Media -alldirs -maproot="root" 10.1.100.0 10.1.101.0 


drwxrwxrw- 2 nobody 2 Feb 23 17:08 nfs2
is how ls shows the folder when mapped. My linux nfs shares are able to map as root

Code:
 /disks/Steam 10.1.0.0/16(rw,no_root_squash,no_subtree_check,fsid=7) 
above are the settings i use normally in the linux nfs exports file. Since i have not messed with the settings on the zfsguru system in years i was not sure if these options would apply properly to the FreeNAS system or the exact syntax to use if they would work.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
Version:
FreeNAS-11.3-RELEASE
sharing out a dataset which is what I normally do on the linux boxes.

I had only tired sharing out that one dataset as it was the only one i had created on the box.

12.3 per hosts 10.1.100.0/24 gives an error in the ui and leaving it empty also does not make a difference.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
Yes, your client is at 10.1.101.2, so mount succeeds but accessing it gives i/o error.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
Where did you put that? There is an "allowed hosts" and an "allowed networks" section. And of course that has to be entered in the latter.
appairently i did lastnight. tried it again in the right spot and the 10.1.100.x systems are now giving access denied. The jail how ever is able to access files properly. the 10.1.101.x system still io error even with using tcp connection.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Please post again the /etc/exports file from your server. It has changed since you posted it last time? With your old version it could not have worked.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
V4: / -sec=sys
/mnt/Store/Media -alldirs -network 10.1.100.0/24
/mnt/Store/Media -alldirs -network 10.1.101.0/24

I have also tried with no network option no change.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
This looks OK. So is the client on the same subnet as the server?
Check if there are firewall rules on you client or on you router (if the latter is relevant). NFS uses different ports, so it may come to strange results if a part of the needed ports is blocked.
Check the permissions on your shared folder. Depending on how your user configuration is done on the client and the server you need at
least r-x permissions for the world on the shared drive, also check for ACLs on the folders.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
there is no firewall blocking nfs as all systems can use another zfs server on the same subnet running linux zfs. my system is not on the same subnet and can also use those linux zfs systems just fine mounting either nfs 3 or 4 how ever either on the same subnet or not both get errors on mounting the freenas system.
 

phalantice

Cadet
Joined
Feb 23, 2020
Messages
7
with a bit more poking around i can mount /mnt/Store if i try to go in to the data set's with acls i get the io error. I have one that has default permissions which gives access denied. the next one i have full control to all groups and everyone with user and group set to a local user the other has full control on folders and user root.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Depending on how your user configuration is done on the client and the server you need at
least r-x permissions for the world on the shared drive, also check for ACLs on the folders.
Please note without the maproot option on the server, your client root will not be able to enter a shared folder without rights.
 

Kevk

Cadet
Joined
Feb 13, 2020
Messages
4
BMBVK0FU)T0[6H)6~03YL8E.png
0SEH(([%2~761FAMY_]X%10.png


I mount an NFS shared folder on another LINUX and can only access one level of directories.
 
Top