NFS and Sharing ZPool + Datasets

Status
Not open for further replies.

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
I'm not really sure how specific to FreeNas this is, but I'm trying to share all datasets under a ZPool over NFS.

Eg:
/mnt/Tank
/mnt/Tank/Dataset1
/mnt/Tank/Dataset2

The issue is if I share just "/mnt/Tank", then the "DatasetX" directories show up as empty directories.

I tried doing an NFS share with multiple paths, sharing both:
/mnt/Tank/Dataset1
/mnt/Tank/Dataset2

But I get an error that says "You cannot share a mount point and subdirectories all at once", which doesn't make much sense to me, as sharing just 1 works fine, and neither is a subdirectory of the other... Is this a bug?

What is the best solution here? I wouldn't want to have to create an NFS share per dataset, as that would create a LOT of shares, and be cumbersome to configure client side.

CIFS doesn't seem to have this problem. How am I supposed to tackle this "issue" with NFS?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Hum... No one? Is my question just stupid, or does no one know?

I really figure this would be a really standard usecase... Isn't this the first thing you'd do when you share an NFS share? I'm sure there are a few people here that have used nfs and could help me.

Thanks.
 
Joined
Mar 6, 2014
Messages
686
The issue is if I share just "/mnt/Tank", then the "DatasetX" directories show up as empty directories.

I tried doing an NFS share with multiple paths, sharing both:
/mnt/Tank/Dataset1
/mnt/Tank/Dataset2

But I get an error that says "You cannot share a mount point and subdirectories all at once", which doesn't make much sense to me, as sharing just 1 works fine, and neither is a subdirectory of the other... Is this a bug?

Did you delete the share "/mnt/Tank" before sharing the datasets? Restarted the service?
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Yeah. I currently did:
- restart the nas.
- restart the service.
- outright delete the share.
- Click "add Unix (nfs) share"
- In "path" put "/mnt/Tank/Dataset1"
- Click "Add extra Path"
- put "/mnt/Tank/Dataset2"
- Click "OK"
- Error message is "You cannot share a mount point and subdirectories all at once"

Your reply seems to indicate that what I'm doing should be working?
 
Joined
Mar 6, 2014
Messages
686
You should just create 1 NFS share for /mnt/Tank/Dataset1 and create some subdirs in there, which you can use as paths. As i understand correctly you are now trying to create 1 share for 2 datasets. From the manual:
When creating the NFS share, keep the following points in mind:
  1. ....
  2. Each volume or dataset is considered to be its own filesystem and NFS is not able to cross filesystem boundaries.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
You should just create 1 NFS share for /mnt/Tank/Dataset1 and create some subdirs in there, which you can use as paths. As i understand correctly you are now trying to create 1 share for 2 datasets. From the manual:
Yes, that's what I'm trying to do. I missed that quote in the docs. Thanks.

What exactly do you mean by: "You should just create 1 NFS share for /mnt/Tank/Dataset1 and create some subdirs in there" ?
 
Joined
Mar 6, 2014
Messages
686
I'm not sure what you are trying to achieve? You already have a lot of datasets? If you do, i think you have to create separate NFS shares for that. If not, just simply create 1 dataset and share it. Create subfolders for your storage needs in there.
 

monarchdodra

Explorer
Joined
Feb 15, 2012
Messages
79
Ok. I thought that's what you meant. In this case, it really has to be 2 distinct data sets, so I can't just merge thm. Well, I'll just create multiple nfs shares then.
 
Joined
Mar 6, 2014
Messages
686
Maybe this can be of use for you.
 
Status
Not open for further replies.
Top