mfsquota(1)
π mfsquota(1) β bestie edition π
okay so this is mfsquota, and it's part of MooseFS (yes the whole thing, we're in the MooseFS fam π«Ά).
β¨ NAME β¨
mfsquota β MooseFS quota management tools. it's giving "keep your directory's spending in check" π
πΈ SYNOPSIS πΈ
like literally just run one of these:
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 π
so these tools check, define and delete quotas. and a quota is always set on a directory, periodt. you can set it in one of 4 ways, ok bestie write this down:
- for the number of inodes inside the directory (the total sum of the subtree's inodes) β that's the
-i,-Ioptions - for the sum of (logical) file lengths β that's
-l,-L - for the sum of chunk sizes (not considering goals, mind you) β that's
-s,-S - for physical hdd space (more or less chunk sizes multiplied by the goal of each chunk) β that's
-r,-R
and the β¨vibe ruleβ¨: small letters set soft quota, capital letters set hard quota. lowercase = soft girl era, uppercase = hard boundary no cap.
in mfsdelquota, -a and -A mean all kinds of quota. π
quota behaviour (soft/hard) is described below, keep reading bestie.
for soft quota, a grace period can be defined using the -p option or the -P option. -p requires an explicit parameter in "time format" (peep the TIME section), and the minimum unit is seconds. -P will use the default grace period defined in mfsmaster.cfg. and when neither -p nor -P is given? the behaviour of mfssetquota depends on whether there was already a quota defined on that directory:
- if yes β the old grace period value gets retained, no drama
- if no β the command behaves as if
-Pwas used
quota is always set on a directory, yup. hard quota cannot be exceeded anytime β not even once, not even a little, not even accidentally. soft quota can be exceeded for a specified period of time. once a quota is exceeded in a directory, the user must go below the quota during the grace period. and if they don't? the soft quota for that particular directory starts behaving like a hard quota. that's the glow-up to villain arc, bestie π
Notice! mfscopyquota will copy all existing quotas from SOURCE_DIRECTORY to DESTINATION_DIRECTORY, but it will not delete any quotas in DESTINATION_DIRECTORY. that means all quotas already existing in DESTINATION_DIRECTORY prior to the copying operation β the ones not replaced by the copying operation β will still exist afterwards. example: if SOURCE_DIRECTORY has an inode quota set and DESTINATION_DIRECTORY has a file length quota set, then afterwards DESTINATION_DIRECTORY will have both quotas set. both. iconic. π
π OPTIONS π
most MooseFS tools use -n, -h, -H, -k, -m and -g to pick the format of the printed numbers. here's the tea:
-nβ print exact numbers, no games-hβ use binary prefixes (Ki,Mi,Gias 2^10, 2^20 etc.)-Hβ use SI prefixes (k,M,Gas 10^3, 10^6 etc.)-kβ show plain numbers respectively in kibis (binary kilo β 1024)-mβ show plain numbers respectively in mebis (binary mega β 1024^2)-gβ show plain numbers respectively in gibis (binary giga β 1024^3)-?β displays the short usage message, hi bestie π
you can get the same formatting by setting the MFSHRFORMAT environment variable to:
0β exact numbers1orhβ binary prefixes2orHβ SI prefixes3orh+β exact numbers and binary prefixes4orH+β exact numbers and SI prefixes
and the default? just exact numbers. no frills. π¦
π NOTES π
β° TIME β°
so 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 the 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 the 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 to 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. example: a variable that has hours as a minimum unit will not accept s and m units. sorry bestie, rules are rules. π
Examples:
1.5dis the same as1d12h, is the same as36h2.5wis the same as2w3d12h, is the same as420h;2w84his not a valid time period (his not the first definition, so it is bound by the range 0 to 23)
π EXAMPLES π
all examples assume that the MooseFS client is mounted in /mnt/mfs directory. slay, let's go:
mfssetquota -p 24h -i 10000 /mnt/mfs/users/bob
sets a soft quota for the number of inodes in the /users/bob directory on MooseFS. once 10000 objects are created in the tree under /users/bob, a grace period countdown of 24 hours will start. since there's 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. and 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 the /users/bob directory on MooseFS. once 10000 objects are created in the tree under /users/bob, a grace period countdown of 24 hours will start. if, during that period, additional objects are created up to the total number of 20000, the hard quota will immediately "kick in" β even if the grace period for the 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 the /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 the default grace period from mfsmaster.cfg will be used.
if there was already a previous quota on the /users/bob directory β let's say like the one in the first example β then this directory will have both a soft quota for number of inodes and a 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, the 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, the 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 the /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. we don't touch what we don't have to π
mfsdelquota -a -A /mnt/mfs/users/bob
deletes all possible quotas (all soft and all hard) from /users/bob. all of them. gone. no crumbs. π₯
π REPORTING BUGS π
report bugs to <bugs@moosefs.com>. they wanna hear about it, fr fr π
π 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 π¦
that's a wrap bestie π this was MooseFS 4.59.2-1, from May 2026, and that's the whole entire vibe check. go forth and quota responsibly, iykyk π§ββοΈβ¨
π¦ where this page comes from
- arch rolling: moosefs 4.59.2-2 Β· GPL-2.0-only
- nixos 26.05: moosefs 4.59.2
- nixpkgs unstable: moosefs 4.59.2
- ubuntu stonking: moosefs-client 4.59.2-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms