Why does my mount point recognize files in directories but not datasets? [SOLVED]

Status
Not open for further replies.

avpullano

Dabbler
Joined
Dec 30, 2012
Messages
42
EDIT: Solved! Thanks to the help of Joshua and paleoN I found out that I needed to mount each dataset separately for them to all be visible in the jail.

Let me preface this by saying that I have searched the forum thoroughly looking for this answer and I am very sorry if it has been answered before. I just can't find a solution.

I am running FreeNAS 8.3.0 on a 64-bit machine with ZFS.

I've set up a mount point for a plugin, it doesn't matter which plugin. The source is in my main volume and the destination is in the jail. The jail is within the main volume but the source and destination are not recursive. The location that the mount point refers to contains 5 folders: /Gabriella, /Music, /Photos, /Pictures, and /Videos. I created the datasets /Music, /Pictures, and /Videos via the FreeNAS web GUI. After creating the mount point, I navigated to the destination folder (within the jail) via Windows explorer (this entire volume is a CIFS share, as well) and found all three folders empty.

I assumed that my mount point was set up incorrectly, but then my sister added her own directory /Gabriella via the Windows explorer "new folder" button. Now, when I navigated to the destination folder in the jail via Windows explorer, I could see the files in the /Gabriella folder. To test this further, I made another folder through Windows called /Photos and threw some test files in there. Lo and behold, it worked!

So, my mount point was working all along, it just cannot see any files in the ZFS datasets that I created via the FreeNAS web GUI. Forum researches tell me that this may be a permissions issue, but after changing the /Videos owner and group to match the properly functioning directors AND calling chmod 777 /usr/pbi/minidlna-amd64/myMedia/Videos, I still cannot see any files in this dataset from within the jail.

Here is the output of ls -l after I modified the owner and group of /Videos:
drwxrwxrwx 3 1001 guest 3 Feb 4 20:17 Gabriella
drwxrwxrwx 2 root wheel 2 Dec 30 23:32 Music
drwxrwxrwx 2 1001 guest 7 Feb 5 21:46 Photos
drwxrwxrwx 2 root wheel 2 Dec 30 23:52 Pictures
drwxrwxrwx 2 1001 guest 2 Dec 30 23:52 Videos

Is this really a permissions issue or am I missing something else? Why can the jail see files in directories but not files in ZFS datasets?
 

Joshua Parker Ruehlig

Hall of Famer
Joined
Dec 5, 2011
Messages
5,949
Let me preface this by saying that I have searched the forum thoroughly looking for this answer and I am very sorry if it has been answered before. I just can't find a solution.

I am running FreeNAS 8.3.0 on a 64-bit machine with ZFS.

I've set up a mount point for a plugin, it doesn't matter which plugin. The source is in my main volume and the destination is in the jail. The jail is within the main volume but the source and destination are not recursive. The location that the mount point refers to contains 5 folders: /Gabriella, /Music, /Photos, /Pictures, and /Videos. I created the datasets /Music, /Pictures, and /Videos via the FreeNAS web GUI. After creating the mount point, I navigated to the destination folder (within the jail) via Windows explorer (this entire volume is a CIFS share, as well) and found all three folders empty.

I assumed that my mount point was set up incorrectly, but then my sister added her own directory /Gabriella via the Windows explorer "new folder" button. Now, when I navigated to the destination folder in the jail via Windows explorer, I could see the files in the /Gabriella folder. To test this further, I made another folder through Windows called /Photos and threw some test files in there. Lo and behold, it worked!

So, my mount point was working all along, it just cannot see any files in the ZFS datasets that I created via the FreeNAS web GUI. Forum researches tell me that this may be a permissions issue, but after changing the /Videos owner and group to match the properly functioning directors AND calling chmod 777 /usr/pbi/minidlna-amd64/myMedia/Videos, I still cannot see any files in this dataset from within the jail.

Here is the output of ls -l after I modified the owner and group of /Videos:
drwxrwxrwx 3 1001 guest 3 Feb 4 20:17 Gabriella
drwxrwxrwx 2 root wheel 2 Dec 30 23:32 Music
drwxrwxrwx 2 1001 guest 7 Feb 5 21:46 Photos
drwxrwxrwx 2 root wheel 2 Dec 30 23:52 Pictures
drwxrwxrwx 2 1001 guest 2 Dec 30 23:52 Videos

Is this really a permissions issue or am I missing something else? Why can the jail see files in directories but not files in ZFS datasets?

Not permissions, it has to do with the way zfs makes each dataset a separate virtual filesystem with its own properties. so the nullfs mountpoint you create in the freenas gui only gives you access to the virtual filesystem of the directory mounted within the jail. You'd need to nullfs mount each dataset to have access to it from the jail.

I had this problem before with child datasets all being shared with a single nfs mount. Noticed I couldn't enter the child datasets over NFS, and this is why.
 

avpullano

Dabbler
Joined
Dec 30, 2012
Messages
42
Not permissions, it has to do with the way zfs makes each dataset a separate virtual filesystem with its own properties. so the nullfs mountpoint you create in the freenas gui only gives you access to the virtual filesystem of the directory mounted within the jail. You'd need to nullfs mount each dataset to have access to it from the jail.

I had this problem before with child datasets all being shared with a single nfs mount. Noticed I couldn't enter the child datasets over NFS, and this is why.

I definitely didn't know that about ZFS and virtual file systems. So, in order to access three datasets in the jail I need to mount each one to the jail via its own mount point, for a total of three mount points?
 

paleoN

Wizard
Joined
Apr 22, 2012
Messages
1,403
I definitely didn't know that about ZFS and virtual file systems. So, in order to access three datasets in the jail I need to mount each one to the jail via its own mount point, for a total of three mount points?
Semantics, datasets are separate file systems. Yes, you need 3 mount points, what I do actually, or use a single dataset with simple folders instead.
 

avpullano

Dabbler
Joined
Dec 30, 2012
Messages
42
Semantics, datasets are separate file systems. Yes, you need 3 mount points, what I do actually, or use a single dataset with simple folders instead.

Thank you so much! I finally got it to work.

I deleted my old mount point and mounted each of the three datasets (/Videos, /Pictures, and /Music) to three new directories inside of the jail. I can now navigate to those files through from the jail and, more importantly, my plugins can see all of the files. I am truly grateful for your help.
 
Status
Not open for further replies.
Top