]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - sbin/quotacheck/quotacheck.8
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / sbin / quotacheck / quotacheck.8
1 .\" Copyright (c) 1983, 1990, 1991, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\"
4 .\" This code is derived from software contributed to Berkeley by
5 .\" Robert Elz at The University of Melbourne.
6 .\"
7 .\" Redistribution and use in source and binary forms, with or without
8 .\" modification, are permitted provided that the following conditions
9 .\" are met:
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\"    notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\"    notice, this list of conditions and the following disclaimer in the
14 .\"    documentation and/or other materials provided with the distribution.
15 .\" 4. Neither the name of the University nor the names of its contributors
16 .\"    may be used to endorse or promote products derived from this software
17 .\"    without specific prior written permission.
18 .\"
19 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
20 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
23 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 .\" SUCH DAMAGE.
30 .\"
31 .\"     @(#)quotacheck.8        8.1 (Berkeley) 6/5/93
32 .\" $FreeBSD$
33 .\"
34 .Dd January 25, 2007
35 .Dt QUOTACHECK 8
36 .Os
37 .Sh NAME
38 .Nm quotacheck
39 .Nd file system quota consistency checker
40 .Sh SYNOPSIS
41 .Nm
42 .Op Fl guv
43 .Op Fl l Ar maxrun
44 .Fl a
45 .Nm
46 .Op Fl guv
47 .Ar filesystem ...
48 .Sh DESCRIPTION
49 The
50 .Nm
51 utility examines each file system,
52 builds a table of current disk usage,
53 and compares this table against that recorded
54 in the disk quota file for the file system.
55 If any inconsistencies are detected, both the
56 quota file and the current system copy of the
57 incorrect quotas are updated (the latter only
58 occurs if an active file system is checked).
59 By default both user and group quotas are checked.
60 .Pp
61 The following options are available:
62 .Bl -tag -width indent
63 .It Fl a
64 If supplied in place of any file system names,
65 .Nm
66 will check all the file systems indicated in
67 .Pa /etc/fstab
68 to be read-write with disk quotas.
69 By default only the types of quotas listed in
70 .Pa /etc/fstab
71 are checked.
72 .It Fl g
73 Only group quotas listed in
74 .Pa /etc/fstab
75 are to be checked.
76 .It Fl l Ar maxrun
77 Specifies the maximum number of concurrent file systems
78 to check in parallel.
79 If this option is omitted, or if
80 .Ar maxrun
81 is zero, parallel passes are run as per
82 .Xr fsck 8 .
83 .It Fl u
84 Only user quotas listed in
85 .Pa /etc/fstab
86 are to be checked.
87 .It Fl v
88 Report discrepancies between the
89 calculated and recorded disk quotas and other additional diagnostic messages.
90 .El
91 .Pp
92 Specifying both
93 .Fl g
94 and
95 .Fl u
96 is equivalent to the default.
97 Parallel passes are run on the file systems required,
98 using the pass numbers in
99 .Pa /etc/fstab
100 in an identical fashion to
101 .Xr fsck 8 .
102 .Pp
103 Normally,
104 .Nm
105 operates silently.
106 .Pp
107 The
108 .Nm
109 utility expects each file system to be checked to have a
110 quota files named
111 .Pa quota.user
112 and
113 .Pa quota.group
114 which are located at the root of the associated file system.
115 These defaults may be overridden in
116 .Pa /etc/fstab .
117 If a file is not present,
118 .Nm
119 will create it.
120 These files should be edited with the
121 .Xr edquota 8
122 utility.
123 .Pp
124 The
125 .Nm
126 utility is normally run at boot time from the
127 .Pa /etc/rc
128 file.
129 The rc startup procedure is controlled by the
130 .Pa /etc/rc.conf
131 variable
132 .Ar check_quotas .
133 Note that to enable this functionality in
134 .Pa /etc/rc
135 you also need to enable startup quota procedures
136 with the variable
137 .Ar enable_quotas
138 in
139 .Pa /etc/rc.conf .
140 The kernel must also be built with 
141 .Cd "options QUOTA" .
142 .Pp
143 The
144 .Nm
145 utility accesses the raw device in calculating the actual
146 disk usage for each user.
147 Thus, the file systems
148 checked should be quiescent while
149 .Nm
150 is running.
151 .Sh FILES
152 .Bl -tag -width quota.group -compact
153 .It Pa quota.user
154 at the file system root with user quotas
155 .It Pa quota.group
156 at the file system root with group quotas
157 .It Pa /etc/fstab
158 default file systems
159 .El
160 .Sh SEE ALSO
161 .Xr quota 1 ,
162 .Xr quotactl 2 ,
163 .Xr fstab 5 ,
164 .Xr rc.conf 5 ,
165 .Xr edquota 8 ,
166 .Xr fsck 8 ,
167 .Xr quotaon 8 ,
168 .Xr repquota 8
169 .Sh HISTORY
170 The
171 .Nm
172 utility appeared in
173 .Bx 4.2 .
174 .Sh BUGS
175 The quota system will ignore UIDs or GIDs that would be negative
176 when evaluated as a signed value.
177 Typically those types of ids can appear in the file system from NFS
178 mounts or archive files from other operating systems.
179 Extremely large UIDs or GIDs will cause
180 .Nm
181 to run for an unreasonable amount of time and also produce extremely
182 large quota data files.