SETQUOTA(8)

πŸ’– SETQUOTA β€” bestie's guide to setting disk quotas πŸ’–

okay so welcome to the glow-up of setquota(8), straight out of the System Manager's Manual. no cap, this is the tool that edits disk quotas from the command line, and by the end of this page you're gonna be so good at it. let's go 🫢


✨ NAME ✨

setquota β€” set disk quotas. short, sweet, iconic. that's the whole name section, bestie, we move. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

like, here's every single way you can call her. all five forms, verbatim, no edits:

setquota [ -rm ] [ -u | -g | -P ] [ -F quotaformat ] name block-
softlimit block-hardlimit inode-softlimit inode-hardlimit -a |
filesystem...

setquota [ -rm ] [ -u | -g | -P ] [ -F quotaformat ] [ -p protoname ]
name -a | filesystem...

setquota -b [ -rm ] [ -u | -g | -P ] [ -F quotaformat ] -a |
filesystem...

setquota -t [ -u | -g | -P ] [ -F quotaformat ] block-grace inode-grace
-a | filesystem...

setquota -T [ -u | -g | -P ] [ -F quotaformat ] name block-grace inode-
grace -a | filesystem...

🌸 DESCRIPTION 🌸

so setquota is a command line quota editor. main character energy fr fr. you tell it the filesystem, the user/group/project name, and the new quotas for that filesystem, all right there on the command line. πŸŽ€

ngl, tiny little detail that matters: if you hand it a number instead of a user/group/project name, it treats that number as an UID/GID/project ID. so don't be surprised when it does exactly that. iykyk.

πŸ”₯ OPTIONS πŸ”₯

  • -r, --remote β€” also edits remote quota, using rpc.rquotad on the remote server to set the quota. lowkey important: this one only works if the quota tools were compiled with support for setting quotas over RPC enabled. no support, no remote, periodt.
  • -m, --no-mixed-pathnames β€” okay so rn, pathnames of NFSv4 mountpoints get sent without a leading slash in the path. rpc.rquotad uses that missing slash to recognize NFSv4 mounts and properly prepend the pseudoroot of the NFS filesystem to the path. if you pass this option, setquota will always send paths with a leading slash. cute for legacy reasons, but be aware: quota over RPC will stop working if you're using the new rpc.rquotad. πŸ™ˆ
  • -F, --format=quotaformat β€” do the setting for a specified format, i.e. don't do format autodetection. possible format names are:
    • vfsold β€” Original quota format with 16-bit UIDs / GIDs
    • vfsv0 β€” Quota format with 32-bit UIDs / GIDs, 64-bit space usage, 32-bit inode usage and limits
    • vfsv1 β€” Quota format with 64-bit quota limits and usage
    • rpc β€” (quota over NFS)
    • xfs β€” (quota on XFS filesystem)
  • -u, --user β€” set user quotas for the named user. this is the default, so if you don't say anything, this is what you get. πŸ’š
  • -g, --group β€” set group quotas for the named group.
  • -P, --project β€” set project quotas for the named project.
  • -p, --prototype=protoname β€” use the quota settings of user, group or project protoname to set the quota for the named user, group or project. copy-paste but make it quota. ✨
  • --always-resolve β€” always try to translate user / group / project name to uid / gid / project ID, even if the name is composed of digits only. (yes, even then. stubborn on purpose.)
  • -b, --batch β€” read the info to set from stdin. the input format is name block-softlimit block-hardlimit inode-softlimit inode-hardlimit. empty lines and lines starting with # are ignored. bulk mode, we love to see it. πŸ“
  • -c, --continue-batch β€” if parsing of an input line in batch mode fails, just keep going and process the next line. resilience queen. πŸ‘‘
  • -t, --edit-period β€” set grace times for users/groups/projects. the times block-grace and inode-grace are specified in seconds.
  • -T, --edit-times β€” alter times for individual user/group/project when softlimit is enforced. the times block-grace and inode-grace are specified in seconds, or they can be the string 'unset'. ⏰
  • -a, --all β€” go through all filesystems with quota in /etc/mtab and perform the setting. yes, all of them. no, it does not ask twice.

πŸ’« the numbers part (do not skip this, bestie) πŸ’«

block-softlimit and block-hardlimit are interpreted as multiples of kibibyte (1024 bytes) blocks by default. and you can slap a symbol on the end of a numeric value to express kibibytes, mebibytes, gibibytes and tebibytes:

  • K β€” kibibytes
  • M β€” mebibytes
  • G β€” gibibytes
  • T β€” tebibytes

inode-softlimit and inode-hardlimit are interpreted literally. you can append k, m, g, and t to a numeric value to express multiples of 10^3, 10^6, 10^9, and 10^12 inodes. (yes, lowercase β€” and yes, decimal, not binary. the vibes are different on purpose. 😭)

to disable a quota, set the corresponding parameter to 0. to change quotas for several filesystems, invoke it once for each filesystem. one at a time, babe.

and this one is non-negotiable: only the super-user may edit quotas. πŸ”’

🧚 FILES 🧚

  • aquota.user or aquota.group β€” quota file at the filesystem root (version 2 quota, non-XFS filesystems)
  • quota.user or quota.group β€” quota file at the filesystem root (version 1 quota, non-XFS filesystems)
  • /etc/mtab β€” mounted filesystem table

🌈 SEE ALSO 🌈

go read these too, they're all part of the lore:


and that's the whole page, bestie!! πŸŽ€ this was SETQUOTA(8) from the System Manager's Manual β€” go forth and set those quotas, you absolute legend. mwah πŸ’–πŸ¦‹πŸ’