Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Feb 2010 03:08:32 -0500
From:      jhell <jhell@DataIX.net>
To:        Christer Solskogen <christer.solskogen@gmail.com>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: Fwd: Jailcfg - A new tool for creating small(!) jails
Message-ID:  <alpine.BSF.2.00.1002120250310.61799@pragry.qngnvk.ybpny>
In-Reply-To: <c1a0d1561002112323h1902248bj7be343d4e1083687@mail.gmail.com>
References:  <c1a0d1561002110733y575d0681t4feb917deabce531@mail.gmail.com> <c1a0d1561002112323h1902248bj7be343d4e1083687@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



On Fri, 12 Feb 2010 02:23, christer.solskogen@ wrote:
> The homepage for the project is http://code.google.com/p/jailcfg/.
>
>
> ---------- Forwarded message ----------
> From: Christer Solskogen <christer.solskogen@gmail.com>
> Date: Thu, Feb 11, 2010 at 4:33 PM
> Subject: Jailcfg - A new tool for creating small(!) jails
> To: freebsd-jails@freebsd.org, freebsd-questions@freebsd.org
>
>
> Hi!
>
> I've just began scripting a small tool for creating jails, much like
> ezjail. But instead of creating a own basejail, jailcfg mounts /bin,
> /lib, /usr/bin, etc. from root. And this means that the footprint of
> one of "my" jails is just about 3MB :) The script is in very early
> stages, but it's a start. Get it by doing: hg clone
> https://jailcfg.googlecode.com/hg/ jailcfg
> Feedback is welcome!
>
> --
> chs
>

Just for some more idea's to build upon.

You could have a thousand jails at no extra space besides one base jail 
installed at 160M and using zfs snapshot and clone. with no additional 
mounting needed besides the actual jail and its device directory. ;)

The only data that is collected after that is user data which is a good 
thing with no extra cost of system mount points and disk usage.

You could even snapshot a existing ports directory clone it and then set 
its mount point for the jail at no additional space.

Same goes for src, or anything else you could imagine.

After this its a simple little script that spams jails rc.conf and other 
related files to get it ready to go and then spams the main rc.conf with 
correct jail names to start that were just created.

example: ( zfs list -r exports/zones )

NAME                          USED  AVAIL  REFER  MOUNTPOINT
exports/zones                 160M  67.3G    26K  /exports/zones
exports/zones/base            160M  67.3G   160M  /exports/zones/base
exports/zones/base@r203742M      0      -   160M  -
exports/zones/jail1              0  67.3G   160M  /exports/zones/jail1
exports/zones/jail2              0  67.3G   160M  /exports/zones/jail2
exports/zones/jail3              0  67.3G   160M  /exports/zones/jail3
exports/zones/jail4              0  67.3G   160M  /exports/zones/jail4
exports/zones/jail5              0  67.3G   160M  /exports/zones/jail5
exports/zones/jail6              0  67.3G   160M  /exports/zones/jail6

Kind regards,

- -- 

  jhell

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (FreeBSD)

iQEcBAEBAgAGBQJLdQyHAAoJEJBXh4mJ2FR+MOAIAIRU5985Xdcr8cnaptaqDN2A
fGiMZc4bhUQYsQBIPZ7mgA5UjHl6N2DhpHa2jZ2oeZs3BL6vO5IZG9R+JlI00wOo
vCAwsnCriw855dJRifyX8OJCgho9ZNvxtP9t4j3zB+XCsZxml67NwaTrgSt1FPiP
LUUd3ZJHshkmXntbcUvUYRLidjFZdZS96Fdrj711z8AxgmTls0+Nue9MAvGrt4jt
q+tDMC5EYrD5fWWAaeebZjnZkwiEfp0OirygvU8SXkIB75Nq+xHS7j1MSsv3DEtv
iVnYm9b53uW68Sn7tetrwWMDM8VrBoT8yrg3n091pITy/uo3Ei6yh6lllSo+32o=
=3XO4
-----END PGP SIGNATURE-----



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.1002120250310.61799>