@keithg Forget to say you should nark the thread a solved.
I owe you an apology for going round in circles while trying to help with the issue you had with your nfs shares this week.
Anyone reading this thread will probably think I'm an idiot - and rightly so. I had completely forgotten that when creating NFs shares via the FreeNAS UI there is the (obscure?) option to "
click Add extra path to select multiple paths" to add more than one path to a share.
Your original exports file seemed valid for FreeBSD, but looked odd to me for FreeNAS because I had never used that extra path option.
Using my example again shows how it's possible to share both
pdir1 and
pdir2 without error :
Code:
root@freenas:~ # zfs list | grep nfs
NasPool/nfs_share_parent 272K 17.3G 96K /mnt/NasPool/nfs_share_parent
NasPool/nfs_share_parent/nfs_share_child1 88K 17.3G 88K /mnt/NasPool/nfs_share_parent/nfs_share_child1
NasPool/nfs_share_parent/nfs_share_child2 88K 17.3G 88K /mnt/NasPool/nfs_share_parent/nfs_share_child2
root@freenas:~ # cd /mnt/NasPool/nfs_share_parent;ls -l
total 4
-rw-r--r-- 1 chris chris 2 May 4 12:02 cfile1
drwxr-xr-x 2 chris chris 3 May 3 10:02 nfs_share_child1
drwxr-xr-x 2 chris chris 2 May 3 09:50 nfs_share_child2
drwxr-xr-x 2 chris chris 3 May 4 08:45 pdir1
drwxr-xr-x 2 chris chris 2 May 4 08:51 pdir2
-rw-r--r-- 1 chris chris 0 May 4 08:44 pfile1
-rw-r--r-- 1 chris chris 0 May 4 08:44 pfile2
root@freenas:/mnt/NasPool/nfs_share_parent #
Sharing two directories within the same datasets without error.
Code:
root@freenas:~ # cat /etc/exports
V4: / -sec=sys
/mnt/NasPool/nfs_share_parent/pdir2 /mnt/NasPool/nfs_share_parent/pdir1 -maproot="root":"wheel" -sec=sys 192.168.0.201 192.168.0.11 192.168.0.22 192.168.0.9
9
root@freenas:~ # showmount -e localhost
Exports list on localhost:
/mnt/NasPool/nfs_share_parent/pdir2 192.168.0.201 192.168.0.11 192.168.0.22 192.168.0.99
/mnt/NasPool/nfs_share_parent/pdir1 192.168.0.201 192.168.0.11 192.168.0.22 192.168.0.99
root@freenas:~ #
This is done by adding
/mnt/NasPool/nfs_share_parent/pdir1 as an extra path while creating the share of
/mnt/NasPool/nfs_share_parent/pdir2
None of this explains what went wrong, but might be useful for future reference and give you another option for your share configuration.