Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jan 2002 13:24:37 -0700
From:      Samuel J.Greear <dragonk@evilcode.net>
To:        Domas Mituzas <midom@delfi.lt>, Matiss Elsbergs <matiss@bkc.lv>
Cc:        <freebsd-isp@FreeBSD.ORG>
Subject:   Re: Jail quota
Message-ID:  <20020115202931.F38D2218A9@ns1.infowest.com>
In-Reply-To: <20020115134344.G58690-100000@axis.tdd.lt>
References:  <20020115134344.G58690-100000@axis.tdd.lt>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tuesday 15 January 2002 04:46 am, Domas Mituzas wrote:
> Hi there,
>
> > Hello there, fellow owners of all system processes,
> > I believe, that this question has been discussed, and not once.
> > But - here it goes again..
> > How to limit disk usage, when running jail environment?
> > Do I need to setup an user x, set a quota for him, and run a jail as this
> > user?
> > Are there any other ways?
> > rgds, Matis
>
> actually in normal file system quotas are mapped to user ID's. In order to
> have separate quotas for jails, you should:
>
> a) Either to have separate vnode based file system for each jail.
> b) Try to find jailfs extension to nullfs (some guy on IRC told he
> developed it :) Then you'd be able to have separate quotas for distinct
> parts of one filesystem.


Yeah, probably me....
I finished a..  shall we say..  proof-of-concept jailfs.  It was functional,
but extremely evil in the most evil of evil ways.  ..  And didn't do any
locking, either.   :)   --  At the moment I'm in the design phase of getting 
this directly into the FFS quota code.   Not as difficult as it might sound 
at first, as you're basically just instrumenting the quota code to check 
whether you're in a jail or not, and responding appropriately.   Don't hold
your breath, though.

The best way's to do jailquot's that I've so far seen are to either partition
the physical disk to accomodate.  Yeah, lame.   Or use the uber-cool
vn/md devices.  Which has its drawbacks, but works pretty well on systems
that aren't running a ton of jails.   You can also grow these with growfs 
should you want to raise the quota limit, but shrinking is a bit of a problem.

ISPServer.com does jail hosting and uses union mounts with some success
it seems.   You may want to check out their free 30 minute trial to get some
idea of what they're doing.   Then again, union mounts have some issues
which their head jail developer just seems to shrug off.  (yes, i've spoken 
with him).

So, what I'm saying is.  There is no good solution at the moment, but you
may find something that works for you.   :)


> c) Have different uid spaces for each jail (10000-10999,11000-11999,...)
> and set quotas from master system.
>
> Regards,
> Domas Mituzas
> DELFI Internet, UAB
>
>


Lates,
Sam

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




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