[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] ZFS? [WAS] Re: Problem with "archive" command in 3.0b



Philipp Wuensche wrote:
> Philipp Wuensche wrote:
>> More on monday.
> 
> Got to the server a bit earlier, so for the early adopters:
> http://outpost.h3q.com/patches/ZFS-ezjail/
> 
> Take a look at ezjail.conf, you need to set
> 
> ezjail_use_zfs="YES"
> ezjail_jailzfs="tank/jails"
> 
> The jailzfs-filesystem will be mounted to the path set in ezjail_jaildir.

In some ways like this approach since it is a bit more generic than the
what I have been doing: i.e. creating a directory to use as a mountpoint
under the usual /usr/jails and then using: zfs set property="" to adjust
the mount point of each zfs based jail's filesystem to /usr/jail/jailname
... (see my previous posts).

Your approach is simple and is more "all or nothing", correct?  I have a
mix of zfs based jails and normal and image based jails. With your
modifications and "ezjail_use_zfs" set, "ezjail-admin create jailname"
would always create zfs based jails, right?.  I think your approach might
be the best way to approach ZFS integration. My idea was to add it as
another jail type, but this is more for small scale experimentation and
can be done "outside" of ezjail.  It's probably better to add lots of
useful ZFS features and then either turn them on or leave them off in much
the same way FreeBSD base system does.

You get my support :) One thing interesting to explore when ZFS is used
would be the implications for ezjail's basejail and symlink approach and
features like zfs cloning. I'm not sure how a feature like cloning would
effect updating a basejail and its children, managing flavours, etc. The
"symlink to basejail" approach is very powerful, but cloning the basejail
seems to create what looks a full traditional jail from the inside while
still being efficient with disk space. ...

> Should be possible to do the following on a fresh system:
> 
> ezjail-admin update -i
> ezjail-admin create testjail 127.0.0.1
> ezjail-admin detele -w testjail
> 
> I'm not sure if the script still works with ZFS disabled in ezjail.conf

Hmm do you mean inside rc.conf? I didn't notice any issue using
ezjail-admin on a non ZFS enabled system *without* ezjail_use_zfs="YES"
set.  I suppose if ezjail.conf contains ezjail_use_zfs="YES" but rc.conf
does not enable zfs then a meaningful error should be issued:  "If you
wish to use ZFS features with ezjail, please enable ZFS on your system and
create a ZFS heirarchy at the location indicated in your ezjail.conf
ezjail_jailzfs="tank/jails". See [reference] for details on configuring
zfs on your system".  ....

The manual pages on FreeBSD come straight from OpenSolaris so I am not
sure to which resource the message should refer in directing the user to
RTFM ... I guess the handbook page:

file:///usr/share/doc/en_US.ISO8859-1/books/handbook/filesystems-zfs.html

> DISCLAIMER: this is nothing official, use at your own risk!

Ulp! ;-)