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