-
Notifications
You must be signed in to change notification settings - Fork 33
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
Added Full ZFS Dataset Support #118
Added Full ZFS Dataset Support #118
Conversation
Added Full ZFS Dataset Support: - The script will now create a ZFS dataset for each jail if the 'jailmaker' directory is a ZFS dataset - The script will create the 'jails' directory as a dataset if the 'jailmaker' directory is a ZFS dataset - The script will now remove the ZFS dataset (including snapshots) when deleting the jail - Dual mode: For legacy use without datasets, it will continue to work as previously - The script now lists jails based on the config file existing rather than the directory Tested on 23.10.2 and 24.04-RC1
Thanks! I had a quick look.
Is this change required for the ZFS dataset feature? |
No, it is not, I previously implemented it so that the script checks for config files rather than directories. |
Unfortunately I haven't been able to properly test it yet. I did make some code changes (untested!). What do you think? By the way I haven't made up my mind about this change:
Seems to me like extra complicating things. A jail dir with a config file without a rootfs dir is still useless. And I don't want to encourage users to manually create directories inside the jails dir. Also, this change is unrelated to dataset support. |
Looks much better with relative paths and clean code :) I don't think checking for a config file instead of a directory is overcomplicating things. If anything its straightforward and rules out lots of cases for errors - a directory can be created from someone for lots of reasons, even by accident, a config file is much more specific. |
I think I prefer those directories to be recognized as jails so they show up in the output of |
I hadn't mentioned it before, but good job on implementing the ZFS dataset feature request! 🎉 I think this PR is now ready to be released as jailmaker version 1.1.4. Could you confirm one last time that it's still working as intended? I undid the changes unrelated to #80... |
P.S. it would be awesome if you could write a small migration guide to help users coming from the current plain directories setup transition to the ZFS dataset setup. I'll include it in the release notes. |
Added a guide to migrate from using directories to using ZFS datasets
Thanks a lot :)
Its done :) |
Thank you so much everyone. I've been using Jailamaker since v1.0.0 or v1.0.1 (I feel like it has been longer but all the older releases are deleted. I know I used it before Cobia was stable, that's for sure.) It's been great and things like this just keep making it better. Maybe one day iX will integrate it into TrueNAS and create a GUI for it even. |
New PR superseding #113
Added Full ZFS Dataset Support:
Tested on 23.10.2 and 24.04-RC1