From owner-freebsd-jail@FreeBSD.ORG Fri Feb 12 08:31:42 2010 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 121C1106566B for ; Fri, 12 Feb 2010 08:31:42 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-yw0-f174.google.com (mail-yw0-f174.google.com [209.85.211.174]) by mx1.freebsd.org (Postfix) with ESMTP id B9D918FC14 for ; Fri, 12 Feb 2010 08:31:41 +0000 (UTC) Received: by ywh4 with SMTP id 4so2343656ywh.10 for ; Fri, 12 Feb 2010 00:31:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:date:from:to:cc :subject:in-reply-to:message-id:references:user-agent :x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; bh=VW/9TCCvRuDskHXvCqc7foNLQPiInR9uZXLbSYd62t4=; b=qTZZR7Uvq3VrEo7Bm2v2pSMqa4cmeapnDS2Dhl1o75dtjL/6zqpeIXlFXfqLwRcYA/ ZS9XaRyCyIDxesaqCrKIekcjL9TPUq31eMUifykDmD14KQGK6zwDuT2BCZZdagVHS6WK NI8uUJtuD3UVoBMbqhJ9alN5v7hun6Fy0xHdg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:x-openpgp-key-id:x-openpgp-key-fingerprint:mime-version :content-type; b=wkNwMaetxZ8IWkwKGrpcig0DRjLASN83QxCnJcD+Tu/eKDj3VFqBF4QqgIg5teLjJu 4T3Lh1cHZzXBREK8W0Ic2RhaH05Ma2XK9Uiw8vkacOSKWirGLSJoSqFNb3ZrbLNE2Wep +zfGGX5hnX4p3O8JEC+Ru2dnMLS4NiMQQrvrI= Received: by 10.101.82.11 with SMTP id j11mr1499721anl.86.1265962133661; Fri, 12 Feb 2010 00:08:53 -0800 (PST) Received: from centel.dataix.local (ppp-21.67.dialinfree.com [209.172.21.67]) by mx.google.com with ESMTPS id 4sm1277299ywd.59.2010.02.12.00.08.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 12 Feb 2010 00:08:52 -0800 (PST) Sender: "J. Hellenthal" Date: Fri, 12 Feb 2010 03:08:32 -0500 From: jhell To: Christer Solskogen In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-OpenPGP-Key-Id: 0x89D8547E X-OpenPGP-Key-Fingerprint: 85EF E26B 07BB 3777 76BE B12A 9057 8789 89D8 547E MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-jail@freebsd.org Subject: Re: Fwd: Jailcfg - A new tool for creating small(!) jails X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Feb 2010 08:31:42 -0000 -----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 > 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-----