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

Re: [ezjail] creating archives under ZFS

Nathan Tice wrote:
> I've got a FreeBSD 8 system with ZFS backed jails.  I'd like to
> reproduce a jail that I've made as several new jails, so I don't have to
> do make a bunch of things from ports (like portupgrade...)
> I would really like to be able to use ZFS's snapshot and clone to
> reproduce an existing system - but it does not seem like this feature
> has been invented yet.

Thats right, this features is not yet in ezjail. Snapshot and clone
would not work anyway, because they create a dependency between the
filesystem the snapshot was created and the filesystem created by clone.
If we would use that, the filesystem with the snapshot could not be
deleted anymore unless we use stuff like zfs promote. I guess if we
would create a feature like that, it would involve zfs send/recv.

Until then, you can alway snapshot/clone or send/recv the jails ZFS
filesystem by hand and create the new jail with ezjail-admin -x -c zfs
to create a jail with preexisting root. To make this work I update
ezjail-admin in the CVS

> So, I figured that I would try archiving and then using ezjail-admin
> create to reproduce the template system.  Alas this does not appear to
> be working, I'm getting this :
> manjushri# ezjail-admin archive web1
> mdconfig: option requires an argument -- f
> usage: mdconfig -a -t type [-n] [-o [no]option] ... [-f file]
>                 [-s size] [-S sectorsize] [-u unit]
>                 [-x sectors/track] [-y heads/cyl]
>        mdconfig -d -u unit [-o [no]force]
>        mdconfig -l [-v] [-n] [-u unit]
>                 type = {malloc, preload, vnode, swap}
>                 option = {cluster, compress, reserve}
>                 size = %d (512 byte blocks), %db (B),
>                        %dk (kB), %dm (MB), %dg (GB) or
>                        %dt (TB)
> Error: Could not attach memory disc.
> manjushri#
> Any suggestions?

This is definitly a bug in ezjail! I fixed it in the CVS version:
https://erdgeist.org/cvsweb/ezjail/ezjail-admin?rev=1.236 so
ezjail-admin archive will not try to attach an image when the jail has
the imagetype zfs.