GC !__DragonFly__ section.
[dragonfly.git] / sbin / quotacheck / quotacheck.8
CommitLineData
984263bc
MD
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. All advertising materials mentioning features or use of this software
16.\" must display the following acknowledgement:
17.\" This product includes software developed by the University of
18.\" California, Berkeley and its contributors.
19.\" 4. Neither the name of the University nor the names of its contributors
20.\" may be used to endorse or promote products derived from this software
21.\" without specific prior written permission.
22.\"
23.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
24.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
27.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33.\" SUCH DAMAGE.
34.\"
35.\" @(#)quotacheck.8 8.1 (Berkeley) 6/5/93
36.\" $FreeBSD: src/sbin/quotacheck/quotacheck.8,v 1.6.2.5 2003/02/24 00:56:42 trhodes Exp $
1de703da 37.\" $DragonFly: src/sbin/quotacheck/quotacheck.8,v 1.2 2003/06/17 04:27:34 dillon Exp $
984263bc
MD
38.\"
39.Dd June 5, 1993
40.Dt QUOTACHECK 8
41.Os
42.Sh NAME
43.Nm quotacheck
44.Nd file system quota consistency checker
45.Sh SYNOPSIS
46.Nm
47.Op Fl g
48.Op Fl u
49.Op Fl v
50.Ar filesystem
51.Ar
52.Nm
53.Op Fl g
54.Op Fl u
55.Op Fl v
56.Fl a
57.Sh DESCRIPTION
58The
59.Nm
60utility examines each file system,
61builds a table of current disk usage,
62and compares this table against that recorded
63in the disk quota file for the file system.
64If any inconsistencies are detected, both the
65quota file and the current system copy of the
66incorrect quotas are updated (the latter only
67occurs if an active file system is checked).
68By default both user and group quotas are checked.
69.Pp
70The following options are available:
71.Bl -tag -width indent
72.It Fl a
73If supplied in place of any file system names,
74.Nm
75will check all the file systems indicated in
76.Pa /etc/fstab
77to be read-write with disk quotas.
78By default only the types of quotas listed in
79.Pa /etc/fstab
80are checked.
81.It Fl g
82Only group quotas listed in
83.Pa /etc/fstab
84are to be checked.
85.It Fl u
86Only user quotas listed in
87.Pa /etc/fstab
88are to be checked.
89.It Fl v
90Report discrepancies between the
91calculated and recorded disk quotas and other additional diagnostic messages.
92.El
93.Pp
94Specifying both
95.Fl g
96and
97.Fl u
98is equivalent to the default.
99Parallel passes are run on the file systems required,
100using the pass numbers in
101.Pa /etc/fstab
102in an identical fashion to
103.Xr fsck 8 .
104.Pp
105Normally,
106.Nm
107operates silently.
108.Pp
109The
110.Nm
111utility expects each file system to be checked to have a
112quota files named
113.Pa quota.user
114and
115.Pa quota.group
116which are located at the root of the associated file system.
117These defaults may be overridden in
118.Pa /etc/fstab .
119If a file is not present,
120.Nm
121will create it.
122These files should be edited with the
123.Xr edquota 8
124utility.
125.Pp
126The
127.Nm
128utility is normally run at boot time from the
129.Pa /etc/rc
130file.
131The rc startup procedure is controlled by the
132.Pa /etc/rc.conf
133variable
134.Ar check_quotas .
135Note that to enable this functionality in
136.Pa /etc/rc
137you also need to enable startup quota procedures
138with the variable
139.Ar enable_quotas
140in
141.Pa /etc/rc.conf .
142.Pp
143The
144.Nm
145utility accesses the raw device in calculating the actual
146disk usage for each user.
147Thus, the file systems
148checked should be quiescent while
149.Nm
150is running.
151.Sh FILES
152.Bl -tag -width quota.group -compact
153.It Pa quota.user
154at the file system root with user quotas
155.It Pa quota.group
156at the file system root with group quotas
157.It Pa /etc/fstab
158default file systems
159.El
160.Sh SEE ALSO
161.Xr quota 1 ,
162.Xr quotactl 2 ,
163.Xr fstab 5 ,
164.Xr edquota 8 ,
165.Xr fsck 8 ,
166.Xr quotaon 8 ,
167.Xr repquota 8
168.Sh HISTORY
169The
170.Nm
171utility appeared in
172.Bx 4.2 .