| 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) %G% |
| 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 |
| 30 | examines each filesystem, |
| 31 | builds a table of current disk usage, |
| 32 | and compares this table against that recorded |
| 33 | in the disk quota file for the filesystem. |
| 34 | If any inconsistencies are detected, both the |
| 35 | quota file and the current system copy of the |
| 36 | incorrect quotas are updated (the latter only |
| 37 | occurs if an active filesystem is checked). |
| 38 | By default both user and group quotas are checked. |
| 39 | .Pp |
| 40 | Available options: |
| 41 | .Bl -tag -width Ds |
| 42 | .It Fl a |
| 43 | If the |
| 44 | .Fl a |
| 45 | flag is supplied in place of any filesystem names, |
| 46 | .Nm quotacheck |
| 47 | will check all the filesystems indicated in |
| 48 | .Pa /etc/fstab |
| 49 | to be read-write with disk quotas. |
| 50 | By default only the types of quotas listed in |
| 51 | .Pa /etc/fstab |
| 52 | are checked. |
| 53 | .It Fl g |
| 54 | Only group quotas listed in |
| 55 | .Pa /etc/fstab |
| 56 | are to be checked. |
| 57 | .It Fl u |
| 58 | Only user quotas listed in |
| 59 | .Pa /etc/fstab |
| 60 | are to be checked. |
| 61 | .It Fl v |
| 62 | .Nm quotacheck |
| 63 | reports discrepancies between the |
| 64 | calculated and recorded disk quotas. |
| 65 | .El |
| 66 | .Pp |
| 67 | Specifying both |
| 68 | .Fl g |
| 69 | and |
| 70 | .Fl u |
| 71 | is equivalent to the default. |
| 72 | Parallel passes are run on the filesystems required, |
| 73 | using the pass numbers in |
| 74 | .Pa /etc/fstab |
| 75 | in an identical fashion to |
| 76 | .Xr fsck 8 . |
| 77 | .Pp |
| 78 | Normally |
| 79 | .Nm quotacheck |
| 80 | operates silently. |
| 81 | .Pp |
| 82 | .Nm Quotacheck |
| 83 | expects each filesystem to be checked to have a |
| 84 | quota files named |
| 85 | .Pa quota.user |
| 86 | and |
| 87 | .Pa quota.group |
| 88 | which are located at the root of the associated file system. |
| 89 | These defaults may be overridden in |
| 90 | .Pa /etc/fstab . |
| 91 | If a file is not present, |
| 92 | .Nm quotacheck |
| 93 | will create it. |
| 94 | .Pp |
| 95 | .Nm Quotacheck |
| 96 | is normally run at boot time from the |
| 97 | .Pa /etc/rc.local |
| 98 | file, see |
| 99 | .Xr rc 8 , |
| 100 | before enabling disk quotas with |
| 101 | .Xr quotaon 8 . |
| 102 | .Pp |
| 103 | .Nm Quotacheck |
| 104 | accesses the raw device in calculating the actual |
| 105 | disk usage for each user. |
| 106 | Thus, the filesystems |
| 107 | checked should be quiescent while |
| 108 | .Nm quotacheck |
| 109 | is running. |
| 110 | .Sh FILES |
| 111 | .Bl -tag -width quota.group -compact |
| 112 | .It Pa quota.user |
| 113 | at the filesystem root with user quotas |
| 114 | .It Pa quota.group |
| 115 | at the filesystem root with group quotas |
| 116 | .It Pa /etc/fstab |
| 117 | default 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 |
| 128 | The |
| 129 | .Nm |
| 130 | command appeared in |
| 131 | .Bx 4.2 . |