Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Oct 1998 14:41:09 -0600 (CST)
From:      "Jasper O'Malley" <jooji@webnology.com>
To:        caijj@trans.hk.hi.cn
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: Why the quota don't take affect?
Message-ID:  <Pine.LNX.4.02.9810281422210.4736-100000@mercury.webnology.com>
In-Reply-To: <199810280328.LAA02807@trans.hk.hi.cn.>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.02.9810281422210.4736-100000>