quotacheck(8)
๐ธ quotacheck(8) โ the girlies' guide to scanning filesystems for disk usage ๐ฆ
okay so bestie, this is quotacheck from the System Manager's Manual, and no cap it's the moment your quota files get a full glow-up. She scans, she builds, she compares, she fixes. main character energy fr fr. โจ
โจ NAME โจ
quotacheck โ scan a filesystem for disk usage, create, check and repair quota files ๐
๐ SYNOPSIS ๐
quotacheck [ -gubcfinvdMmR ] [ -F quota-format ] -a | filesystem
๐ DESCRIPTION ๐
okay so here's the tea. quotacheck goes through each filesystem one by one, builds a whole table of current disk usage, and then compares that table against whatever's recorded in the disk quota file for that filesystem. (lowkey, that comparison step gets skipped entirely if you pass -c.) and if it spots any inconsistencies? she updates both the quota file and the current system copy of the incorrect quotas. (that second one only happens if you're checking an active filesystem, which โ bestie, no. not advised. ๐)
by default, only user quotas get checked. and quotacheck expects every filesystem it's checking to have quota files named [a]quota.user and [a]quota.group sitting at the root of the associated filesystem. if a file isn't there? she just creates it. iconic. ๐
now, if the quota file is corrupted, quotacheck tries to save as much data as she possibly can. rescuing data may need user intervention โ so with no additional options, quotacheck will simply exit in that situation. when you're in interactive mode (that's option -i), the user gets asked for advice. advice can also come from the command line (see option -n), which is super useful when quotacheck is being run automatically (ie. from a script) and failure is simply not acceptable. ๐ซถ
quotacheck should be run each time the system boots and mounts non-valid filesystems. that's most likely to happen after a system crash. ๐ญ
and here's the big one: it is strongly recommended to run quotacheck with quotas turned off for the filesystem. otherwise, possible damage or loss to data in the quota files can result. it's also unwise to run quotacheck on a live filesystem, because actual usage may change during the scan. to prevent that, quotacheck tries to remount the filesystem read-only before starting the scan, and after the scan is done she remounts it read-write. you can disable that with option -m. you can also make quotacheck ignore the failure to remount the filesystem read-only with option -M.
โจ vibe check: read-only remount = the safe girly route. don't skip it unless you know what you're doing.
๐ OPTIONS ๐
-b,--backupโ forcesquotacheckto make backups of the quota file before writing the new data. back it up bestie, always. ๐-v,--verboseโquotacheckreports its operation as it progresses. normally she operates silently. if you specify the option twice, the current directory also gets printed (note that printing can slow down the scan measurably). ๐ญ-d,--debugโ enable debugging mode. it results in a lot of information which can be used in debugging the program. the output is very verbose and the scan will be slow. ๐-u,--userโ only user quotas listed in/etc/mtabor on the filesystems specified are to be checked. this is the default action. ๐-g,--groupโ only group quotas listed in/etc/mtabor on the filesystems specified are to be checked. ๐ฆ-c,--create-filesโ don't read existing quota files. just perform a new scan and save it to disk.quotacheckalso skips scanning of old quota files when they're not found. โจ-f,--forceโ forces checking and writing of new quota files on filesystems with quotas enabled. this is not recommended, as the created quota files may be out of sync. ๐-M,--try-remountโ this flag forces checking of filesystem in read-write mode if a remount fails. do this only when you're sure no process will write to a filesystem while scanning. ๐ฅ-m,--no-remountโ don't try to remount filesystem read-only. see comment with option-M. ๐ธ-i,--interactiveโ interactive mode. by defaultquotacheckexits when it finds an error. in interactive mode, the user is asked for input instead. see option-n. ๐ฌ-n,--use-first-dquotโ if the quota files become corrupted, it's possible for duplicate entries for a single user or group ID to exist. normally in this case,quotacheckexits or asks the user for input. when this option is set, the first entry found is always used (this option works in interactive mode too). โญ-F,--format=format-nameโ check and fix quota files of specified format (ie. don't perform format auto-detection). this is recommended, as detection might not work well on corrupted quota files. possible format names are:vfsoldโ Original quota format with 16-bit UIDs / GIDsvfsv0โ Quota format with 32-bit UIDs / GIDs, 64-bit space usage, 32-bit inode usage and limitsvfsv1โ Quota format with 64-bit quota limits and usagerpcโ (quota over NFS)xfsโ (quota on XFS filesystem)
-a,--allโ check all mounted non-NFS filesystems in/etc/mtab๐-R,--exclude-rootโ when used together with the-aoption, all filesystems except for the root filesystem are checked for quotas. ๐
๐ NOTE ๐
quotacheck should only be run by super-user. non-privileged users are presumably not allowed to read all the directories on the given filesystem. so like, know your place bestie (affectionately). ๐
๐ฆ SEE ALSO ๐ฆ
quota(1), quotactl(2), fstab(5), quotaon(8), repquota(8), convertquota(8), setquota(8), edquota(8), fsck(8), efsck(8), e2fsck(8), xfsck(8)
๐ FILES ๐
aquota.useroraquota.groupโ located at filesystem root with quotas (version 2 quota, non-XFS filesystems)quota.userorquota.groupโ located at filesystem root with quotas (version 1 quota, non-XFS filesystems)/etc/mtabโ names and locations of mounted filesystems
๐ AUTHOR ๐
Jan Kara <jack@suse.cz>
based on old quotacheck by:
- Edvard Tuinder
<ed@elm.net> - Marco van Wieringen
<mvw@planets.elm.net>
and that's the whole page, bestie!! this came out of the System Manager's Manual on Fri Jul 20 2001, and it's still serving quotacheck(8) realness. periodt. ๐โจ๐
๐ฆ where this page comes from
- alpine 3.24: quota-tools-doc 4.11-r0 ยท GPL-2.0-or-later
- centos-stream 10: quota 1:4.09-10.el10 ยท GPL-2.0-only AND GPL-2.0-or-later
- centos-stream 9: quota 1:4.09-4.el9 ยท GPLv2 and GPLv2+
- debian bookworm: quota 4.06-1+b2
- debian trixie: quota 4.09-1+b1
- fedora 43: quota 1:4.10-2.fc43 ยท GPL-2.0-only AND GPL-2.0-or-later
- fedora 44: quota 1:4.11-2.fc44 ยท GPL-2.0-only AND GPL-2.0-or-later
- nixpkgs unstable: quota 4.11
- opensuse-leap 16.0: quota 4.09-160000.3.1 ยท GPL-2.0-only
- opensuse-leap 16.0: quota 4.09-160000.3.1 ยท GPL-2.0-only
- opensuse-leap 16.0: quota 4.09-160000.3.1 ยท GPL-2.0-only
- opensuse-leap 16.0: quota 4.09-160000.3.1 ยท GPL-2.0-only
- ubuntu jammy: quota 4.06-1build2
- ubuntu noble: quota 4.06-1build6
- ubuntu questing: quota 4.09-1
- ubuntu resolute: quota 4.09-1build1
- ubuntu stonking: quota 4.11-1
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms