From owner-freebsd-bugs@FreeBSD.ORG Fri Mar 7 03:02:29 2008 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 623DC1065670 for ; Fri, 7 Mar 2008 03:02:29 +0000 (UTC) (envelope-from mpp@mppsystems.com) Received: from mail5.gulftel.com (mail5.gulftel.com [216.231.163.37]) by mx1.freebsd.org (Postfix) with ESMTP id 3C37A8FC1B for ; Fri, 7 Mar 2008 03:02:29 +0000 (UTC) (envelope-from mpp@mppsystems.com) Received: from localhost (localhost [127.0.0.1]) by mail5.gulftel.com (Postfix) with ESMTP id 92BCF6D474; Thu, 6 Mar 2008 20:02:19 -0600 (CST) Received: from mail5.gulftel.com ([127.0.0.1]) by localhost (mail5.gulftel.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jX1E6uJNC7mm; Thu, 6 Mar 2008 20:02:19 -0600 (CST) Received: from mail.mppsystems.com (unknown [99.194.188.184]) by mail5.gulftel.com (Postfix) with ESMTP id E3F5A6F36D; Thu, 6 Mar 2008 18:42:32 -0600 (CST) Received: by mail.mppsystems.com (Postfix, from userid 1000) id 4F4B217025; Thu, 6 Mar 2008 18:42:32 -0600 (CST) Date: Thu, 6 Mar 2008 18:42:32 -0600 From: Mike Pritchard To: Helmut Schneider Message-ID: <20080307004232.GA69112@mail.mppsystems.com> References: <200803061850.m26Io2Xq013979@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200803061850.m26Io2Xq013979@freefall.freebsd.org> User-Agent: mutt-ng/devel-r804 (FreeBSD) Cc: freebsd-bugs@FreeBSD.org Subject: Re: kern/114766: [quotas] Disk quota does not work as expected X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Mar 2008 03:02:29 -0000 On Thu, Mar 06, 2008 at 06:50:02PM +0000, Helmut Schneider wrote: > The following reply was made to PR kern/114766; it has been noted by GNATS. > > From: "Helmut Schneider" > To: > Cc: > Subject: Re: kern/114766: [quotas] Disk quota does not work as expected > Date: Thu, 6 Mar 2008 19:42:58 +0100 > > wrote: > > > 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. > > 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 ~]# Are you running quotacheck while there are users active, or the machine is accepting mail deliveries? Running quotacheck on an active file system will generate those type of fixups, due to buffered data in the kernel not being in sync with the disk data at that point. Quotacheck is similar to fsck, in that the file system should not be in use at the time of the check and the intended use is to rebuild / update the quota data files in the event of a system crash or to build an initial quota usage data base. -- Mike Pritchard mpp @ FreeBSD.org "If tyranny and oppression come to this land, it will be in the guise of fighting a foreign enemy." - James Madison (1787)