1.\" $NetBSD: quotacheck.8,v 1.9 2002/01/19 11:45:00 wiz Exp $ 2.\" 3.\" Copyright (c) 1983, 1990, 1991, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" This code is derived from software contributed to Berkeley by 7.\" Robert Elz at The University of Melbourne. 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 3. All advertising materials mentioning features or use of this software 18.\" must display the following acknowledgement: 19.\" This product includes software developed by the University of 20.\" California, Berkeley and its contributors. 21.\" 4. Neither the name of the University nor the names of its contributors 22.\" may be used to endorse or promote products derived from this software 23.\" without specific prior written permission. 24.\" 25.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 26.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 27.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 28.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 29.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 30.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 31.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 32.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 33.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 34.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 35.\" SUCH DAMAGE. 36.\" 37.\" @(#)quotacheck.8 8.1 (Berkeley) 6/5/93 38.\" 39.Dd June 5, 1993 40.Dt QUOTACHECK 8 41.Os 42.Sh NAME 43.Nm quotacheck 44.Nd filesystem quota consistency checker 45.Sh SYNOPSIS 46.Nm 47.Op Fl g 48.Op Fl u 49.Op Fl v 50.Ar filesystem Ar ... 51.Nm "" 52.Op Fl g 53.Op Fl u 54.Op Fl v 55.Fl a 56.Sh DESCRIPTION 57.Nm 58examines each filesystem, 59builds a table of current disk usage, 60and compares this table against that recorded 61in the disk quota file for the filesystem. 62If any inconsistencies are detected, both the 63quota file and the current system copy of the 64incorrect quotas are updated (the latter only 65occurs if an active filesystem is checked). 66By default both user and group quotas are checked. 67.Pp 68Available options: 69.Bl -tag -width Ds 70.It Fl a 71If the 72.Fl a 73flag is supplied in place of any filesystem names, 74.Nm 75will check all the filesystems 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 90.Nm 91reports discrepancies between the 92calculated and recorded disk quotas. 93.El 94.Pp 95Specifying both 96.Fl g 97and 98.Fl u 99is equivalent to the default. 100Parallel passes are run on the filesystems required, 101using the pass numbers in 102.Pa /etc/fstab 103in an identical fashion to 104.Xr fsck 8 . 105.Pp 106Normally 107.Nm 108operates silently. 109.Pp 110.Nm 111expects each filesystem 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. 122.Pp 123.Nm 124is normally run at boot time from the 125.Pa /etc/rc 126file, see 127.Xr rc 8 , 128before enabling disk quotas with 129.Xr quotaon 8 . 130.Pp 131.Nm 132accesses the raw device in calculating the actual 133disk usage for each user. 134Thus, the filesystems 135checked should be quiescent while 136.Nm 137is running. 138.Sh FILES 139.Bl -tag -width quota.group -compact 140.It Pa quota.user 141at the filesystem root with user quotas 142.It Pa quota.group 143at the filesystem root with group quotas 144.It Pa /etc/fstab 145default filesystems 146.El 147.Sh SEE ALSO 148.Xr quota 1 , 149.Xr quotactl 2 , 150.Xr fstab 5 , 151.Xr edquota 8 , 152.Xr fsck 8 , 153.Xr quotaon 8 , 154.Xr repquota 8 155.Sh HISTORY 156The 157.Nm 158command appeared in 159.Bx 4.2 . 160