jails multiple jails: zfs clones or dedup?

If I wanted to run a number of jails with very similar contents (say, a number of mostly-identical 13.0-RELASE jails), what's the preferred way to save disk space for all those base systems?

zfs clones of a "baseline" dataset would obviously work, but then dedup would probably accomplish the same (at the cost of some more RAM usage).
With zfs clones, I'm afraid I might "lose the advantage" of the datasets being clones when updating the base systems one-by-one (so that after all the updates, identical files are in all the base systems, but they're no longer in a clone relationship with the "baseline" dataset).

How do you do it?
 
If I wanted to run a number of jails with very similar contents (say, a number of mostly-identical 13.0-RELASE jails), what's the preferred way to save disk space for all those base systems?
Similar to how ezjail or bastille does, create a base jail and use links to mount or direct the base jail to a common image. Because FreeBSD has a nice and clear split between the OS en third party applications this works rather well.

zfs clones of a "baseline" dataset would obviously work, but then dedup would probably accomplish the same (at the cost of some more RAM usage).
A LOT more memory usage.

With zfs clones, I'm afraid I might "lose the advantage" of the datasets being clones when updating the base systems one-by-one (so that after all the updates but they're no longer in a clone relationship with the "baseline" dataset
If you use a "base" then the systems are all linked, update the base and all the base derived jails are updated, so you can't do them one-by-one anymore. It's going to be an all-or-nothing type update. But this would account for the base OS only, software you install (using packages or ports) is separated from this. Unless you plan on extending this "base" beyond /usr/local.
 
Back
Top