From owner-freebsd-questions@FreeBSD.ORG Wed Mar 10 01:56:18 2004 Return-Path: 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 9191216A4CE for ; Wed, 10 Mar 2004 01:56:18 -0800 (PST) Received: from mta08-svc.ntlworld.com (mta08-svc.ntlworld.com [62.253.162.48]) by mx1.FreeBSD.org (Postfix) with ESMTP id C064943D1F for ; Wed, 10 Mar 2004 01:56:17 -0800 (PST) (envelope-from scott@fishballoon.org) Received: from llama.fishballoon.org ([81.104.195.124]) by mta08-svc.ntlworld.comESMTP <20040310095617.JYJC5004.mta08-svc.ntlworld.com@llama.fishballoon.org>; Wed, 10 Mar 2004 09:56:17 +0000 Received: from tuatara.fishballoon.org ([192.168.1.6]) by llama.fishballoon.org with esmtp (Exim 4.30; FreeBSD) id 1B10Rk-0005XW-6P; Wed, 10 Mar 2004 09:56:16 +0000 Received: (from scott@localhost) by tuatara.fishballoon.org (8.12.11/8.12.11/Submit) id i2A9uEKm000686; Wed, 10 Mar 2004 09:56:14 GMT (envelope-from scott) Date: Wed, 10 Mar 2004 09:56:14 +0000 From: Scott Mitchell To: Matthew Seaman , Stacey Roberts , freebsd-questions@freebsd.org Message-ID: <20040310095614.GA456@tuatara.fishballoon.org> References: <20040308184851.GF337@crom.vickiandstacey.com> <20040309140554.GA16123@happy-idiot-talk.infracaninophile.co.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040309140554.GA16123@happy-idiot-talk.infracaninophile.co.uk> User-Agent: Mutt/1.4.1i X-Operating-System: FreeBSD 4.9-STABLE i386 Subject: Re: Per-User QUOTA's vs blocksize X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Mar 2004 09:56:18 -0000 On Tue, Mar 09, 2004 at 02:05:54PM +0000, Matthew Seaman wrote: > On Mon, Mar 08, 2004 at 06:48:51PM +0000, Stacey Roberts wrote: > > > "You may limit allocations based on disk space (block quotas)" > > > > What exactly is the size of a block? > > As the quota system uses the term, a block is 512b -- this unit is > also called a sector in some situations, but it's basically the same > thing. It reflects the size of the underlying sector structures > within the filesystem. True, but the term is used inappropriately by the quota tools and their documentation - these appear to work exclusively in KB units for their (ahem) 'block' quotas, at least on recent versions on FreeBSD. See, for example, rev. 1.18 of edquota.c and the associated PR: http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.sbin/edquota/edquota.c?rev=1.18&content-type=text/x-cvsweb-markup http://www.freebsd.org/cgi/query-pr.cgi?pr=41936 There's a lot of explicit [some number of bytes]/1024 calculations in the various quota tools. I have empirical evidence of this too - I set up 'block' quotas for my users many moons ago, assuming 512 byte blocks. I was then quite surprised to run out of disk space last weekend, with du(1) showing several users massively over quota, but repquota(8) saying all was well. Halving all the quota settings keeps everything in agreement. The documentation is certainly misleading on this point. I'll file a PR, unless anyone cares to beat me to it... Scott -- =========================================================================== Scott Mitchell | PGP Key ID | "Eagles may soar, but weasels Cambridge, England | 0x54B171B9 | don't get sucked into jet engines" scott at fishballoon.org | 0xAA775B8B | -- Anon