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