Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Aug 2012 15:32:18 -0600
From:      John Nielsen <lists@jnielsen.net>
To:        Darek M <fafaforza@gmail.com>
Cc:        freebsd-jail@freebsd.org
Subject:   Re: Quotas inside jails
Message-ID:  <6B11ADF9-5B11-41CD-BDAC-6F8236FC1E4C@jnielsen.net>
In-Reply-To: <CANDt73drFBbfmNN8ZYkn9VdUuDO60JEn8Ks1ZFgsaiDqnbpxLA@mail.gmail.com>
References:  <CANDt73drFBbfmNN8ZYkn9VdUuDO60JEn8Ks1ZFgsaiDqnbpxLA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Aug 30, 2012, at 2:52 PM, Darek M <fafaforza@gmail.com> wrote:

> playing around with setting quotas inside a jail.  Configured and
> tested them on the host, configured a quota for a jail user, but it
> isn't being enforced.  I attempted to set
> security.jail.param.allow.quotas to 1, from command line, from
> /etc/sysctl.conf, and from /boot/loader.conf, but it remains set to
> '0'.
>=20
> Am I looking at the right sysctl?  If not, where should I be looking?
> If yes, why does it appear to be immutable?

I'm assuming you have basically one UFS filesystem for all your jails. =
Is that the case? If so, do you have quotas enabled on the host? See the =
handbook if you haven't already:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/quotas.html

> I'm doing this on a 9.0-RELEASE system

Another way to set hard quotas for jails is to give each one its own =
filesystem of fixed size. This is trivially easy with zfs--just create a =
zfs for each jail and set the quota property. To use UFS you can create =
image files of whatever size you want, make them md(4) devices, and then =
newfs(8) and mount(8) them. Unlike the method in the handbook, neither =
of these options requires kernel quota support.

JN




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6B11ADF9-5B11-41CD-BDAC-6F8236FC1E4C>