xref: /original-bsd/sbin/quotacheck/quotacheck.8 (revision 7eb91141)
1.\" Copyright (c) 1983, 1990, 1991 Regents of the University of California.
2.\" 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.\" %sccs.include.redist.man%
8.\"
9.\"     @(#)quotacheck.8	6.7 (Berkeley) 03/16/91
10.\"
11.Dd
12.Dt QUOTACHECK 8
13.Os BSD 4.2
14.Sh NAME
15.Nm quotacheck
16.Nd filesystem quota consistency checker
17.Sh SYNOPSIS
18.Nm quotacheck
19.Op Fl g
20.Op Fl u
21.Op Fl v
22.Ar filesystem Ar ...
23.Nm quotacheck
24.Op Fl g
25.Op Fl u
26.Op Fl v
27.Fl a
28.Sh DESCRIPTION
29.Nm Quotacheck
30examines each filesystem,
31builds a table of current disk usage,
32and compares this table against that recorded
33in the disk quota file for the filesystem.
34If any inconsistencies are detected, both the
35quota file and the current system copy of the
36incorrect quotas are updated (the latter only
37occurs if an active filesystem is checked).
38By default both user and group quotas are checked.
39.Pp
40Available options:
41.Bl -tag -width Ds
42.It Fl a
43If the
44.Fl a
45flag is supplied in place of any filesystem names,
46.Nm quotacheck
47will check all the filesystems indicated in
48.Pa /etc/fstab
49to be read-write with disk quotas.
50By default only the types of quotas listed in
51.Pa /etc/fstab
52are checked.
53.It Fl g
54Only group quotas listed in
55.Pa /etc/fstab
56are to be checked.
57.It Fl u
58Only user quotas listed in
59.Pa /etc/fstab
60are to be checked.
61.It Fl v
62.Nm quotacheck
63reports discrepancies between the
64calculated and recorded disk quotas.
65.El
66.Pp
67Specifying both
68.Fl g
69and
70.Fl u
71is equivalent to the default.
72Parallel passes are run on the filesystems required,
73using the pass numbers in
74.Pa /etc/fstab
75in an identical fashion to
76.Xr fsck 8 .
77.Pp
78Normally
79.Nm quotacheck
80operates silently.
81.Pp
82.Nm Quotacheck
83expects each filesystem to be checked to have a
84quota files named
85.Pa quota.user
86and
87.Pa quota.group
88which are located at the root of the associated file system.
89These defaults may be overridden in
90.Pa /etc/fstab .
91If a file is not present,
92.Nm quotacheck
93will create it.
94.Pp
95.Nm Quotacheck
96is normally run at boot time from the
97.Pa /etc/rc.local
98file, see
99.Xr rc 8 ,
100before enabling disk quotas with
101.Xr quotaon 8 .
102.Pp
103.Nm Quotacheck
104accesses the raw device in calculating the actual
105disk usage for each user.
106Thus, the filesystems
107checked should be quiescent while
108.Nm quotacheck
109is running.
110.Sh FILES
111.Bl -tag -width quota.group -compact
112.It Pa quota.user
113at the filesystem root with user quotas
114.It Pa quota.group
115at the filesystem root with group quotas
116.It Pa /etc/fstab
117default filesystems
118.El
119.Sh SEE ALSO
120.Xr quota 1 ,
121.Xr quotactl 2 ,
122.Xr fstab 5 ,
123.Xr edquota 8 ,
124.Xr fsck 8 ,
125.Xr quotaon 8 ,
126.Xr repquota 8
127.Sh HISTORY
128The
129.Nm
130command appeared in
131.Bx 4.2 .
132