QUOTATOOL(8)

πŸ’– NAME πŸ’–

okay so bestie, this is QUOTATOOL(8) from the System Manager's Manual, and it's literally just this:

quotatool β€” manipulate filesystem quotas ✨


🌸 SYNOPSIS 🌸

like, the vibe of how you actually call it:

quotatool [-u [:]uid | -g [:]gid] [-b | -i] [-r | -l NUM | -q NUM]
[-nvR] [-d] filesystem
quotatool (-u | -g) (-b | -i) -t TIME [-nv] filesystem
quotatool [-hV]

πŸ¦‹ DESCRIPTION πŸ¦‹

So quotatool is the tool for manipulating filesystem quotas, no cap. Depending on which commandline options you hand it, it can set hard or soft limits on block and inode usage, and it can set and reset grace periods β€” for users, and (if your system supports it) for groups too 🫢

The filesystem you're setting the quota on is given as the first (and only) non-option element, and it's either:

  • the block special file (i.e. /dev/sda3), or
  • the mount point (i.e. /home)

for the filesystem. That's it, that's the whole thing πŸ’…


✨ OPTIONS ✨

  • -u [[:]uid] β€” set user quotas πŸ‘‘
  • -g [[:]gid] β€” set group quotas πŸ‘‘

so about uid and gid: they're either the numerical ID of the user or group, or its name over in the /etc/passwd and /etc/group files. And the : prefix? That's the sneaky one β€” it lets you use a numerical uid/gid that is not present in /etc/passwd or /etc/group 😌

  • -b β€” set block quotas [default] 🧱
  • -i β€” set inode quotas πŸ”’
The -b and -i options are persistent β€” they stay in effect until they're overridden. They do not clock out, they do not go home, periodt.
  • -R β€” only raise quotas, never lower. This is the safety rail bestie, it makes sure you don't accidentally lower quotas for a user/group πŸ’€
  • -t TIME β€” set the system-wide grace period to TIME.

So TIME is made of: an optional - or + character, a number, and optionally one of these modifiers: "seconds", "minutes", "hours", "days", "weeks", or "months". For ambiguous units you must use abbreviations of at least two characters: "mi" for minutes, "mo" for months. A bare "m" is rejected as ambiguous (rude of it, honestly). The default is "seconds". The argument should be preceded by -u|-g and -b|-i πŸŽ€

  • -r β€” reset the grace period πŸ”„
  • -l NUM β€” set hard limit to NUM 🚧
  • -q NUM β€” set soft limit (quota) to NUM 🌷

And NUM itself? It consists of an optional - or + character, a number (integer or floating point), and optionally one of: "Kb", "Mb", "Gb", "Tb", "bytes", or "blocks". Unique abbreviations are also accepted. The default is "blocks". And the modifiers are base 2 for block quotas (so 1k = 1024), but base 10 for inode quotas (so 1k = 1000) β€” ik, different bases, it's giving chaos but it's the rules 😭

If +/- is supplied, the existing quota is increased or reduced by the specified amount. Slay.

  • -d β€” dump quota info for user/group in a machine readable format:
|------- BLOCKS --------| |-------- FILES --------|
uid/gid mountpoint current quota limit grace current quota limit grace

grace is the number of seconds remaining until the grace time ends. It's zero when quota is not exceeded or grace has expired πŸ•

  • -n β€” dry-run: show what would have been done but don't change anything. Use together with -v πŸ‘€
  • -v β€” verbose output. Use twice or thrice for even more output (debugging) πŸ—£οΈ
  • -h β€” print a usage message to stdout and exit successfully βœ…
  • -V β€” print version information to stdout and exit successfully βœ…

🌈 FILESYSTEMS / FORMATS 🌈

On Linux, quotatool works with both "old", "vfsv0" and "vfsv1" + "generic" kernel-quota formats. The supported filesystems are: ext2, ext3, ext4, ReiserFS and XFS.

FreeBSD / OpenBSD: filesystems UFS and FFS πŸ’™


πŸ“ EXAMPLES πŸ“

Set soft block limit to 800Mb, hard block limit to 1.2 Gb for user mpg4 on /home:

quotatool -u mpg4 -b -q 800M -l 1.2G /home

Raise soft block limit by 100M for non-existent gid 12345 on /dev/loop3:

quotatool -g :12345 -b -q +100M /dev/loop3

Set soft inode limit to 1.8k (1800), hard inode limit to 2000 for user johan on /var:

quotatool -u johan -i -q 1.8K -l 2000 /var

Set the global block grace period to one week on /home:

quotatool -u  -b -t "1 week" /home

Restart inode grace period for user johan on root filesystem:

quotatool -u johan -i -r /

πŸ’œ NOTES πŸ’œ

Grace periods are set on a "global per quotatype and filesystem" basis only. Each quotatype (usrquota / grpquota) on each filesystem has two grace periods β€” one for block limits and one for inode limits. It is not possible to set different grace periods for users on the same filesystem. Soz bestie, that's just how it is πŸ™ˆ

On BSD (FreeBSD, OpenBSD), the grace period is cached by the kernel at quotaon time. After setting the grace period with -t, a quotaoff/quotaon cycle is required for the new value to take effect. This is the same behavior as edquota -t on BSD β€” it is a BSD kernel design choice, not a limitation of quotatool. So don't come for quotatool about it πŸ’…

Using non-existent uids/gids like ":12345" can be useful when configuring quotas on a mounted filesystem which is a separate system in it self, like when preparing an install image or repairing a filesystem from another installation. Super niche, super useful ✨

Limit arguments can be specified in several ways, these are all equivalent:

1M
1m
1Mb
1 "Mb"

Use +/- to raise/lower quotas relative to current limits πŸ“ˆπŸ“‰

Use -v (or -v -v) to see verbose/debug info when running commands πŸ›


πŸŽ€ FILES πŸŽ€

quota.user , quota.group (Linux, FreeBSD, OpenBSD)


πŸ’€ BUGS πŸ’€

Please check https://github.com/ekenberg/quotatool for any open issues. Feel free to add a new issue if you find an unresolved bug! We love a good bug report 🫢

Calling quotatool with more than one -v option may cause a segfault on some systems if vprintf (3) fails to check for NULL arguments. Yeah. That one's real. Be careful out there 😭

⭐ SEE ALSO ⭐

quota(1), quotactl(2), edquota(8), quotacheck(8), quotaon(8), repquota(8)


and that's the whole page bestie πŸ’– this was version 1.8.0, dated 1999 - 2026 β€” yes, a whole era, main character energy from start to finish, ty for reading, mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from