Input/output error when accessing NFS share

Wibly

Cadet
Joined
Jan 31, 2018
Messages
3
I have several NFS shares (one for each dataset), and all but one work fine. I can successfully mount it (no errors when mounting) but when I try to access the data I get an I/O error. Attempting to access via shell gets me
Code:
ls: reading directory '.': Input/output error


This isn't an issue of confusing datasets with directories, and only one NFS share out of seven has this problem.

  • Running FreeNAS-11.1-U4
  • Motherboard: Supermicro X9SRA
  • CPU: Intel Xeon E5-2660
  • 2x16GB ECC RAM
  • 2x8TB+2x4TB in RAIDZ1 (swapping drives out for bigger ones as I get them)
 
Joined
Dec 29, 2014
Messages
1,135
Is it possible you have something in the name of the share or the directory that is causing issues? Try renaming both to something with just lower case characters to see if that is the issue.
 

FreeNasNewbie

Dabbler
Joined
Sep 22, 2014
Messages
11
I have a similar problem here after upgrading to 11.2-U2.1.

Accessing dirs and files locally (server shell) works fine. From the client I can cd into the directory, also into known subdirs, but ls always returns an I/O error. However, upper case doesn't seem to be the issue. I also didn't change any settings of the Share before or after upgrading freenas.

mount returns: <Server-IP>:/mnt/tank/datastore on /datastore type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<Client-IP>,local_lock=none,addr=<Server-IP>)

Client is Ubuntu 18.04 with nfs-common installed.
Client-fstab-entry is <Server-IP>:/mnt/tank/datastore /datastore nfs nofail,rw 0 0
No directory services or other IAM solutions are in place.

Thanks a million
Mat
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
I have a similar problem here after upgrading to 11.2-U2.1.

Accessing dirs and files locally (server shell) works fine. From the client I can cd into the directory, also into known subdirs, but ls always returns an I/O error. However, upper case doesn't seem to be the issue. I also didn't change any settings of the Share before or after upgrading freenas.

mount returns: <Server-IP>:/mnt/tank/datastore on /datastore type nfs4 (rw,relatime,vers=4.1,rsize=131072,wsize=131072,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=<Client-IP>,local_lock=none,addr=<Server-IP>)

Client is Ubuntu 18.04 with nfs-common installed.
Client-fstab-entry is <Server-IP>:/mnt/tank/datastore /datastore nfs nofail,rw 0 0
No directory services or other IAM solutions are in place.

Thanks a million
Mat


What's the output of cat /etc/exports on your FreeNAS box?
 

FreeNasNewbie

Dabbler
Joined
Sep 22, 2014
Messages
11
The command returns
Code:
V4: / -sec=sys
/mnt/tank/datastore -alldirs -mapall="nobody":"nogroup" -network <Network>.0/24
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
You have mis-understood the meaning of the "-alldirs" switch. In this case the answer to the question "when is a subdirectory not a directory" is when it is a dataset. In otherwords the "-alldirs" switch does not apply to nested datasets, because zfs treats each dataset as a separate filesystem.

Here's an example:
Code:
root@freenas:~ # zfs list | grep top
NasPool/topdataset                                         264K  12.6G    88K  /mnt/NasPool/topdataset
NasPool/topdataset/child1                                   88K  12.6G    88K  /mnt/NasPool/topdataset/child1
NasPool/topdataset/child2                                   88K  12.6G    88K  /mnt/NasPool/topdataset/child2
root@freenas:~ # cat /etc/exports    
V4: / -sec=sys
/mnt/NasPool/topdataset -alldirs -maproot="nobody":"nogroup" -network 192.168.0.0/24
root@freenas:~ #


Mounting & accessing in Linux:

Code:
root@debianbox:/# mount -vvvv -t nfs 192.168.0.56:/mnt/NasPool/topdataset /mnt
mount.nfs: timeout set for Fri Mar 22 17:11:35 2019
mount.nfs: trying text-based options 'vers=4.2,addr=192.168.0.56,clientaddr=192.168.0.201'
mount.nfs: mount(2): Protocol not supported
mount.nfs: trying text-based options 'vers=4.1,addr=192.168.0.56,clientaddr=192.168.0.201'
root@debianbox:/# cd /mnt
root@debianbox:/mnt# ls -l
total 2
drwxr-xr-x 4 root root 5 Jan  1 15:42 child1
drwxr-xr-x 4 root root 4 Jan  1 15:40 child2
drwxr-xr-x 2 root root 3 Jan  1 15:38 top_dir1
drwxr-xr-x 2 root root 3 Jan  1 15:39 top_dir2
root@debianbox:/mnt# cd child1
root@debianbox:/mnt/child1# ls -l
ls: reading directory '.': Input/output error
total 0
root@debianbox:/mnt/child1# cd ../top_dir1
root@debianbox:/mnt/top_dir1# ls -l
total 1
-rw-r--r-- 1 root root 0 Jan  1 15:38 file_in_top_dir1
root@debianbox:/mnt/top_dir1#


After a cd to child1, ls -l produces an i/o error as the mount cannot cross filesystem boundary between the "child1" dataset and its parent "topdatset",

There is no i/o error when accessing true subdirectories within datasset "topdaset".
 
Top