date and time created 92/07/09 13:56:28 by heideman
[unix-history] / usr / src / sbin / quotacheck / quotacheck.8
CommitLineData
70567b1c 1.\" Copyright (c) 1983, 1990, 1991 Regents of the University of California.
f9ac90b4 2.\" All rights reserved.
22a407fe 3.\"
79fdf6e5
KM
4.\" This code is derived from software contributed to Berkeley by
5.\" Robert Elz at The University of Melbourne.
6.\"
b5b01a2f 7.\" %sccs.include.redist.man%
f9ac90b4 8.\"
70567b1c 9.\" @(#)quotacheck.8 6.7 (Berkeley) %G%
22a407fe 10.\"
70567b1c
CL
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
79fdf6e5
KM
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.
22a407fe
KM
34If any inconsistencies are detected, both the
35quota file and the current system copy of the
36incorrect quotas are updated (the latter only
79fdf6e5
KM
37occurs if an active filesystem is checked).
38By default both user and group quotas are checked.
70567b1c
CL
39.Pp
40Available options:
41.Bl -tag -width Ds
42.It Fl a
22a407fe 43If the
70567b1c 44.Fl a
79fdf6e5 45flag is supplied in place of any filesystem names,
70567b1c 46.Nm quotacheck
79fdf6e5 47will check all the filesystems indicated in
70567b1c 48.Pa /etc/fstab
79fdf6e5
KM
49to be read-write with disk quotas.
50By default only the types of quotas listed in
70567b1c 51.Pa /etc/fstab
79fdf6e5 52are checked.
70567b1c
CL
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.
79fdf6e5
KM
72Parallel passes are run on the filesystems required,
73using the pass numbers in
70567b1c 74.Pa /etc/fstab
79fdf6e5 75in an identical fashion to
70567b1c
CL
76.Xr fsck 8 .
77.Pp
22a407fe 78Normally
70567b1c 79.Nm quotacheck
79fdf6e5 80operates silently.
70567b1c
CL
81.Pp
82.Nm Quotacheck
79fdf6e5
KM
83expects each filesystem to be checked to have a
84quota files named
70567b1c 85.Pa quota.user
79fdf6e5 86and
70567b1c 87.Pa quota.group
79fdf6e5
KM
88which are located at the root of the associated file system.
89These defaults may be overridden in
70567b1c 90.Pa /etc/fstab .
79fdf6e5 91If a file is not present,
70567b1c 92.Nm quotacheck
79fdf6e5 93will create it.
70567b1c
CL
94.Pp
95.Nm Quotacheck
22a407fe 96is normally run at boot time from the
70567b1c 97.Pa /etc/rc.local
22a407fe 98file, see
70567b1c 99.Xr rc 8 ,
79fdf6e5 100before enabling disk quotas with
70567b1c
CL
101.Xr quotaon 8 .
102.Pp
103.Nm Quotacheck
22a407fe 104accesses the raw device in calculating the actual
79fdf6e5
KM
105disk usage for each user.
106Thus, the filesystems
22a407fe 107checked should be quiescent while
70567b1c 108.Nm quotacheck
22a407fe 109is running.
70567b1c
CL
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 .