FreeBSD jail not seeing data in ZFS child datasets

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
DISCLAIMER: I created the correct user and group used in the jail and gave it the correct ACL privileges.

When mounting a dataset, it shows child datasets as folders, but in those folders, there is no data.

Do you know how I can recursively mount child datasets when mounting a parent dataset?

EDIT: I have a lot of folders, and mounting these individually and having to keep them in sync by stopping the jail and restarting it is super annoying.
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Don't mount the parent, just make a fake equivalent in the jail and then mount all the children in there.
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
I have to do that for every single dataset?

What happens if I actually store data in a parent dataset that has child datasets? Right now, that's not the case, but I'm curious what happens if I do.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
What happens if I actually store data in a parent dataset that has child datasets?
You would have difficulty with that... it would be a poor dataset structure design for use in a jail.
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
I have a lot of folders, and mounting these individually and having to keep them in sync by stopping the jail and restarting it is super annoying.

Is there an automated process to assign mountpoints all future child datasets and restart the jail after the mountpoints are added?

I have to mount something like 20 datasets right now and potentially more in the future. Remembering all the steps necessary to set this up is a huge pain. That's why it'd be way easier to mount the parent recursively.
 

Sawtaytoes

Patron
Joined
Jul 9, 2022
Messages
221
My thinking at this point is to take all my datasets and make them into a single one.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Subdirectories rather than datasets would be best if there's no reason you need different datasets in your use case.
 
Top