From nobody@FreeBSD.org  Fri Jul 20 11:57:58 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 33A7616A535
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jul 2007 11:57:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (unknown [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 24D4813C467
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jul 2007 11:57:58 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.1/8.14.1) with ESMTP id l6KBvwRr073377
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 20 Jul 2007 11:57:58 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.1/8.14.1/Submit) id l6KBvvQc073376;
	Fri, 20 Jul 2007 11:57:57 GMT
	(envelope-from nobody)
Message-Id: <200707201157.l6KBvvQc073376@www.freebsd.org>
Date: Fri, 20 Jul 2007 11:57:57 GMT
From: Helmut Schneider <jumper99@gmx.de>
To: freebsd-gnats-submit@FreeBSD.org
Subject: Disk quota does not work as expected
X-Send-Pr-Version: www-3.0

>Number:         114766
>Category:       kern
>Synopsis:       [quotas] Disk quota does not work as expected
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 20 12:00:09 GMT 2007
>Closed-Date:    Mon Mar 10 13:42:25 UTC 2008
>Last-Modified:  Mon Mar 10 13:42:25 UTC 2008
>Originator:     Helmut Schneider
>Release:        FreeBSD 6.2-RELEASE-p6
>Organization:
>Environment:
FreeBSD BSDHelmut 6.2-RELEASE-p6 FreeBSD 6.2-RELEASE-p6 #1: Sat Jul 14 15:12:53 CEST 2007     root@BSDHelmut:/usr/obj/usr/src/sys/GENERIC-WITH-QUOTA  i386
>Description:
[root@teg ~]# grep -ir quota /etc/rc.conf
quota_enable="YES"
check_quotas="YES"
[root@teg ~]# quotaon -v /home
/home: group quotas turned on
/home: user quotas turned on
[root@teg ~]# chown -R helmut:helmut /home/helmut
[root@teg ~]# repquota -ua | grep helmut
helmut           --     4346    90000   100000      -       63       0       0      -
[root@teg ~]# du -sh /home/helmut
2.4M    /home/helmut
[root@teg ~]#

But:

[root@teg ~]# quotacheck /home
[root@teg ~]# repquota -ua | grep helmut
helmut           --     2490    90000   100000      -       73       0       0      -
[root@teg ~]#


>How-To-Repeat:
Enable quota in kernel, enable quota, ed quota, copy content to somedir, run repquota.
>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jul 27 10:58:40 UTC 2007 
Responsible-Changed-Why:  
This does not sound i386-specific. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=114766 

From: "Helmut Schneider" <jumper99@gmx.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: kern/114766: [quotas] Disk quota does not work as expected
Date: Tue, 14 Aug 2007 16:59:59 +0200

 Any (good) news?
 
 [root@bsdhelmut ~]# quotacheck -v /home
 *** Checking user and group quotas for /dev/ad0s2a (/home)
 ****** fixed: inodes 92 -> 124 blocks 4284 -> 4512
 ****** fixed: inodes 12 -> 575 blocks 48 -> 6776
 ****** fixed: inodes 303 -> 526 blocks 6312 -> 11812
 ****** fixed: inodes 26 -> 31 blocks 256 -> 328
 ****** fixed: inodes 106 -> 194 blocks 2040 -> 4028
 ****** fixed: inodes 205 -> 400 blocks 9748 -> 14320
 ****** fixed: inodes 330 -> 606 blocks 7000 -> 14308
 ****** fixed: inodes 332 -> 620 blocks 6996 -> 14264
 ****** fixed: inodes 28 -> 36 blocks 4284 -> 4764
 ****** fixed: inodes 284 -> 506 blocks 6808 -> 12104
 ****** fixed: inodes 23 -> 17 blocks 244 -> 156
 ****** fixed: inodes 304 -> 493 blocks 21700 -> 29280
 ****** fixed: blocks 120 -> 144
 ****** fixed: inodes 14 -> 15 blocks 88 -> 348
 ****** fixed: inodes 393 -> 720 blocks 7960 -> 15304
 ****** fixed: inodes 457 -> 790 blocks 9084 -> 16512
 ****** fixed: inodes 23 -> 17 blocks 196 -> 104
 ****** fixed: inodes 22 -> 19 blocks 240 -> 192
 ****** fixed: inodes 449 -> 779 blocks 10172 -> 17244
 ****** fixed: inodes 21 -> 43 blocks 176 -> 740
 ****** fixed: blocks 120 -> 148
 ****** fixed: inodes 21 -> 27 blocks 216 -> 436
 ****** fixed: inodes 23 -> 39 blocks 292 -> 17048
 ****** fixed: inodes 17 -> 22 blocks 120 -> 316
 ****** fixed: inodes 255 -> 425 blocks 5060 -> 8752
 ****** fixed: inodes 92 -> 124 blocks 4284 -> 4512
 ****** fixed: inodes 12 -> 575 blocks 48 -> 6776
 ****** fixed: inodes 303 -> 526 blocks 6312 -> 11812
 ****** fixed: inodes 26 -> 31 blocks 256 -> 328
 ****** fixed: inodes 106 -> 194 blocks 2040 -> 4028
 ****** fixed: inodes 205 -> 400 blocks 9748 -> 14320
 ****** fixed: inodes 330 -> 606 blocks 7000 -> 14308
 ****** fixed: inodes 332 -> 620 blocks 6996 -> 14264
 ****** fixed: inodes 28 -> 36 blocks 4284 -> 4764
 ****** fixed: inodes 284 -> 506 blocks 6808 -> 12104
 ****** fixed: inodes 23 -> 17 blocks 244 -> 156
 ****** fixed: inodes 304 -> 493 blocks 21700 -> 29280
 ****** fixed: blocks 120 -> 144
 ****** fixed: inodes 14 -> 15 blocks 88 -> 348
 ****** fixed: inodes 393 -> 720 blocks 7960 -> 15304
 ****** fixed: inodes 457 -> 790 blocks 9084 -> 16512
 ****** fixed: inodes 23 -> 17 blocks 196 -> 104
 ****** fixed: inodes 22 -> 19 blocks 240 -> 192
 ****** fixed: inodes 449 -> 779 blocks 10172 -> 17244
 ****** fixed: inodes 21 -> 43 blocks 176 -> 740
 ****** fixed: blocks 120 -> 148
 ****** fixed: inodes 21 -> 27 blocks 216 -> 436
 ****** fixed: inodes 23 -> 39 blocks 292 -> 17048
 ****** fixed: inodes 17 -> 22 blocks 120 -> 316
 ****** fixed: inodes 255 -> 425 blocks 5060 -> 8752
 [root@bsdhelmut ~]#
