mfsquota(1)

NAME
mfsquota - MooseFS quota management tools

SYNOPSIS
mfsgetquota [-?] [-n|-h|-H|-k|-m|-g] DIRECTORY...

mfssetquota [-?] [-n|-h|-H|-k|-m|-g] [-p grace_period|-P] [-iI inodes] [-lL length] [-sS size] [-rR realsize] DIRECTORY...

mfsdelquota [-?] [-n|-h|-H|-k|-m|-g] [-a|-ilsr] [-A|-ILSR] DIRECTORY...

mfscopyquota [-?] [-n|-h|-H|-k|-m|-g] SOURCE_DIRECTORY DESTINATION_DIRECTORY

DESCRIPTION
These tools are used to check, define and delete quotas. Quota is set on a directory. It can be set in one of 4 ways: for number of inodes inside the directory (total sum of the subtree's inodes) with -i, -I options, for sum of (logical) file lengths with -l, -L options, for sum of chunk sizes (not considering goals) with -s, -S options and for physical hdd space (more or less chunk sizes multiplied by goal of each chunk) with -r, -R options. Small letters set soft quota, capital letters set hard quota. -a and -A options in mfsdelquota mean all kinds of quota. Quota behaviour (soft/hard) is described below. For soft quota grace period can be defined using -p option or -P option. Option -p requires an explicit parameter in "time format" (see TIME), with minimum unit being seconds. Option -P will use the default grace period defined in mfsmaster.cfg. When neither -p nor -P options are given, the behaviour of mfssetquota depends on if there was already a quota defined on a given directory. If yes, then old grace period value will be retained. If no, then the command will behave as if -P was used.

Quota is always set on a directory. Hard quota cannot be exceeded anytime. Soft quota can be exceeded for a specified period of time. Once a quota is exceeded in a directory, user must go below the quota during the grace period. If not, the soft quota for this particular directory starts to behave like a hard quota.

Notice! mfscopyquota will copy all existing quotas from SOURCE_DIRECTORY to DESTINATION_DIRECTORY, not but will not delete any quotas in DESTINATION_DIRECTORY. That means all quotas already existing in DESTINATION_DIRECTORY prior to the copying operation and not replaced by the copying operation will still exist afterwards. For example: if SOURCE_DIRECTORY has an inode quota set and DESTINATION_DIRECTORY has a file length quota set, afterwards DESTINATION_DIRECTORY will have both quotas set.

OPTIONS
Most MooseFS tools use -n, -h, -H, -k, -m and -g options to select format of printed numbers. -n causes to print exact numbers, -h uses binary prefixes (Ki, Mi, Gi as 2^10, 2^20 etc.) while -H uses SI prefixes (k, M, G as 10^3, 10^6 etc.). -k, -m and -g show plain numbers respectivaly in kibis (binary kilo - 1024), mebis (binary mega - 1024^2) and gibis (binary giga - 1024^3). The same can be achieved by setting MFSHRFORMAT environment variable to: 0 (exact numbers), 1 or h (binary prefixes), 2 or H (SI prefixes), 3 or h+ (exact numbers and binary prefixes), 4 or H+ (exact numbers and SI prefixes). The default is to print just exact numbers.

Option -? displays short usage message.

NOTES

  TIME

For variables that define time without requiring a single, specific unit, time can be defined as a number of seconds or hours (integer), depending on minimum unit for the variable, or as a time period in one of two possible formats:

first format: #.#T where T is one of: s-seconds, m-minutes, h-hours, d-days or w-weeks; fractions of minimum unit will be rounded

second format: #w#d#h#m#s, any number of definitions can be omitted, but the remaining definitions must be in order (so #d#m is still a valid definition, but #m#d is not); ranges: s,m: 0 to 59, h: 0 to 23, d: 0 t o 6, w is unlimited and the first definition is also always unlimited (i.e. for #d#h#m d will be unlimited)

If a minimum unit of a variable is larger than seconds, units below the minimum one will not be accepted. For example, a variable that has hours as a minimum unit will not accept s and m units.

Examples:

1.5d is the same as 1d12h, is the same as 36h

2.5w is the same as 2w3d12h, is the same as 420h; 2w84h is not a valid time period (h is not the first definition, so it is bound by range 0 to 23)

EXAMPLES

All examples assume that MooseFS client is mounted in /mnt/mfs directory.

mfssetquota -p 24h -i 10000 /mnt/mfs/users/bob
Sets a soft quota for the number of inodes in /users/bob directory on MooseFS. Once 10000 objects are created in the tree under /users/bob, grace period countdown of 24 hours will start. Since there is no hard quota defined, there is no limit to how many additional inodes can be created during those 24 hours, but once that time has passed, no new inode creation attempt will be successful. To erase the quota constraints (grace period countdown and/or full hard quota lock) enough inodes must be deleted from /users/bob to go below the 10000 limit.

mfssetquota -p 24h -i 10000 -I 20000 /mnt/mfs/users/bob
Sets a soft and a hard quota for the number of inodes in /users/bob directory on MooseFS. Once 10000 objects are created in the tree under /users/bob, grace period countdown of 24 hours will start. If, during that period, additional objects are created up to the total number of 20000, hard quota will immediately "kick in", even if the grace period for soft quota has not yet elapsed. Once that happens, no new inode creation attempts will be successful. To erase the quota constraints (grace period countdown and/or full hard quota lock) enough inodes must be deleted from /users/bob to go below the 10000 limit.

mfssetquota -l 2GiB /mnt/mfs/users/bob
If there was never any previous quota on /users/bob directory, this directory will now have a soft quota of total files length (sum of files' lengths) in the whole subtree set to 2 GiB. Since this is a new quota and no -p and -P options were explicitly specified, -P will be assumed and default grace period from mfsmaster.cfg will be used.
If there was already a previous quota on /users/bob directory, let's say like the one in the first example, then this directory will have both soft quota for number of inodes and soft quota for total files length set and the grace period will be the one set with the previous command (so 24 hours in this example).

mfssetquota -p 3d /mnt/mfs/users/bob
If /users/bob has any soft quotas set, grace period of these quotas will now be 3 days (72 hours). If not, this command will be ignored.

mfssetquota -P /mnt/mfs/users/bob
If /users/bob has any soft quotas set, grace period of these quotas will now be whatever is defined in mfsmaster.cfg. If not, this command will be ignored.

mfsdelquota -i /mnt/mfs/users/bob
Soft quota for the number of inodes in /users/bob directory will be deleted. If there was also a hard quota or any other kind of quota (length, size, etc), those will remain unchanged.

mfsdelquota -a -A /mnt/mfs/users/bob
Deletes all possible quotas (all soft and all hard) from /users/bob

REPORTING BUGS
Report bugs to <bugs@moosefs.com>.

COPYRIGHT
Copyright (C) 2026 Jakub Kruszona-Zawadzki, Saglabs SA This file is part of MooseFS. MooseFS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2 (only). MooseFS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see <https://www.gnu.org/licenses/>.

SEE ALSO
mfsmount(8), mfstools(1)