Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Jan 2006 14:31:38 +0100
From:      Vladimir Dvorak <dvorakv@vdsoft.org>
To:        =?windows-1250?Q?Bj=F6rn_K=F6nig?= <bkoenig@cs.tu-berlin.de>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: quotas + jail ?
Message-ID:  <43C508BA.1090303@vdsoft.org>
In-Reply-To: <43C505F8.4030307@cs.tu-berlin.de>
References:  <43C4D004.90101@vdsoft.org> <43C505F8.4030307@cs.tu-berlin.de>

next in thread | previous in thread | raw e-mail | index | archive | help
Björn König wrote:

> Vladimir Dvorak schrieb:
>
>> I have simple question - is possible to use quotas in jail(8)
>> environment ?
>> [...]
>>
>> It seems to be impossible ( some kernel restriction ). :-( Is there some
>> way to allow this ? My last idea was to replicate users and groups to
>> "main" system and use quotas from it - but it is not good solution if we
>> have several hundreds users in jail(8).
>
>
> You don't need to replicate users and groups, just use UIDs and GIDs.
> There is a serious disadvantage: if you set quota for a specific UID
> then it affects all users with the same UID in different jails and
> even at the host; I guess this is not what you want.
>
> If you want to restrict the space that can be consumed by a jail then
> you might use memory devices, i.e.
>
> # create 1 GiB file
> $ dd if=/dev/zero of=myjail321 count=16k bs=64k
> $ mdconfig -af myjail321
> md321
> $ mkdir /jail/myjail321
> $ mount /dev/md321 /jail/myjail321
> $ cd /usr/src
> $ make installworld DESTDIR=/jail/myjail321
>
> and so on ...
>
>
> Regards
> Björn
>
Thank you Björn,

I thing it is possible. I will shift existing UIDs ( in jail) to higher
values (50000-> ) and apply quotas on them. I will try to eliminate UID
mixing.

Thank you for your suggestion.

Vladimir



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