1quotacheck(8) System Manager's Manual quotacheck(8)
2
3
4
6 quotacheck - scan a filesystem for disk usage, create, check and repair
7 quota files
8
10 quotacheck [ -gubcfinvdMmR ] [ -F quota-format ] -a | filesystem
11
13 quotacheck examines each filesystem, builds a table of current disk
14 usage, and compares this table against that recorded in the disk quota
15 file for the filesystem (this step is ommitted if option -c is speci‐
16 fied). If any inconsistencies are detected, both the quota file and the
17 current system copy of the incorrect quotas are updated (the latter
18 only occurs if an active filesystem is checked which is not advised).
19 By default, only user quotas are checked. quotacheck expects each
20 filesystem to be checked to have quota files named [a]quota.user and
21 [a]quota.group located at the root of the associated filesystem. If a
22 file is not present, quotacheck will create it.
23
24 If the quota file is corrupted, quotacheck tries to save as much data
25 as possible. Rescuing data may need user intervention. With no addi‐
26 tional options quotacheck will simply exit in such a situation. When in
27 interactive mode (option -i) , the user is asked for advice. Advice can
28 also be provided from command line (see option -n) , which is useful
29 when quotacheck is run automatically (ie. from script) and failure is
30 unacceptable.
31
32 quotacheck should be run each time the system boots and mounts non-
33 valid filesystems. This is most likely to happen after a system crash.
34
35 It is strongly recommended to run quotacheck with quotas turned off for
36 the filesystem. Otherwise, possible damage or loss to data in the quota
37 files can result. It is also unwise to run quotacheck on a live
38 filesystem as actual usage may change during the scan. To prevent
39 this, quotacheck tries to remount the filesystem read-only before
40 starting the scan. After the scan is done it remounts the filesystem
41 read-write. You can disable this with option -m. You can also make
42 quotacheck ignore the failure to remount the filesystem read-only with
43 option -M.
44
46 -b, --backup
47 Forces quotacheck to make backups of the quota file before writ‐
48 ing the new data.
49
50 -v, --verbose
51 quotacheck reports its operation as it progresses. Normally it
52 operates silently. If the option is specified twice, also the
53 current directory is printed (note that printing can slow down
54 the scan measurably).
55
56 -d, --debug
57 Enable debugging mode. It will result in a lot of information
58 which can be used in debugging the program. The output is very
59 verbose and the scan will be slow.
60
61 -u, --user
62 Only user quotas listed in /etc/mtab or on the filesystems spec‐
63 ified are to be checked. This is the default action.
64
65 -g, --group
66 Only group quotas listed in /etc/mtab or on the filesystems
67 specified are to be checked.
68
69 -c, --create-files
70 Don't read existing quota files. Just perform a new scan and
71 save it to disk. quotacheck also skips scanning of old quota
72 files when they are not found.
73
74 -f, --force
75 Forces checking and writing of new quota files on filesystems
76 with quotas enabled. This is not recommended as the created
77 quota files may be out of sync.
78
79 -M, --try-remount
80 This flag forces checking of filesystem in read-write mode if a
81 remount fails. Do this only when you are sure no process will
82 write to a filesystem while scanning.
83
84 -m, --no-remount
85 Don't try to remount filesystem read-only. See comment with
86 option -M.
87
88 -i, --interactive
89 Interactive mode. By default quotacheck exits when it finds an
90 error. In interactive mode user is asked for input instead. See
91 option -n.
92
93 -n, --use-first-dquot
94 If the quota files become corrupted, it is possible for dupli‐
95 cate entries for a single user or group ID to exist. Normally
96 in this case, quotacheck exits or asks user for input. When this
97 option is set, the first entry found is always used (this option
98 works in interactive mode too).
99
100 -F, --format=format-name
101 Check and fix quota files of specified format (ie. don't perform
102 format auto-detection). This is recommended as detection might
103 not work well on corrupted quota files. Possible format names
104 are: vfsold (version 1 quota), vfsv0 (version 2 quota), rpc
105 (quota over NFS), xfs (quota on XFS filesystem)
106
107 -a, --all
108 Check all mounted non-NFS filesystems in /etc/mtab
109
110 -R, --exclude-root
111 When used together with the -a option, all filesystems except
112 for the root filesystem are checked for quotas.
113
114
116 quotacheck should only be run by super-user. Non-privileged users are
117 presumably not allowed to read all the directories on the given
118 filesystem.
119
120
122 quota(1), quotactl(2), fstab(5), quotaon(8), repquota(8), con‐
123 vertquota(8), setquota(8), edquota(8), fsck(8), efsck(8), e2fsck(8),
124 xfsck(8)
125
126
128 aquota.user or aquota.group
129 located at filesystem root with quotas (version 2 quota,
130 non-XFS filesystems)
131 quota.user or quota.group
132 located at filesystem root with quotas (version 1 quota,
133 non-XFS filesystems)
134 /etc/mtab names and locations of mounted filesystems
136 Jan Kara <jack@suse.cz>
137 Based on old quotacheck by:
138 Edvard Tuinder <ed@elm.net>
139 Marco van Wieringen <mvw@planets.elm.net>
140
141
142
143 Fri Jul 20 2001 quotacheck(8)