one dataset multiple nfs exports

Chavell3

Dabbler
Joined
Jul 8, 2020
Messages
19
Hi everybody,
I've got a question regarding exporting nfs shares.

When I try export multiple nfs share from a single dataset and add the allowed hosts or networks for a nfs export I get a message like this...

EucWTsC.png


when I use the allowed networks, the message is similiar.

So my question, why is it not allowed to share one dataset with different folders with the same settings for either with allowed hosts or allowed networks...
would I have to create single dataset's for each folder to make this possible?

Thanks.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
would I have to create single dataset's for each folder to make this possible?
As I understand the NFS service, yes.

why is it not allowed to share one dataset with different folders with the same settings for either with allowed hosts or allowed networks...
It's probably something to do with file locks and having multiple services contending potentially over locking the same files.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Create only one export with the "alldirs" flag set. Clients will be permitted to mount arbitrary subdirectories.
This is not ZFS specific. NFS always had the one filesystem - one export mapping.
 

Chavell3

Dabbler
Joined
Jul 8, 2020
Messages
19
The problem is those foldes are within completly different folders but one dataset e.g. /mnt/data/NFS/share1 and /mnt/data/SMB/share2 while dataset is data only
so in this case I would have to mount the root folder...
seems I need to restructure my folders...
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
The "alldirs" flag only applies to NFSv3, but isn't there an option to add additional directory paths when creating a NFSv3 share?
 
Top