State-Changed-From-To: open->feedback 
State-Changed-By: mpp 
State-Changed-When: Sun Feb 24 20:29:07 UTC 2008 
State-Changed-Why:  
I am unable to duplicate this problem. 

I think this is an error on the submitters part. 

The proper sequence of commands should have been: 

quotacheck /home 
quotaon /home 
chown .... 
repquota ... 
du ... 

The key step is running quotacheck before actually turning 

That would explain all the fix ups quotacheck did later as 
seen in the submitters follow up message. 

Enabling quotas for /home in /etc/fstab makes sure that 
quotacheck is run before enabling quotas for the file system at 
boot time. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=114766 

From: "Helmut Schneider" <jumper99@gmx.de>
To: <bug-followup@FreeBSD.org>
Cc:  
Subject: Re: kern/114766: [quotas] Disk quota does not work as expected
Date: Thu, 6 Mar 2008 19:42:58 +0100

 > Enabling quotas for /home in /etc/fstab makes sure that
 > quotacheck is run before enabling quotas for the file system at
 > boot time.
 
 Quota is enabled in fstab and rc.conf:
 
 /dev/ad0s2a /home ufs rw,userquota,groupquota 2 2
 quota_enable="YES"
 check_quotas="YES"
 
 I might do something fundamentally wrong but I can reproduce this on 2 
 machines (both 6.3-RELEASE). On both dovecot is active (Maildir is 
 /home/$USER/Maildir). Not sure if this is related.
 
 [root@abc ~]# quotacheck -vvv -a
 *** Checking user and group quotas for /dev/ad0s2a (/home)
 [root@abc ~]# quotacheck -vvv -a
 *** Checking user and group quotas for /dev/ad0s2a (/home)
 /home: web6   fixed (user):   inodes 2005 -> 2006     blocks 49416 -> 49432
 /home: web6   fixed (group):  inodes 2005 -> 2006     blocks 49416 -> 49432
 [root@abc ~]# quotacheck -vvv -a
 *** Checking user and group quotas for /dev/ad0s2a (/home)
 /home: web24  fixed (user):   inodes 2587 -> 2588     blocks 49864 -> 49876
 /home: web24  fixed (group):  inodes 2587 -> 2588     blocks 49864 -> 49876
 [root@abc ~]# 
 
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Sat Mar 8 05:35:04 UTC 2008 
State-Changed-Why:  
Feedback received; problem persists. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=114766 
State-Changed-From-To: open->closed 
State-Changed-By: remko 
State-Changed-When: Mon Mar 10 13:42:24 UTC 2008 
State-Changed-Why:  
Helmut reports this can be closed, the logic was reverted for the quota 
support 

http://www.freebsd.org/cgi/query-pr.cgi?pr=114766 
>Unformatted:
