From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 13 10:23:39 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8A9B516A41C for ; Wed, 13 Jul 2005 10:23:39 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: from web15007.mail.cnb.yahoo.com (web15007.mail.cnb.yahoo.com [202.165.103.64]) by mx1.FreeBSD.org (Postfix) with SMTP id 4001E43D55 for ; Wed, 13 Jul 2005 10:23:37 +0000 (GMT) (envelope-from jas_arlerr@yahoo.com.cn) Received: (qmail 45804 invoked by uid 60001); 13 Jul 2005 10:23:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.cn; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=JpL9hFbHqfvQDyxRbmheEGES/UkP6L64zGgQuM9mqAPT62Nj8+lLmA/w5hYN+7Wydq3F3kZptdpYTW+urP5F+1AJGG9dYF+eleuCydrWTYGD8o/aGhgaqc+Jp7OPA7G1JpvGjE1BmAzwsg/X9YEXW7IvfouAy6g3A4KqIiEF/Es= ; Message-ID: <20050713102336.45802.qmail@web15007.mail.cnb.yahoo.com> Received: from [61.187.54.10] by web15007.mail.cnb.yahoo.com via HTTP; Wed, 13 Jul 2005 18:23:36 CST Date: Wed, 13 Jul 2005 18:23:36 +0800 (CST) From: Jone Jas To: Alex Lyashkov In-Reply-To: <1121231035.4344.10.camel@berloga.shadowland> MIME-Version: 1.0 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd hackers Subject: Re: limit jail disk space X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Jul 2005 10:23:39 -0000 Alex Lyashkov 写道: В Срд, 13.07.2005, в 06:42, Jone Jas пишет: > > Alex Lyashkov 写道: > В Втр, 12.07.2005, в 16:03, Vlad GALU пишет: > > On 7/12/05, Jone Jas wrote: > > > Thanks for your reply. I googled and found this method but > I just > > > did not have a try. > > > As for the code-hacking method I mentioned, anyone with > any idea > > > is appreciated! > > > > > > See ufs_quota.c, especially chkdqchg(). It is passed a > struct > > ucred* parameter, which contains a struct prison* pointer. > So I assume > > you can make your decision based on that. Of course, the > userland > > quota management tools and the jail utilities need to be > made aware of > > the kernel changes. > > > > -- > >if you compile kernel without QUOTA support it been disabled. > >I think, more correctly way implement jail disk limit as > parallel >for disk quota function. > > > IMHO, we can use a sysctl variable to control the > functionality. >option QUOTA? or jail disklimit? I mean jail disk limit >for jail disklimit more easy create tools who controled all limits >for jail. >Look to LinuxVServer project (www.linux-vserver.org) or >FreeVPS. Sure. The tools may control all limits such as cpu time, memory, bandwidth, disk space, etc. I have read the Linux VServer dlimit code. But I am not very sure where to put the hooks for inode/blocks control of jail in FreeBSD. This is why I open this thread. Vlad GALU said I can look to the quota method. I will try. Thanks. -- FreeVPS Developers Team http://www.freevps.com --------------------------------- DO YOU YAHOO!? 雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