I want to allow management of a ZFS dataset inside of a jail. I created the jail with various sysctls, enabled the dataset jailed property, and set an allow list on the dataset. The good news is that all of this is working -- when the dataset is bound to the jail I can snap, destroy etc.
The rub is the "when the dataset is bound" part: after the jail starts, I need to manually run "zfs jail <jail name> <dataset name>" on the host in order to bind the dataset to the jail. Once I do that, I can use ZFS on the dataset from inside the jail without any issues. What I'm trying to do is get this to happen automatically.
I've tried adding a post-start command into /etc/jail.conf but it didn't work. I don't see any option in the FreeNAS GUI to run anything at different times in the jail lifecycle.
Any advice is appreciated!
The rub is the "when the dataset is bound" part: after the jail starts, I need to manually run "zfs jail <jail name> <dataset name>" on the host in order to bind the dataset to the jail. Once I do that, I can use ZFS on the dataset from inside the jail without any issues. What I'm trying to do is get this to happen automatically.
I've tried adding a post-start command into /etc/jail.conf but it didn't work. I don't see any option in the FreeNAS GUI to run anything at different times in the jail lifecycle.
Any advice is appreciated!