Unable to NFS share child dataset if parent dataset is shared (and vice-versa)

theFra985

Cadet
Joined
Nov 27, 2023
Messages
3
Hi,
I'm having issues while trying to configure my shared file structure from my TrueNAS scale installation. I'm currently using TrueNAS-SCALE-22.12.4.2.
My final objective would be to share the whole pool structure (or at least most of it) using NFS to a specific local network.
In the previous train (anglefish if I remember correctly) I was able to configure a share for each child dataset including parent and descendent children.
After switching train if I try to share a child dataset of an already shared parent or a parent of an already shared child dataset I encounter the error "/mnt/pool/dataset/childdataset is a subtree of /mnt/pool/dataset and already exports this dataset for {'192.168.2.0/24', '192.168.1.0/24'}" (the two networks are the currently allowed networks on all configured shares).

The issue presents itself even when I use deeper datasets (e.g. /mnt/pool/dataset is shared and I try to share /mnt/pool/dataset/parent/child). I tried it because I thought maybe it was trying to share the folder as a subfolder of the parent instead of the child dataset but that doesn't seem to be the case.

The issue persists even after restarting the service or the whole host. It has been a while since I encountered it but I am approaching it only now.
Am I doing something wrong or misunderstanding the purpose of how NFS sharing is handled on TrueNAS? How can I share a whole datasets structure?
Thanks in advance for any help or pointers.
Greetings,
Francesco
 

Eastonboy99

Cadet
Joined
Dec 27, 2023
Messages
1
I am having the same issue. I just updated to TrueNAS-SCALE-22.12.4.2 from TrueNAS-SCALE-22.12.1 where it was working to add a child dataset as an nfs share via the GUI. I'm not sure if this was an intentional update or a bug but NFS does not apply the permissions to child datasets when the parent is shared, making child dataset folders show up as owned by root on any machine that mounts the parent nfs dataset.
 

bluefog

Cadet
Joined
Dec 31, 2023
Messages
1
I'm facing the same issue here on TrueNAS-SCALE-22.12.4.2, but only on one of my datasets. Here's my dataset layout:

1704017626777.png


The issue is with the "baykal" dataset. I cannot create an export for "baykal/media", as it fails with the error:
/mnt/pool0/baykal/media is a subtree of /mnt/pool0/baykal and already exports this dataset for 'everybody', i.e. '*'
Note that the "vostok" dataset seems to allow the export of a child dataset. The primary difference is that baykal is also exported via SMB, can that cause this issue?
 

IroesStrongarm

Dabbler
Joined
Mar 9, 2024
Messages
16
Not sure if this has been solved, but I too am facing this same issue. I'm also on TrueNAS-SCALE-22.12.4.2
 

beagle

Explorer
Joined
Jun 15, 2020
Messages
91
The primary difference is that baykal is also exported via SMB, can that cause this issue?

Yes, SMB shares allow you to access child datasets. For NFS shares, you need to mount each child dataset.
 

IroesStrongarm

Dabbler
Joined
Mar 9, 2024
Messages
16
Yes, SMB shares allow you to access child datasets. For NFS shares, you need to mount each child dataset.

The problem, at least on SCALE-22.12.4.2, is that it won't let us mount the child datasets if the parent is set to everyone. Not sure if that's changed in 23.x
 

IroesStrongarm

Dabbler
Joined
Mar 9, 2024
Messages
16
I updated to SCALE-23.10.2 this weekend. I just tried and the child dataset can be made an NFS share while having the parent dataset, set to @Everyone, also shared. So this has been fixed but requires updating to latest Cobia.
 
Top