1994-05-26 06:35:07 +00:00
|
|
|
.\" Copyright (c) 1983, 1990, 1991, 1993
|
|
|
|
.\" The Regents of the University of California. All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to Berkeley by
|
|
|
|
.\" Robert Elz at The University of Melbourne.
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
2017-02-28 23:42:47 +00:00
|
|
|
.\" 3. Neither the name of the University nor the names of its contributors
|
1994-05-26 06:35:07 +00:00
|
|
|
.\" may be used to endorse or promote products derived from this software
|
|
|
|
.\" without specific prior written permission.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
.\" SUCH DAMAGE.
|
|
|
|
.\"
|
|
|
|
.\" @(#)quotacheck.8 8.1 (Berkeley) 6/5/93
|
|
|
|
.\"
|
2007-01-25 19:54:03 +00:00
|
|
|
.Dd January 25, 2007
|
1994-05-26 06:35:07 +00:00
|
|
|
.Dt QUOTACHECK 8
|
2001-07-10 11:04:34 +00:00
|
|
|
.Os
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm quotacheck
|
2002-08-21 18:11:48 +00:00
|
|
|
.Nd file system quota consistency checker
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh SYNOPSIS
|
2000-11-20 16:52:27 +00:00
|
|
|
.Nm
|
2005-02-10 09:19:34 +00:00
|
|
|
.Op Fl guv
|
2009-12-28 23:01:47 +00:00
|
|
|
.Op Fl c Ar 32 | 64
|
2006-11-07 19:07:52 +00:00
|
|
|
.Op Fl l Ar maxrun
|
1994-05-26 06:35:07 +00:00
|
|
|
.Fl a
|
2005-02-10 09:19:34 +00:00
|
|
|
.Nm
|
|
|
|
.Op Fl guv
|
2009-12-28 23:01:47 +00:00
|
|
|
.Op Fl c Ar 32 | 64
|
2005-02-10 09:19:34 +00:00
|
|
|
.Ar filesystem ...
|
1994-05-26 06:35:07 +00:00
|
|
|
.Sh DESCRIPTION
|
2002-07-06 19:34:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2002-08-21 18:11:48 +00:00
|
|
|
utility examines each file system,
|
1994-05-26 06:35:07 +00:00
|
|
|
builds a table of current disk usage,
|
|
|
|
and compares this table against that recorded
|
2002-08-21 18:11:48 +00:00
|
|
|
in the disk quota file for the file system.
|
1994-05-26 06:35:07 +00:00
|
|
|
If any inconsistencies are detected, both the
|
|
|
|
quota file and the current system copy of the
|
|
|
|
incorrect quotas are updated (the latter only
|
2002-08-21 18:11:48 +00:00
|
|
|
occurs if an active file system is checked).
|
1994-05-26 06:35:07 +00:00
|
|
|
By default both user and group quotas are checked.
|
|
|
|
.Pp
|
1998-07-15 06:48:52 +00:00
|
|
|
The following options are available:
|
|
|
|
.Bl -tag -width indent
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl a
|
2002-08-21 18:11:48 +00:00
|
|
|
If supplied in place of any file system names,
|
1998-07-15 06:48:52 +00:00
|
|
|
.Nm
|
2002-08-21 18:11:48 +00:00
|
|
|
will check all the file systems indicated in
|
1994-05-26 06:35:07 +00:00
|
|
|
.Pa /etc/fstab
|
|
|
|
to be read-write with disk quotas.
|
|
|
|
By default only the types of quotas listed in
|
|
|
|
.Pa /etc/fstab
|
|
|
|
are checked.
|
2009-12-28 23:01:47 +00:00
|
|
|
.It Fl c Ar 32 | 64
|
|
|
|
Before performing its checks,
|
|
|
|
.Nm
|
|
|
|
will convert the quota file to the specified word size.
|
|
|
|
A conversion size of 64 is given to request conversion to
|
|
|
|
the new 64-bit quota file format.
|
|
|
|
A conversion size of 32 is given to request conversion back to
|
|
|
|
the old 32-bit quota file format.
|
|
|
|
The original quota file is left unchanged and moved aside with an
|
|
|
|
underscore and its format size plus a
|
|
|
|
.Pa .orig
|
|
|
|
extension added to its name.
|
|
|
|
Thus, the original 32-bit
|
|
|
|
.Pa quota.user
|
|
|
|
quota file converted to the 64-bit format quota file will be renamed to
|
|
|
|
.Pa quota.user_32.orig .
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl g
|
|
|
|
Only group quotas listed in
|
|
|
|
.Pa /etc/fstab
|
|
|
|
are to be checked.
|
2006-11-07 19:07:52 +00:00
|
|
|
.It Fl l Ar maxrun
|
|
|
|
Specifies the maximum number of concurrent file systems
|
|
|
|
to check in parallel.
|
|
|
|
If this option is omitted, or if
|
|
|
|
.Ar maxrun
|
|
|
|
is zero, parallel passes are run as per
|
|
|
|
.Xr fsck 8 .
|
2008-01-26 12:03:26 +00:00
|
|
|
This option is deprecated and parallel passes are always run
|
|
|
|
as per
|
2010-03-12 10:01:06 +00:00
|
|
|
.Xr fsck 8 .
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Fl u
|
|
|
|
Only user quotas listed in
|
|
|
|
.Pa /etc/fstab
|
|
|
|
are to be checked.
|
|
|
|
.It Fl v
|
2002-07-06 19:34:18 +00:00
|
|
|
Report discrepancies between the
|
1996-02-21 18:40:54 +00:00
|
|
|
calculated and recorded disk quotas and other additional diagnostic messages.
|
1994-05-26 06:35:07 +00:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Specifying both
|
|
|
|
.Fl g
|
|
|
|
and
|
|
|
|
.Fl u
|
|
|
|
is equivalent to the default.
|
2002-08-21 18:11:48 +00:00
|
|
|
Parallel passes are run on the file systems required,
|
1994-05-26 06:35:07 +00:00
|
|
|
using the pass numbers in
|
|
|
|
.Pa /etc/fstab
|
|
|
|
in an identical fashion to
|
|
|
|
.Xr fsck 8 .
|
|
|
|
.Pp
|
1998-07-15 06:48:52 +00:00
|
|
|
Normally,
|
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
operates silently.
|
|
|
|
.Pp
|
2002-07-06 19:34:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
2002-08-21 18:11:48 +00:00
|
|
|
utility expects each file system to be checked to have a
|
1994-05-26 06:35:07 +00:00
|
|
|
quota files named
|
|
|
|
.Pa quota.user
|
|
|
|
and
|
|
|
|
.Pa quota.group
|
2002-08-21 18:11:48 +00:00
|
|
|
which are located at the root of the associated file system.
|
1994-05-26 06:35:07 +00:00
|
|
|
These defaults may be overridden in
|
|
|
|
.Pa /etc/fstab .
|
|
|
|
If a file is not present,
|
1998-07-15 06:48:52 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
will create it.
|
2001-02-22 11:07:58 +00:00
|
|
|
These files should be edited with the
|
|
|
|
.Xr edquota 8
|
|
|
|
utility.
|
1994-05-26 06:35:07 +00:00
|
|
|
.Pp
|
2002-07-06 19:34:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is normally run at boot time from the
|
1999-09-06 20:55:28 +00:00
|
|
|
.Pa /etc/rc
|
2000-03-01 11:27:47 +00:00
|
|
|
file.
|
|
|
|
The rc startup procedure is controlled by the
|
1999-09-06 20:55:28 +00:00
|
|
|
.Pa /etc/rc.conf
|
|
|
|
variable
|
|
|
|
.Ar check_quotas .
|
|
|
|
Note that to enable this functionality in
|
|
|
|
.Pa /etc/rc
|
|
|
|
you also need to enable startup quota procedures
|
|
|
|
with the variable
|
|
|
|
.Ar enable_quotas
|
|
|
|
in
|
|
|
|
.Pa /etc/rc.conf .
|
2012-03-29 05:02:12 +00:00
|
|
|
The kernel must also be built with
|
2007-01-25 12:42:18 +00:00
|
|
|
.Cd "options QUOTA" .
|
1994-05-26 06:35:07 +00:00
|
|
|
.Pp
|
2002-07-06 19:34:18 +00:00
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility accesses the raw device in calculating the actual
|
1994-05-26 06:35:07 +00:00
|
|
|
disk usage for each user.
|
2002-08-21 18:11:48 +00:00
|
|
|
Thus, the file systems
|
1994-05-26 06:35:07 +00:00
|
|
|
checked should be quiescent while
|
1998-07-15 06:48:52 +00:00
|
|
|
.Nm
|
1994-05-26 06:35:07 +00:00
|
|
|
is running.
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width quota.group -compact
|
|
|
|
.It Pa quota.user
|
2002-08-21 18:11:48 +00:00
|
|
|
at the file system root with user quotas
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Pa quota.group
|
2002-08-21 18:11:48 +00:00
|
|
|
at the file system root with group quotas
|
1994-05-26 06:35:07 +00:00
|
|
|
.It Pa /etc/fstab
|
2002-08-21 18:11:48 +00:00
|
|
|
default file systems
|
1994-05-26 06:35:07 +00:00
|
|
|
.El
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr quota 1 ,
|
|
|
|
.Xr quotactl 2 ,
|
|
|
|
.Xr fstab 5 ,
|
2007-01-25 12:42:18 +00:00
|
|
|
.Xr rc.conf 5 ,
|
1994-05-26 06:35:07 +00:00
|
|
|
.Xr edquota 8 ,
|
|
|
|
.Xr fsck 8 ,
|
|
|
|
.Xr quotaon 8 ,
|
|
|
|
.Xr repquota 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
2002-07-06 19:34:18 +00:00
|
|
|
utility appeared in
|
1994-05-26 06:35:07 +00:00
|
|
|
.Bx 4.2 .
|
2007-01-25 12:42:18 +00:00
|
|
|
.Sh BUGS
|
|
|
|
The quota system will ignore UIDs or GIDs that would be negative
|
|
|
|
when evaluated as a signed value.
|
|
|
|
Typically those types of ids can appear in the file system from NFS
|
|
|
|
mounts or archive files from other operating systems.
|
|
|
|
Extremely large UIDs or GIDs will cause
|
|
|
|
.Nm
|
|
|
|
to run for an unreasonable amount of time and also produce extremely
|
|
|
|
large quota data files.
|