From owner-freebsd-questions@FreeBSD.ORG Wed Jan 11 13:19:51 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 481C516A41F for ; Wed, 11 Jan 2006 13:19:51 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from efacilitas.de (smtp.efacilitas.de [85.10.196.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id A1DEF43D46 for ; Wed, 11 Jan 2006 13:19:50 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from eurystheus.local (port-212-202-169-24.dynamic.qsc.de [212.202.169.24]) by efacilitas.de (Postfix) with ESMTP id 599EC4C47B; Wed, 11 Jan 2006 14:28:35 +0100 (CET) Received: from [192.168.1.2] (muhkuh.local [192.168.1.2]) by eurystheus.local (Postfix) with ESMTP id 751785285C; Wed, 11 Jan 2006 14:18:27 +0100 (CET) Message-ID: <43C505F8.4030307@cs.tu-berlin.de> Date: Wed, 11 Jan 2006 14:19:52 +0100 From: =?windows-1250?Q?Bj=F6rn_K=F6nig?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Vladimir Dvorak References: <43C4D004.90101@vdsoft.org> In-Reply-To: <43C4D004.90101@vdsoft.org> Content-Type: text/plain; charset=windows-1250; format=flowed Content-Transfer-Encoding: 8bit Cc: freebsd-questions@freebsd.org Subject: Re: quotas + jail ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Jan 2006 13:19:51 -0000 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