]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/quotacheck/quotacheck.8
This commit was generated by cvs2svn to compensate for changes in r162916,
[FreeBSD/FreeBSD.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 June 5, 1993
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 .Fl a
44 .Nm
45 .Op Fl guv
46 .Ar filesystem ...
47 .Sh DESCRIPTION
48 The
49 .Nm
50 utility examines each file system,
51 builds a table of current disk usage,
52 and compares this table against that recorded
53 in the disk quota file for the file system.
54 If any inconsistencies are detected, both the
55 quota file and the current system copy of the
56 incorrect quotas are updated (the latter only
57 occurs if an active file system is checked).
58 By default both user and group quotas are checked.
59 .Pp
60 The following options are available:
61 .Bl -tag -width indent
62 .It Fl a
63 If supplied in place of any file system names,
64 .Nm
65 will check all the file systems indicated in
66 .Pa /etc/fstab
67 to be read-write with disk quotas.
68 By default only the types of quotas listed in
69 .Pa /etc/fstab
70 are checked.
71 .It Fl g
72 Only group quotas listed in
73 .Pa /etc/fstab
74 are to be checked.
75 .It Fl u
76 Only user quotas listed in
77 .Pa /etc/fstab
78 are to be checked.
79 .It Fl v
80 Report discrepancies between the
81 calculated and recorded disk quotas and other additional diagnostic messages.
82 .El
83 .Pp
84 Specifying both
85 .Fl g
86 and
87 .Fl u
88 is equivalent to the default.
89 Parallel passes are run on the file systems required,
90 using the pass numbers in
91 .Pa /etc/fstab
92 in an identical fashion to
93 .Xr fsck 8 .
94 .Pp
95 Normally,
96 .Nm
97 operates silently.
98 .Pp
99 The
100 .Nm
101 utility expects each file system to be checked to have a
102 quota files named
103 .Pa quota.user
104 and
105 .Pa quota.group
106 which are located at the root of the associated file system.
107 These defaults may be overridden in
108 .Pa /etc/fstab .
109 If a file is not present,
110 .Nm
111 will create it.
112 These files should be edited with the
113 .Xr edquota 8
114 utility.
115 .Pp
116 The
117 .Nm
118 utility is normally run at boot time from the
119 .Pa /etc/rc
120 file.
121 The rc startup procedure is controlled by the
122 .Pa /etc/rc.conf
123 variable
124 .Ar check_quotas .
125 Note that to enable this functionality in
126 .Pa /etc/rc
127 you also need to enable startup quota procedures
128 with the variable
129 .Ar enable_quotas
130 in
131 .Pa /etc/rc.conf .
132 .Pp
133 The
134 .Nm
135 utility accesses the raw device in calculating the actual
136 disk usage for each user.
137 Thus, the file systems
138 checked should be quiescent while
139 .Nm
140 is running.
141 .Sh FILES
142 .Bl -tag -width quota.group -compact
143 .It Pa quota.user
144 at the file system root with user quotas
145 .It Pa quota.group
146 at the file system root with group quotas
147 .It Pa /etc/fstab
148 default file systems
149 .El
150 .Sh SEE ALSO
151 .Xr quota 1 ,
152 .Xr quotactl 2 ,
153 .Xr fstab 5 ,
154 .Xr edquota 8 ,
155 .Xr fsck 8 ,
156 .Xr quotaon 8 ,
157 .Xr repquota 8
158 .Sh HISTORY
159 The
160 .Nm
161 utility appeared in
162 .Bx 4.2 .