From owner-freebsd-isp Wed Oct 28 12:36:07 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA15166 for freebsd-isp-outgoing; Wed, 28 Oct 1998 12:36:07 -0800 (PST) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from mercury.webnology.com (mercury.webnology.com [209.155.51.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA15161 for ; Wed, 28 Oct 1998 12:36:05 -0800 (PST) (envelope-from jooji@webnology.com) Received: from localhost (jooji@localhost) by mercury.webnology.com (8.9.1/8.8.8) with SMTP id OAA05138; Wed, 28 Oct 1998 14:41:09 -0600 (envelope-from jooji@webnology.com) Date: Wed, 28 Oct 1998 14:41:09 -0600 (CST) From: "Jasper O'Malley" To: caijj@trans.hk.hi.cn cc: freebsd-isp@FreeBSD.ORG Subject: Re: Why the quota don't take affect? In-Reply-To: <199810280328.LAA02807@trans.hk.hi.cn.> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wed, 28 Oct 1998 caijj@trans.hk.hi.cn wrote: > Everybody: > I read the FreeBSD FAQs from the site, then I limited the user's > disk size using "quota". But now find it doesn't work > correctly. I used "repquota -a" to list the quota's information, and > I found tow users had exceede the limit. I don't know what the "grace" > means. It's the number of days a user has to bring his disk usage below the soft limit before he can no longer increase his disk usage. Say my soft limit is 5 megs, and my hard limit is 10 megs, with a grace period of 7 days. If I save a 6 meg file in my home directory, I then have 7 days to bring my disk usage back below 5 megabytes. For those 7 days, I can even increase my disk usage, all the way up to my hard limit of 10 megs. Once my 7 days of grace has run out, though, I can't add a single byte of usage until I delete enough to bring my usage below 5 megs again. > I'v recompiled the kernel and modified the /etc/sysconfig and > /etc/fstab. The FAQ told me, I must create the quotas files in the file > systems which I want to limit the disk usage, ie: /usr/admin/quotas. > I want to know: I must create the directory "admin"? And how to create > the quotas file -- "touch" or something else? By default, the files used by quota are created in the root directory of each filesystem you've got quota turned on for. If /home is a separate file system, and you've got quotas turned on in /home, the files used by quota will be /home/quota.user and, possibily, /home/quota.group (if you're using group quotas). These defaults can be overridden in the /etc/fstab file; instead of specifying "userquota" of "groupquota" in the fstab for the filesystems you want to control with quotas, use "userquota=/path/to/quota.user" or "groupquota=/path/to/quota.group". Note that the filenames don't even have to be quota.user and quota.group, as "userquota=/usr/admin/quotas/home.user" is perfectly legal. If this is what you want to do, create the directory /usr/admin/quotas by hand, and specify the appropriate quota files in fstab for eachfilesystem (userquota=/usr/admin/quotas/home.user for user quotas for /home, userquota=/usr/admin/quotas/var.mail.user for user quotas for /var/mail, if you've got that as a separate filesystem, and so on). The final piece of the the puzzle is the quotacheck program. Run: quotacheck -avug from /etc/rc.local, ensuring that it runs *before* quotaon runs. This will initialize the quota files. I suspect this has already been done, though. Look for the file quota.user in the root directory of each filesystem you're already running quotas on. You may simply be confused about the function of the grace period, which will allow your users to break their soft usage quotas for a short period of time. Cheers, Mick The Reverend Jasper P. O'Malley dotdot:jooji@webnology.com Systems Administrator ringring:asktheadmiral Webnology, LLC woowoo:http://www.webnology.com/~jooji To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message