zfs/snapshot-capable jail with iocage under FreeNAS?

Status
Not open for further replies.

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
Hello,

is there a way to create a jail with iocage which is ZFS/snapshot capable? The reason why I am asking is that I would like to create a jail to run zrepl in it to backup/replicate some FreeBSD servers to it. I know that there is the jail_zfs property for this but whatever I try to set in
jail_zfs_dataset as dedicated dataset for the jail the jail crashes on restart.

Any ideas?

Henning
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
It's not clear (at least to me) what you really want to do here...

Run a jail, have some process inside that jail go out and get data from other servers and then once you have that data, take a snapshot of it?

Jails (iocage) are their own dataset, with a child dataset called root representing the start of the jail filesystem. If you snapshot the pool/volume in which your jails run with the recursive option, the jails and their filesystems are also going to get a snapshot.

The real question is why would you want to do what you're saying?... why not just use a replication job to sync the data to another pool? Are you intending that this snapshot is some kind of backup? (to be clear, a snapshot can't be considered as a backup, although it may aid in some backup and restore activities).
 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
Hi sretella

I guess I didn't make my question clear enough. I want use zrepl as ZFS replication management tool to replicate snapshots from my FreeBSD Nextcloud server and from my mail server to my home FreeNAS system. As zrepl is not a part of FreeNAS I thought I could install it in a jail but for having it to work there it would be necessary to create/modify datasets/snapshots from within the jail...

Regards

Henning
 

fracai

Guru
Joined
Aug 22, 2012
Messages
1,212
zrepl is in FreeBSD ports and it looks like there aren't any runtime dependencies. You may be able to download the package and install it in your home folder. Or build it yourself. It is not recommended to use "pkg install" outside of a jail, but this sounds like a self contained binary that you could bring in without issue. It wouldn't be any different from running a python script via FreeNAS cron. Caveat emptor.

Better though, make a feature request for including it in the FreeNAS release.
 

Henning Kessler

Contributor
Joined
Feb 10, 2015
Messages
143
hi fracai,

sounds really like I should try it that way, thanks for the info.

feature request has already be done here. Does sound that good ;-|

henning
 
Status
Not open for further replies.
Top