Re: Per-User QUOTA's vs blocksize
On Tue, Mar 09, 2004 at 02:05:54PM +, Matthew Seaman wrote: On Mon, Mar 08, 2004 at 06:48:51PM +, 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.18content-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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Per-User QUOTA's vs blocksize
Hello, - Original Message - From: Scott Mitchell [EMAIL PROTECTED] To: To Matthew Seaman Date: Wed, 10 Mar, 2004 09:56 GMT Subject: Re: Per-User QUOTA's vs blocksize On Tue, Mar 09, 2004 at 02:05:54PM +, Matthew Seaman wrote: On Mon, Mar 08, 2004 at 06:48:51PM +, 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.18content-type=text/x-cvsweb-markup http://www.freebsd.org/cgi/query-pr.cgi?pr=41936 This is crazy.., there's not one iota on attempting to clarify this in the online HandBook. 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... I'll submit a PR now.., Thanks for this. Regards, Stacey 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 ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- Stacey Roberts B. Sc (HONS) Computer Science Web: www.vickiandstacey.com pgp0.pgp Description: PGP signature
Re: Per-User QUOTA's vs blocksize
On Mon, Mar 08, 2004 at 06:48:51PM +, 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. Most applications that deal in file sizes can deal in units of blocks, (eg. the -s argument to newfs(8) takes an argument in units of sectors or blocks, although just to be confusing, newfs(8) also uses 'block-size' with a different meaning) and in some of the older ones blocks are the default measure. However, more commonly used applications (like df(1)) or more recently written ones either default to reporting in more familiar units -- b, kb, Mb -- or have mechanisms for changing to those units. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK pgp0.pgp Description: PGP signature
Re: Per-User QUOTA's vs blocksize
Hello Matthew, Thanks for the reply. - Original Message - From: Matthew Seaman [EMAIL PROTECTED] To: To Stacey Roberts Date: Tue, 09 Mar, 2004 14:05 GMT Subject: Re: Per-User QUOTA's vs blocksize On Mon, Mar 08, 2004 at 06:48:51PM +, 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. Ahh.., thanks for that. Most applications that deal in file sizes can deal in units of blocks, (eg. the -s argument to newfs(8) takes an argument in units of sectors or blocks, although just to be confusing, newfs(8) also uses 'block-size' with a different meaning) and in some of the older ones blocks are the default measure. However, more commonly used applications (like df(1)) or more recently written ones either default to reporting in more familiar units -- b, kb, Mb -- or have mechanisms for changing to those units. Cheers for this. Regards, Stacey Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK -- Stacey Roberts B. Sc (HONS) Computer Science Web: www.vickiandstacey.com pgp0.pgp Description: PGP signature
Per-User QUOTA's vs blocksize
Hello, I have a simple question here please. I'm trying to follow the HandBook's how-to for setting up a per-user quota on a machine. When the HandBook (at 12.13.2 Setting Quota Limits - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/quotas.html) refers to: You may limit allocations based on disk space (block quotas) What exactly is the size of a block? I read a post that was returned via a google search (http://groups.google.com/groups?q=block+%3D+512+group:comp.unix.bsd.freebsd.*hl=enlr=ie=UTF-8group=comp.unix.bsd.freebsd.*selm=WZ1a4.25014%24ma5.1102217%40news.chello.atrnum=1) that suggested that 1 block = 512b, but since then I've been advised that in fact, 1 block = 1024b (1 kilobyte) instead. I tried searching the HandBook but couldn't find anything definitive, and also had a look at man ls(1) as well as man du(1). Here's what man ls(1) has at the end: -s Display the number of file system blocks actually used by each file, in units of 512 bytes, where partial units are rounded up to the next integer value. If the output is to a terminal, a total sum for all the file sizes is output on a line before the listing. The environment variable BLOCKSIZE overrides the unit size of 512 bytes. That suggests that there might actually be a default(?) value of 1 block = 512b And man du(1) says: ENVIRONMENT BLOCKSIZE If the environment variable BLOCKSIZE is set, and the -k option is not specified, the block counts will be displayed in units of that size block. If BLOCKSIZE is not set, and the -k option is not specified, the block counts will be displayed in 512-byte blocks. Which also to me, suggests that 1 block = 512b Now, the blocksize env variable for my current user is set to: BLOCKSIZE=K This is the same for root as well. In setting disk space limits for per-user quota's then, which blocksize should I be using? Thanks for the time. Regards, Stacey ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]