Date: Sat, 23 Apr 2011 08:49:12 +0200 From: =?utf-8?Q?Eirik_=C3=98verby?= <ltning@anduin.net> To: "J. Hellenthal" <jhell@DataIX.net> Cc: "freebsd-jail@freebsd.org" <freebsd-jail@freebsd.org> Subject: Re: limiting jail size Message-ID: <3253BA18-4971-4CE1-BAFF-00CE9029EC1B@anduin.net> In-Reply-To: <20110423021705.GA30454@DataIX.net> References: <BANLkTimCB-0no0vH07u6CQ0%2B81YXB2c=Rg@mail.gmail.com> <4785B5A9-27FC-43F2-A942-23488A932A96@anduin.net> <20110423021705.GA30454@DataIX.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 23. apr. 2011, at 04:17, "J. Hellenthal" <jhell@DataIX.net> 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 <mh.unet@gmail.com> 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 > # <install your environment to /exports/jail1> > # <add whatever else is needed to rc.local or rc.conf> >=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3253BA18-4971-4CE1-BAFF-00CE9029EC1B>