OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / quota / original / man8 / quotacheck.8
1 .TH quotacheck 8 "Fri Jul 20 2001"
2 .SH NAME
3 quotacheck \- scan a filesystem for disk usage, create, check and repair quota files
4 .SH SYNOPSIS
5 .B quotacheck
6 [
7 .B \-gubcfinvdMmR
8 ] [
9 .B \-F
10 .I quota-format
11 ]
12 .B \-a
13 |
14 .I filesystem
15 .br
16 .SH DESCRIPTION
17 .B quotacheck
18 examines each filesystem, builds a table of current disk usage, and
19 compares this table against that recorded in the disk quota file for the
20 filesystem (this step is ommitted if option
21 .B -c
22 is specified). If any inconsistencies are detected, both the quota file
23 and the current system copy of the incorrect quotas are updated (the
24 latter only occurs if an active filesystem is checked which is not advised).
25 By default, only user quotas are checked.
26 .B quotacheck
27 expects each filesystem to be checked to have quota files named
28 .I [a]quota.user
29 and
30 .I [a]quota.group
31 located at the root of the associated filesystem.  If a file is not
32 present, 
33 .B quotacheck
34 will create it.
35 .PP
36 If the quota file is corrupted,
37 .B quotacheck
38 tries to save as much data as possible.  Rescuing data may need user
39 intervention. With no additional options
40 .B quotacheck
41 will simply exit in such a situation. When in interactive mode (option
42 .BR -i )
43 , the user is asked for advice. Advice can also be provided from command
44 line (see option
45 .BR -n )
46 , which is useful when
47 .B quotacheck
48 is run automatically (ie. from script) and failure is unacceptable.
49 .PP
50 .B quotacheck
51 should be run each time the system boots and mounts non-valid filesystems.
52 This is most likely to happen after a system crash.
53 .PP
54 It is strongly recommended to run
55 .B quotacheck
56 with quotas turned off for the filesystem. Otherwise, possible damage
57 or loss to data in the quota files can result.  It is also unwise to
58 run
59 .B quotacheck
60 on a live filesystem as actual usage may change during the scan.  To
61 prevent this,
62 .B quotacheck
63 tries to remount the filesystem read-only before starting the scan.  
64 After the scan is done it remounts the filesystem read-write. You can
65 disable this with option
66 .BR \-m .
67 You can also make
68 .B quotacheck
69 ignore the failure to remount the filesystem read-only with option
70 .BR \-M .
71 .SH OPTIONS
72 .TP
73 .B \-b
74 Forces
75 .B quotacheck
76 to make backups of the quota file before writing the new data.
77 .TP
78 .B \-v
79 .B quotacheck
80 reports its operation as it progresses.  Normally it operates silently.
81 .TP
82 .B \-d
83 Enable debugging mode.  It will result in a lot of information which can
84 be used in debugging the program. The output is very verbose and the
85 scan will be slow.
86 .TP
87 .B \-u
88 Only user quotas listed in
89 .I /etc/mtab
90 or on the filesystems specified are to be checked.  This is the default action.
91 .TP
92 .B \-g
93 Only group quotas listed in
94 .I /etc/mtab
95 or on the filesystems specified are to be checked.
96 .TP
97 .B \-c
98 Don't read existing quota files. Just perform a new scan and save it to disk.
99 .B quotacheck
100 also skips scanning of old quota files when they are not found.
101 .TP
102 .B \-f
103 Forces checking and writing of new quota files on filesystems with quotas
104 enabled. This is not recommended as the created quota files may be out of sync.
105 .TP
106 .B \-M
107 This flag forces checking of filesystem in read-write mode if a remount
108 fails. Do this only when you are sure no process will write to a
109 filesystem while scanning.
110 .TP
111 .B \-m
112 Don't try to remount filesystem read-only. See comment with option
113 .BR \-M .
114 .TP
115 .B \-i
116 Interactive mode. By default
117 .B quotacheck
118 exits when it finds an error. In interactive mode user is asked for
119 input instead.  See option
120 .BR \-n .
121 .TP
122 .B \-n
123 If the quota files become corrupted, it is possible for duplicate
124 entries for a single user or group ID to exist.  Normally in this case,
125 .B quotacheck
126 exits or asks user for input. When this option is set, the first entry found
127 is always used (this option works in interactive mode too).
128 .TP
129 .B \-F \f2format-name\f1
130 Check and fix quota files of specified format (ie. don't perform format
131 auto-detection). This is recommended as detection might not work well on
132 corrupted quota files.  Possible format names are:
133 .B vfsold
134 (version 1 quota),
135 .B vfsv0
136 (version 2 quota),
137 .B rpc
138 (quota over NFS),
139 .B xfs
140 (quota on XFS filesystem)
141 .TP
142 .B \-a
143 Check all mounted non-NFS filesystems in
144 .B /etc/mtab
145 .TP
146 .B \-R
147 When used together with the
148 .B \-a
149 option, all filesystems except for the root filesystem are checked for
150 quotas.
151
152 .SH NOTE
153 .B quotacheck
154 should only be run by super-user. Non-privileged users are presumably
155 not allowed to read all the directories on the given filesystem.
156
157 .SH "SEE ALSO"
158 .BR quota (1),
159 .BR quotactl (2),
160 .BR fstab (5),
161 .BR quotaon (8),
162 .BR repquota (8),
163 .BR convertquota (8),
164 .BR setquota (8),
165 .BR edquota (8),
166 .BR fsck (8),
167 .BR efsck (8),
168 .BR e2fsck (8),
169 .BR xfsck (8)
170
171 .SH FILES
172 .PD 0
173 .TP 15
174 .B aquota.user or aquota.group
175 located at filesystem root with quotas (version 2 quota, non-XFS
176 filesystems)
177 .TP 15
178 .B quota.user or quota.group
179 located at filesystem root with quotas (version 1 quota, non-XFS
180 filesystems)
181 .TP
182 .B /etc/mtab
183 names and locations of mounted filesystems
184 .SH AUTHOR
185 Jan Kara \<jack@suse.cz\>
186 .br
187 Based on old
188 .B quotacheck
189 by:
190 .br
191 Edvard Tuinder \<ed@elm.net\>
192 .br
193 Marco van Wieringen \<mvw@planets.elm.net\>