From owner-freebsd-jail@FreeBSD.ORG Sat Apr 23 06:49:22 2011 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 836671065693 for ; Sat, 23 Apr 2011 06:49:22 +0000 (UTC) (envelope-from ltning@anduin.net) Received: from mail.anduin.net (mail.anduin.net [213.225.74.249]) by mx1.freebsd.org (Postfix) with ESMTP id 417A88FC0A for ; Sat, 23 Apr 2011 06:49:21 +0000 (UTC) Received: from [84.38.152.7] (helo=[192.168.2.119]) by mail.anduin.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1QDWeb-000PzR-HK; Sat, 23 Apr 2011 08:49:17 +0200 References: <4785B5A9-27FC-43F2-A942-23488A932A96@anduin.net> <20110423021705.GA30454@DataIX.net> In-Reply-To: <20110423021705.GA30454@DataIX.net> Mime-Version: 1.0 (iPhone Mail 8G4) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Message-Id: <3253BA18-4971-4CE1-BAFF-00CE9029EC1B@anduin.net> X-Mailer: iPhone Mail (8G4) From: =?utf-8?Q?Eirik_=C3=98verby?= Date: Sat, 23 Apr 2011 08:49:12 +0200 To: "J. Hellenthal" X-SA-Exim-Connect-IP: 84.38.152.7 X-SA-Exim-Mail-From: ltning@anduin.net X-SA-Exim-Scanned: No (on mail.anduin.net); SAEximRunCond expanded to false Cc: "freebsd-jail@freebsd.org" Subject: Re: limiting jail size 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: Sat, 23 Apr 2011 06:49:22 -0000 On 23. apr. 2011, at 04:17, "J. Hellenthal" wrote: > On Fri, Apr 22, 2011 at 07:39:46AM +0200, Eirik =C3=98verby wrote: >> Hi, >>=20 >> No problem. Use ZFS :) >> And dozens or even hundreds of jails are possible; limited only by RAM an= d kern.maxfiles .. >>=20 >> /Eirik >>=20 >> On 22. apr. 2011, at 06:31, Mickey Harvey wrote: >>=20 >>> I was wondering if there is an easy way to limit the amount of hard driv= e >>> space a jail can take up. Say I have 20 jails on a system would this eve= n be >>> possible? >=20 > ZFS is not the only way to limit the jails there certainly is an > abundance of other things you can work at doing to if your limited. >=20 > For example: > # mkdir /exports/jail1 > # truncate -s 2g /exports/jail1.vnode > # mdconfig -f /exports/jail1.vnode > # newfs -O2 /dev/md0 > # mount /dev/md0 /exports/jail1 > # > # >=20 > And you now have a 2G portable jail without all the copy this here that > there mess if you have to back it up just copy the file over to another > jail to adjust for a second running jail and so on. I used to do this, and still do for some static/embedded stuff. I changed to= ZFS though for most jails - that gets you a whole lot of other benefits lik= e quotas, compression, better snapshots, etc.=20 /Eirik > This is slightly incomplete to a full setup but should be enough to > paint the beginning of the picture for you. >=20 >=20 > Happy Trees! >=20 > --=20 >=20 > Regards, > J. Hellenthal > WWJD >=20