using zfs and unionfs together, does zfs need to be extended?

George Hartzell hartzell at alerce.com
Mon Jul 7 17:59:25 UTC 2008


Kris Kennaway writes:
 > George Hartzell wrote:
 > > I'd like to be able to set up a large-ish number of very similar
 > > jails, with a minimum of fuss and take advantage of zfs' cool
 > > features.  I'd like to use unionfs to do this, but zfs' lack of
 > > whiteout support seems to make it impossible.  [jump to the bottom if
 > > you want to skip the setup and get to the questions]
 > > 
 > > It seems like the most popular way to set up jails these days uses
 > > read-only nullfs mounts of a base system and symbolic links into a
 > > read-write nullfs mount for each jail's specific stuff (etc,
 > > /usr/local, etc...).
 > 
 > The "ZFS way" is to just clone your jail filesystem into each jail instance.

Both the nullfs approach used by ezjail and described in the handbook
and the unionfs approach make updates *much* easier.  A change/update
to the jail base is automatically visible in all of the jails.

As I understand a zfs clones (and a quick test backs this up), they're
copies of the original filesystem, based on a snapshot.  Once they're
cloned they no longer "see" updates to the base system.

I'm not even sure that you get the space savings, I just did a zfs
snapshot and then a zfs clone and du -sH on the two filesystems
reports the same size.  That seems odd though (with all the copy on
write stuff available), but....

g.


More information about the freebsd-fs mailing list