Files in DataSet not visible in Jail but files in same directory structure (non dataset) are visable all with same permissions.

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
Version:
TrueNAS-13.0-U5.3

I have a directory /mnt/data with 10 folders in it. I never set those folders up as datasets and now I want to to be able to manage them better. I have converted 1 to dataset and have issues.

The problem is that when I convert a directory to a dataset my jails can't see it.

/mnt/data/
├─ Folder1 - plain old mkdir directory.
├─ Folder2 - used to be plain old directory. migrated to a zfs dataset.

A Working Directory:
/mnt/data/folder1 is just a normal folder/directory
  • user1:user1 permissions matching all folders below it.
  • I can browse it in the truenas shell.
  • I can browse it on another machine as a SMB share.
  • The jails that mount /mnt/data can see this folder and its contents perfectly.

A Non Working Directory/Dataset
/mnt/data/folder2 is a dataset in the same directory as Folder1 above.
  • user1:user1 permissions matching all folders below it.
  • I can browse it in the truenas shell.
  • I can browse it on another machine as a SMB share.
  • The jails that have access to /mnt/data the folder is there but blank.
    • Also true if I use the truenas shell and go to /iocage/jail/jail1/root/media. Folder is there but blank.
I simply converted it to a dataset. The only thing different is the .zfs folder added and it tracks as a dataset instead of a folder. I set all the permissions identical to other folders in the subdirectory but it just isn't there.

I have a second machine I setup from the start as a datasets and that has always worked. I has to be the conversion but I'm stumped.

Any help appreciated.

J
 

garm

Wizard
Joined
Aug 19, 2017
Messages
1,556
Jails gets to "see" datasets via nullfs(5), the way it works is that the kernel creates a loopback device for a specific filesystem. Each dataset is its own file system and you cannot traverse them with nullfs. So if you have nested datasets and you want to preserve the structure in a jail, you need to mount each dataset accordingly.
 

jstore

Dabbler
Joined
Nov 6, 2022
Messages
26
That worked. Just create a seperate mount point in the jails to /mnt/data/folder2 and it works perfectly. Thank you so much. I knew it must be something. I will just have to create them individually as I migrate them.
 
Top