{
    "mode": "man",
    "parameter": "xfs_quota",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/xfs_quota/8/json",
    "generated": "2026-05-30T07:10:52Z",
    "synopsis": "xfsquota  [ -x ] [ -f ] [ -p prog ] [ -c cmd ] ... [ -d project ] ... [ -D projectsfile ] [",
    "sections": {
        "NAME": {
            "content": "xfsquota - manage use of quota on XFS filesystems\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "xfsquota  [ -x ] [ -f ] [ -p prog ] [ -c cmd ] ... [ -d project ] ... [ -D projectsfile ] [",
            "subsections": [
                {
                    "name": "-P",
                    "content": "xfsquota -V\n",
                    "flag": "-P"
                }
            ]
        },
        "DESCRIPTION": {
            "content": "xfsquota is a utility for reporting and editing various aspects of filesystem quota.\n\nThe options to xfsquota are:\n",
            "subsections": [
                {
                    "name": "-c",
                    "content": "command  line. Multiple -c arguments may be given.  The commands are run in the se‐\nquence given, then the program exits.\n",
                    "flag": "-c"
                },
                {
                    "name": "-p",
                    "content": "xfsquota.\n",
                    "flag": "-p"
                },
                {
                    "name": "-x",
                    "content": "MANDS section below) which allow modifications to the quota  system  are  available\nonly in expert mode.\n",
                    "flag": "-x"
                },
                {
                    "name": "-f",
                    "content": "mands are available for use on some foreign (non-XFS) filesystems.\n",
                    "flag": "-f"
                },
                {
                    "name": "-d",
                    "content": "Project names or numeric identifiers may be specified with this option,  which  re‐\nstricts  the  output  of  the  individual xfsquota commands to the set of projects\nspecified. Multiple -d arguments may be given.\n",
                    "flag": "-d"
                },
                {
                    "name": "-D",
                    "content": "Specify a file containing the mapping of numeric project identifiers  to  directory\ntrees.  /etc/projects as default, if this option is none.\n",
                    "flag": "-D"
                },
                {
                    "name": "-P",
                    "content": "Specify  a  file  containing  the mapping of numeric project identifiers to project\nnames.  /etc/projid as default, if this option is none.\n",
                    "flag": "-P"
                },
                {
                    "name": "-V",
                    "content": "The optional path argument(s) can be used to specify mount points or device files which iden‐\ntify XFS filesystems. The output of the individual xfsquota commands will then be restricted\nto the set of filesystems specified.\n\nThis manual page is divided into two sections - firstly, information for users of filesystems\nwith  quota  enabled, and the xfsquota commands of interest to such users; and then informa‐\ntion which is useful only to administrators of XFS filesystems using quota and the quota com‐\nmands which allow modifications to the quota system.\n\nNote that common to almost all of the individual commands described below are the options for\nspecifying which quota types are of interest - user quota  (-u),  group  quota  (-g),  and/or\nproject quota (-p).  Also, several commands provide options to operate on \"blocks used\" (-b),\n\"inodes used\" (-i), and/or \"realtime blocks used\" (-r).\n\nMany commands also have extensive online help. Use the help command for more details  on  any\ncommand.\n",
                    "flag": "-V"
                }
            ]
        },
        "QUOTA OVERVIEW": {
            "content": "In  most  computing environments, disk space is not infinite.  The quota subsystem provides a\nmechanism to control usage of disk space.  Quotas can be set  for  each  individual  user  on\nany/all of the local filesystems.  The quota subsystem warns users when they exceed their al‐\nlotted limit, but allows some extra space for current work (hard limit/soft limit).  In addi‐\ntion,  XFS filesystems with limit enforcement turned off can be used as an effective disk us‐\nage accounting system.\n",
            "subsections": [
                {
                    "name": "Users' View of Disk Quotas",
                    "content": "To most users, disk quotas are either of no concern or a fact of life that cannot be avoided.\nThere are two possible quotas that can be imposed - a limit can be set on the amount of space\na user can occupy, and there may be a limit on the number of files (inodes) they can own.\n\nThe quota command provides information on the quotas that have been set by the system  admin‐\nistrators and current usage.\n\nThere  are  four  numbers for each limit:  current usage, soft limit (quota), hard limit, and\ntime limit.  The soft limit is the number of 1K-blocks (or files) that the user  is  expected\nto  remain  below.   The  hard  limit cannot be exceeded.  If a user's usage reaches the hard\nlimit, further requests for space (or attempts to create a file) fail  with  the  \"Quota  ex‐\nceeded\" (EDQUOT) error.\n\nWhen a user exceeds the soft limit, the timer is enabled.  Any time the quota drops below the\nsoft limits, the timer is disabled.  If the timer pops, the particular limit  that  has  been\nexceeded  is  treated  as if the hard limit has been reached, and no more resources are allo‐\ncated to the user.  The only way to reset this condition, short of turning off limit enforce‐\nment  or  increasing  the  limit, is to reduce usage below quota.  Only the superuser (i.e. a\nsufficiently capable process) can set the time limits and this is done on  a  per  filesystem\nbasis.\n"
                },
                {
                    "name": "Surviving When the Quota Limit Is Reached",
                    "content": "In  most  cases,  the  only  way for a user to recover from over-quota conditions is to abort\nwhatever activity is in progress on the filesystem that has reached its limit, remove  suffi‐\ncient files to bring the limit back below quota, and retry the failed program.\nHowever,  if  a  user  is in the editor and a write fails because of an over quota situation,\nthat is not a suitable course of action.  It is most  likely  that  initially  attempting  to\nwrite  the file has truncated its previous contents, so if the editor is aborted without cor‐\nrectly writing the file, not only are the recent changes lost, but  possibly  much,  or  even\nall, of the contents that previously existed.\nThere  are several possible safe exits for a user caught in this situation.  They can use the\neditor shell escape command to examine their file space and remove surplus  files.   Alterna‐\ntively, using sh(1), they can suspend the editor, remove some files, then resume it.  A third\npossibility is to write the file to some other filesystem (perhaps to a file on  /tmp)  where\nthe  user's quota has not been exceeded.  Then after rectifying the quota situation, the file\ncan be moved back to the filesystem it belongs on.\n"
                },
                {
                    "name": "Default Quotas",
                    "content": "The XFS quota subsystem allows a default quota to be enforced for any user, group or  project\nwhich  does  not have a quota limit explicitly set.  These limits are stored in and displayed\nas ID 0's limits, although they do not actually limit ID 0.\n"
                }
            ]
        },
        "USER COMMANDS": {
            "content": "print  Lists all paths with devices/project identifiers.  The path list can come from several\nplaces - the command line, the mount table, and the /etc/projects file.\n\ndf     See the free command.\n\nquota [ -g | -p | -u ] [ -bir ] [ -hnNv ] [ -f file ] [ ID | name ] ...\nShow  individual  usage and limits, for a single user name or numeric user ID.  The -h\noption reports in a \"human-readable\" format similar to the df(1) command. The  -n  op‐\ntion reports the numeric IDs rather than the name. The -N option omits the header. The\n-v option outputs verbose information. The -f option sends the output to file  instead\nof stdout.\n\nfree [ -bir ] [ -hN ] [ -f file ]\nReports  filesystem usage, much like the df(1) utility.  It can show usage for blocks,\ninode, and/or realtime block space, and shows used, free,  and  total  available.   If\nproject  quota  are  in use (see the DIRECTORY TREE QUOTA section below), it will also\nreport utilisation for those projects (directory trees). The -h option  reports  in  a\n\"human-readable\" format. The -N option omits the header. The -f option outputs the re‐\nport to file instead of stdout.\n\nhelp [ command ]\nOnline help for all commands, or one specific command.\n\nquit   Exit xfsquota.\n\nq      See the quit command.\n",
            "subsections": []
        },
        "QUOTA ADMINISTRATION": {
            "content": "The XFS quota system differs to that of other filesystems in a number of ways.   Most  impor‐\ntantly, XFS considers quota information as filesystem metadata and uses journaling to provide\na higher level guarantee of consistency.  As such, it is administered differently, in partic‐\nular:\n\n1.     The  quotacheck  command  has  no effect on XFS filesystems.  The first time quota ac‐\ncounting is turned on (at mount time), XFS does an  automatic  quotacheck  internally;\nafterwards,  the  quota  system  will always be completely consistent until quotas are\nmanually turned off.\n\n2.     There is no need for quota file(s) in the root of the XFS filesystem.\n\n3.     XFS distinguishes between quota accounting and limit  enforcement.   Quota  accounting\nmust be turned on at the time of mounting the XFS filesystem.  However, it is possible\nto turn on/off limit enforcement any time quota accounting is turned on.  The  \"quota\"\noption  to  the  mount  command turns on both (user) quota accounting and enforcement.\nThe \"uqnoenforce\" option must be used to turn on user accounting with  limit  enforce‐\nment disabled.\n\n4.     Turning  on  quotas  on the root filesystem is slightly different from the above.  For\nLinux XFS, the quota mount flags must be passed in with the \"rootflags=\" boot  parame‐\nter.\n\n5.     It  is  useful to use the state to monitor the XFS quota subsystem at various stages -\nit can be used to see if quotas are turned on, and also to monitor the space  occupied\nby the quota system itself..\n\n6.     There  is  a  mechanism  built  into xfsdump that allows quota limit information to be\nbacked up for later restoration, should the need arise.\n\n7.     Quota limits cannot be set before turning on quotas on.\n\n8.     XFS filesystems keep quota accounting on the superuser (user ID zero),  and  the  tool\nwill display the superuser's usage information.  However, limits are never enforced on\nthe superuser (nor are they enforced for group and project ID zero).\n\n9.     XFS filesystems perform quota accounting whether the user has quota limits or not.\n\n10.    XFS supports the notion of project quota, which can be used to implement a form of di‐\nrectory  tree  quota (i.e. to restrict a directory tree to only being able to use up a\ncomponent of the filesystems available space; or simply to keep track of the amount of\nspace used, or number of inodes, within the tree).\n",
            "subsections": []
        },
        "ADMINISTRATOR COMMANDS": {
            "content": "path [ N ]\nLists  all  paths  with devices/project identifiers or set the current path to the Nth\nlist entry (the current path is used by many of the commands described here, it  iden‐\ntifies  the  filesystem  toward  which a command is directed).  The path list can come\nfrom several places - the command line, the mount table, and the /etc/projects file.\n\nreport [ -gpu ] [ -bir ] [ -ahntlLNU ] [ -f file ]\nReport filesystem quota information.  This reports all quota usage for  a  filesystem,\nfor the specified quota type (u/g/p and/or blocks/inodes/realtime).  It reports blocks\nin 1KB units by default. The -h option reports in a \"human-readable\" format similar to\nthe  df(1) command. The -f option outputs the report to file instead of stdout. The -a\noption  reports  on  all  filesystems.  By  default,   outputs   the   name   of   the\nuser/group/project.  If  no name is defined for a given ID, outputs the numeric ID in‐\nstead. The -n option outputs the numeric ID instead of the name. The -L and -U options\nspecify  lower and upper ID bounds to report on.  If upper/lower bounds are specified,\nthen by default only the IDs will be displayed in output; with the -l option, a lookup\nwill  be  performed to translate these IDs to names. The -N option reports information\nwithout the header line. The -t option performs a terse report.\n\nstate [ -gpu ] [ -av ] [ -f file ]\nReport overall quota state information.  This reports on the state of  quota  account‐\ning,  quota enforcement, and the number of extents being used by quota metadata within\nthe filesystem. The -f option outputs state information to file instead of stdout. The\n-a option reports state on all filesystems and not just the current path.\n\nlimit  [ -g | -p | -u ] bsoft=N | bhard=N | isoft=N | ihard=N | rtbsoft=N | rtbhard=N -d | id\n| name\nSet quota block limits (bhard/bsoft), inode count limits (ihard/isoft) and/or realtime\nblock  limits  (rtbhard/rtbsoft).  The -d option (defaults) can be used to set the de‐\nfault value that will be used, otherwise a specific user/group/project name or numeric\nidentifier must be specified.\n\ntimer [ -g | -p | -u ] [ -bir ] value [ -d | id | name ]\nAllows  the  quota enforcement timeout (i.e. the amount of time allowed to pass before\nthe soft limits are enforced as the hard limits) to be modified. The  current  timeout\nsetting can be displayed using the state command.\nWhen  setting  the  default timer via the -d option, or for id 0, or if no argument is\ngiven after value the value argument is a number of seconds  indicating  the  relative\namount of time after soft limits are exceeded, before hard limits are enforced.\nWhen setting any other individual timer by id or name, the value is the number of sec‐\nonds from now, at which time the hard limits will be enforced.  This allows  extending\nthe grace time of an individual user who has exceeded soft limits.\nFor  value,  units  of 'minutes', 'hours', 'days', and 'weeks' are also understood (as\nare their abbreviations 'm', 'h', 'd', and 'w').\n\nwarn [ -g | -p | -u ] [ -bir ] value -d | id | name\nAllows the quota warnings limit (i.e. the number of times a warning will  be  send  to\nsomeone over quota) to be viewed and modified. The -d option (defaults) can be used to\nset the default time that will be used, otherwise a specific  user/group/project  name\nor  numeric  identifier must be specified.  NOTE: this feature is not currently imple‐‐\nmented.\n\nenable [ -gpu ] [ -v ]\nSwitches on quota enforcement for the filesystem identified by the current path.  This\nrequires the filesystem to have been mounted with quota enabled, and for accounting to\nbe currently active. The -v option (verbose) displays the state  after  the  operation\nhas completed.\n\ndisable [ -gpu ] [ -v ]\nDisables quota enforcement, while leaving quota accounting active. The -v option (ver‐\nbose) displays the state after the operation has completed.\n\noff [ -gpu ] [ -v ]\nPermanently switches quota off for the filesystem  identified  by  the  current  path.\nQuota can only be switched back on subsequently by unmounting and then mounting again.\n\nremove [ -gpu ] [ -v ]\nRemove  any  space  allocated  to quota metadata from the filesystem identified by the\ncurrent path.  Quota must not be enabled on the filesystem, else this  operation  will\nreport an error.\n\ndump [ -g | -p | -u ] [ -f file ]\nDump  out quota limit information for backup utilities, either to standard output (de‐\nfault) or to a file.  This is only the limits, not the usage information, of course.\n\nrestore [ -g | -p | -u ] [ -f file ]\nRestore quota limits from a backup file.  The file must be in the format  produced  by\nthe dump command.\n\nquot [ -g | -p | -u ] [ -bir ] [ -acnv ] [ -f file ]\nSummarize  filesystem  ownership, by user, group or project.  This command uses a spe‐\ncial XFS \"bulkstat\" interface to quickly scan an entire filesystem  and  report  usage\ninformation.   This command can be used even when filesystem quota are not enabled, as\nit is a full-filesystem scan (it may also take a long time...). The -a option displays\ninformation  on  all  filesystems. The -c option displays a histogram instead of a re‐\nport. The -n option displays numeric IDs rather than names.  The  -v  option  displays\nverbose information. The -f option send the output to file instead of stdout.\n\nproject [ -cCs [ -d depth ] [ -p path ] id | name ]\nThe  -c, -C, and -s options allow the directory tree quota mechanism to be maintained.\n-d allows one to limit recursion level when processing project directories and -p  al‐\nlows  one  to  specify project paths at command line ( instead of /etc/projects ). All\noptions are discussed in detail below.\n",
            "subsections": []
        },
        "DIRECTORY TREE QUOTA": {
            "content": "The project quota mechanism in XFS can be used to implement a form of directory  tree  quota,\nwhere  a  specified  directory and all of the files and subdirectories below it (i.e. a tree)\ncan be restricted to using a subset of the available space in the filesystem.\n\nA managed tree must be setup initially using the -s option to the project command. The speci‐\nfied project name or identifier is matched to one or more trees defined in /etc/projects, and\nthese trees are then recursively descended to mark the affected inodes as being part of  that\ntree.   This  process  sets an inode flag and the project identifier on every file in the af‐\nfected tree.  Once this has been done, new files created in the tree  will  automatically  be\naccounted to the tree based on their project identifier.  An attempt to create a hard link to\na file in the tree will only succeed if the project identifier matches the project identifier\nfor  the  tree.   The xfsio utility can be used to set the project ID for an arbitrary file,\nbut this can only be done by a privileged user.\n\nA previously setup tree can be cleared from project quota control through use of the  project",
            "subsections": [
                {
                    "name": "-C",
                    "content": "quota control.\n\nFinally, the project -c option can be used to check whether a tree is setup, it reports noth‐\ning  if  the  tree is correct, otherwise it reports the paths of inodes which do not have the\nproject ID of the rest of the tree, or if the inode flag is not set.\n\nOption -d can be used to limit recursion level (-1 is infinite, 0 is top  level  only,  1  is\nfirst level ... ).  Option -p adds possibility to specify project paths in command line with‐\nout a need for /etc/projects to exist. Note that if projects file  exists  then  it  is  also\nused.\n\n",
                    "flag": "-C"
                }
            ]
        },
        "EXAMPLES": {
            "content": "Enabling quota enforcement on an XFS filesystem (restrict a user to a set amount of space).\n\n# mount -o uquota /dev/xvm/home /home\n# xfsquota -x -c 'limit bsoft=500m bhard=550m tanya' /home\n# xfsquota -x -c report /home\n\nEnabling  project  quota on an XFS filesystem (restrict files in log file directories to only\nusing 1 gigabyte of space).\n\n# mount -o prjquota /dev/xvm/var /var\n# echo 42:/var/log >> /etc/projects\n# echo logfiles:42 >> /etc/projid\n# xfsquota -x -c 'project -s logfiles' /var\n# xfsquota -x -c 'limit -p bhard=1g logfiles' /var\n\nSame as above without a need for configuration files.\n\n# rm -f /etc/projects /etc/projid\n# mount -o prjquota /dev/xvm/var /var\n# xfsquota -x -c 'project -s -p /var/log 42' /var\n# xfsquota -x -c 'limit -p bhard=1g 42' /var\n",
            "subsections": []
        },
        "CAVEATS": {
            "content": "The XFS allocation mechanism will always reserve the maximum amount of space required  before\nproceeding  with an allocation.  If insufficient space for this reservation is available, due\nto the block quota limit being reached for example, this may result in the allocation failing\neven though there is sufficient space.  Quota enforcement can thus sometimes happen in situa‐\ntions where the user is under quota and the end result of some  operation  would  still  have\nleft  the user under quota had the operation been allowed to run its course.  This additional\noverhead is typically in the range of tens of blocks.\n\nBoth of these properties are unavoidable side effects of the way XFS operates, so  should  be\nkept in mind when assigning block limits.\n",
            "subsections": []
        },
        "BUGS": {
            "content": "Quota  support  for  filesystems  with realtime subvolumes is not yet implemented, nor is the\nquota warning mechanism (the Linux warnquota(8) tool can be used to provide similar function‐\nality on that platform).\n",
            "subsections": []
        },
        "FILES": {
            "content": "/etc/projects       Mapping of numeric project identifiers to directories trees.\n/etc/projid         Mapping of numeric project identifiers to project names.\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "df(1), mount(1), sync(2), projid(5), projects(5).  xfs(5).  warnquota(8),\n\n\n\nxfsquota(8)",
            "subsections": []
        }
    },
    "summary": "xfsquota - manage use of quota on XFS filesystems",
    "flags": [
        {
            "flag": "-c",
            "long": null,
            "arg": null,
            "description": "command line. Multiple -c arguments may be given. The commands are run in the se‐ quence given, then the program exits."
        },
        {
            "flag": "-p",
            "long": null,
            "arg": null,
            "description": "xfsquota."
        },
        {
            "flag": "-x",
            "long": null,
            "arg": null,
            "description": "MANDS section below) which allow modifications to the quota system are available only in expert mode."
        },
        {
            "flag": "-f",
            "long": null,
            "arg": null,
            "description": "mands are available for use on some foreign (non-XFS) filesystems."
        },
        {
            "flag": "-d",
            "long": null,
            "arg": null,
            "description": "Project names or numeric identifiers may be specified with this option, which re‐ stricts the output of the individual xfsquota commands to the set of projects specified. Multiple -d arguments may be given."
        },
        {
            "flag": "-D",
            "long": null,
            "arg": null,
            "description": "Specify a file containing the mapping of numeric project identifiers to directory trees. /etc/projects as default, if this option is none."
        },
        {
            "flag": "-P",
            "long": null,
            "arg": null,
            "description": "Specify a file containing the mapping of numeric project identifiers to project names. /etc/projid as default, if this option is none."
        },
        {
            "flag": "-V",
            "long": null,
            "arg": null,
            "description": "The optional path argument(s) can be used to specify mount points or device files which iden‐ tify XFS filesystems. The output of the individual xfsquota commands will then be restricted to the set of filesystems specified. This manual page is divided into two sections - firstly, information for users of filesystems with quota enabled, and the xfsquota commands of interest to such users; and then informa‐ tion which is useful only to administrators of XFS filesystems using quota and the quota com‐ mands which allow modifications to the quota system. Note that common to almost all of the individual commands described below are the options for specifying which quota types are of interest - user quota (-u), group quota (-g), and/or project quota (-p). Also, several commands provide options to operate on \"blocks used\" (-b), \"inodes used\" (-i), and/or \"realtime blocks used\" (-r). Many commands also have extensive online help. Use the help command for more details on any command."
        }
    ],
    "examples": [
        "Enabling quota enforcement on an XFS filesystem (restrict a user to a set amount of space).",
        "# mount -o uquota /dev/xvm/home /home",
        "# xfsquota -x -c 'limit bsoft=500m bhard=550m tanya' /home",
        "# xfsquota -x -c report /home",
        "Enabling  project  quota on an XFS filesystem (restrict files in log file directories to only",
        "using 1 gigabyte of space).",
        "# mount -o prjquota /dev/xvm/var /var",
        "# echo 42:/var/log >> /etc/projects",
        "# echo logfiles:42 >> /etc/projid",
        "# xfsquota -x -c 'project -s logfiles' /var",
        "# xfsquota -x -c 'limit -p bhard=1g logfiles' /var",
        "Same as above without a need for configuration files.",
        "# rm -f /etc/projects /etc/projid",
        "# mount -o prjquota /dev/xvm/var /var",
        "# xfsquota -x -c 'project -s -p /var/log 42' /var",
        "# xfsquota -x -c 'limit -p bhard=1g 42' /var"
    ],
    "see_also": [
        {
            "name": "df",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/df/1/json"
        },
        {
            "name": "mount",
            "section": "1",
            "url": "https://www.chedong.com/phpMan.php/man/mount/1/json"
        },
        {
            "name": "sync",
            "section": "2",
            "url": "https://www.chedong.com/phpMan.php/man/sync/2/json"
        },
        {
            "name": "projid",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/projid/5/json"
        },
        {
            "name": "projects",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/projects/5/json"
        },
        {
            "name": "xfs",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/xfs/5/json"
        },
        {
            "name": "warnquota",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/warnquota/8/json"
        },
        {
            "name": "xfsquota",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/xfsquota/8/json"
        }
    ]
}