]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - sbin/quotacheck/quotacheck.8
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.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 c Ar 32 | 64
44 .Op Fl l Ar maxrun
45 .Fl a
46 .Nm
47 .Op Fl guv
48 .Op Fl c Ar 32 | 64
49 .Ar filesystem ...
50 .Sh DESCRIPTION
51 The
52 .Nm
53 utility examines each file system,
54 builds a table of current disk usage,
55 and compares this table against that recorded
56 in the disk quota file for the file system.
57 If any inconsistencies are detected, both the
58 quota file and the current system copy of the
59 incorrect quotas are updated (the latter only
60 occurs if an active file system is checked).
61 By default both user and group quotas are checked.
62 .Pp
63 The following options are available:
64 .Bl -tag -width indent
65 .It Fl a
66 If supplied in place of any file system names,
67 .Nm
68 will check all the file systems indicated in
69 .Pa /etc/fstab
70 to be read-write with disk quotas.
71 By default only the types of quotas listed in
72 .Pa /etc/fstab
73 are checked.
74 .It Fl c Ar 32 | 64
75 Before performing its checks,
76 .Nm
77 will convert the quota file to the specified word size.
78 A conversion size of 64 is given to request conversion to
79 the new 64-bit quota file format.
80 A conversion size of 32 is given to request conversion back to
81 the old 32-bit quota file format.
82 The original quota file is left unchanged and moved aside with an
83 underscore and its format size plus a
84 .Pa .orig
85 extension added to its name.
86 Thus, the original 32-bit
87 .Pa quota.user
88 quota file converted to the 64-bit format quota file will be renamed to
89 .Pa quota.user_32.orig .
90 .It Fl g
91 Only group quotas listed in
92 .Pa /etc/fstab
93 are to be checked.
94 .It Fl l Ar maxrun
95 Specifies the maximum number of concurrent file systems
96 to check in parallel.
97 If this option is omitted, or if
98 .Ar maxrun
99 is zero, parallel passes are run as per
100 .Xr fsck 8 .
101 This option is deprecated and parallel passes are always run
102 as per
103 .Xr fsck 8 .
104 .It Fl u
105 Only user quotas listed in
106 .Pa /etc/fstab
107 are to be checked.
108 .It Fl v
109 Report discrepancies between the
110 calculated and recorded disk quotas and other additional diagnostic messages.
111 .El
112 .Pp
113 Specifying both
114 .Fl g
115 and
116 .Fl u
117 is equivalent to the default.
118 Parallel passes are run on the file systems required,
119 using the pass numbers in
120 .Pa /etc/fstab
121 in an identical fashion to
122 .Xr fsck 8 .
123 .Pp
124 Normally,
125 .Nm
126 operates silently.
127 .Pp
128 The
129 .Nm
130 utility expects each file system to be checked to have a
131 quota files named
132 .Pa quota.user
133 and
134 .Pa quota.group
135 which are located at the root of the associated file system.
136 These defaults may be overridden in
137 .Pa /etc/fstab .
138 If a file is not present,
139 .Nm
140 will create it.
141 These files should be edited with the
142 .Xr edquota 8
143 utility.
144 .Pp
145 The
146 .Nm
147 utility is normally run at boot time from the
148 .Pa /etc/rc
149 file.
150 The rc startup procedure is controlled by the
151 .Pa /etc/rc.conf
152 variable
153 .Ar check_quotas .
154 Note that to enable this functionality in
155 .Pa /etc/rc
156 you also need to enable startup quota procedures
157 with the variable
158 .Ar enable_quotas
159 in
160 .Pa /etc/rc.conf .
161 The kernel must also be built with
162 .Cd "options QUOTA" .
163 .Pp
164 The
165 .Nm
166 utility accesses the raw device in calculating the actual
167 disk usage for each user.
168 Thus, the file systems
169 checked should be quiescent while
170 .Nm
171 is running.
172 .Sh FILES
173 .Bl -tag -width quota.group -compact
174 .It Pa quota.user
175 at the file system root with user quotas
176 .It Pa quota.group
177 at the file system root with group quotas
178 .It Pa /etc/fstab
179 default file systems
180 .El
181 .Sh SEE ALSO
182 .Xr quota 1 ,
183 .Xr quotactl 2 ,
184 .Xr fstab 5 ,
185 .Xr rc.conf 5 ,
186 .Xr edquota 8 ,
187 .Xr fsck 8 ,
188 .Xr quotaon 8 ,
189 .Xr repquota 8
190 .Sh HISTORY
191 The
192 .Nm
193 utility appeared in
194 .Bx 4.2 .
195 .Sh BUGS
196 The quota system will ignore UIDs or GIDs that would be negative
197 when evaluated as a signed value.
198 Typically those types of ids can appear in the file system from NFS
199 mounts or archive files from other operating systems.
200 Extremely large UIDs or GIDs will cause
201 .Nm
202 to run for an unreasonable amount of time and also produce extremely
203 large quota data files.