-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENHANCEMENT] support zfs jailed datasets #353
Comments
any interest in this? |
This looks interesting. Happy to discuss more; thank you for offering to implement. Due to the changes required for rc.conf and jail.conf I'd recommend building into I don't have time to implement myself but will gladly review a pull request if you come up with something. |
I have a use for this feature as well. It's mostly possible to get this working with So far I did this:
This is similar to the steps listed above. Setting zfs_enable might be better than editing the jail fstab, I'm not sure. Invoking Regarding the implementation, adding |
This is exactly what I was looking for |
fwiw for anyone interested in delegating ZFS datasets to bastille jails, here are my additions to the bastille-generated
|
Should also have this but it doesn't seem to matter much.
|
I've added this to the roadmap for an upcoming release. Thank you for your patience. 😄 |
Why not just mount the directories into the jail using "bastille mount"? |
This does not provide the same amount of user control as a delegated zfs dataset. When |
What about creating a template with the CONFIG hook applying all the above properties to your jail?
etc... You could also have ARGS on top like JAILNAME and replace args in the strings like
Then it can be applied to each jail using the template command. |
I'll give the template approach a try, @tschettervictor! |
Is your feature request related to a problem? Please describe.
I would like a largely disposable jail, where the data lives in a jailed zfs dataset,
that is separate to the bastille jail tree. This enables rebuilding jails as needed,
for fast updates, and only dropping in a small number of config files into the jail,
leaving the large dataset outside the bastille tree, which simplifies backups and
sysadmin work.
Given a single bastille jail (possibly built from a template), I would like to have:
this enables using jails ephemerally, with the following structure:
zroot/jailed/:jail/var/www/nginx
-> inside the jail/var/www/nginx
zroot/bastille/jails/:jail/root
-> the main jail root filesystemDescribe the solution you'd like
user must prepare the following dataset:
when jail is created, bastille needs to:
zfs_dataset
or similar property from config, naming the root datasetzroot/jailed/alcatraz
from aboveallow.mount.zfs=1 enforce_statfs=1
zfs_enable=YES
to jail's/etc/rc.conf
or similar/usr/local/jail.conf
) to do the mounting, if the above zfs_enable won't do it alreadyThis example, taken from iocell, shows the outcome:
Describe alternatives you've considered
nullfs mounts. easy, but we want 2 things:
zfs jail ..
does this for usAdditional context
Happy to get involved implementing this with some indication of where the various options/code would be best added.
The text was updated successfully, but these errors were encountered: