mfssclass(1)
π mfssclass β MooseFS storage classes management tools
okay bestie, gather round, because this one is genuinely part of MooseFS and it's all about storage classes π β the glow-up version of the old goal thing. Let's go.
β¨ SYNOPSIS β¨
mfsgetsclass [-?] [-r] [-n|-h|-H|-k|-m|-g] OBJECT...
mfssetsclass [-?] [-r] [-n|-h|-H|-k|-m|-g] SCLASS_NAME OBJECT...
mfscopysclass [-?] [-r] [-n|-h|-H|-k|-m|-g] SOURCE_OBJECT OBJECT...
mfsxchgsclass [-?] [-r] [-n|-h|-H|-k|-m|-g] SRC_SCLASS_NAME
DST_SCLASS_NAME OBJECT...
like, four whole little tools in one manpage. they're a family. a squad. π«Ά
πΈ DESCRIPTION πΈ
These tools operate on a filesystem object's β that's a file, a special file, or a directory β storage class name. It's literally an extended version of the older MooseFS goal mechanism, so if you remember goals, this is that but with main character energy. β¨
Every fresh install of MooseFS comes with several predefined storage classes already in there (peep the NOTES section, i got you). Any other classes can be created / modified / deleted / etc. by an administrator using the mfsscadmin tool. that's a different manpage, don't @ me.
mfsgetsclassβ prints the current storage class of the given object(s). π΅οΈβοΈ With the-roption you get recursive mode: for directories it shows the number of objects in each storage class contained in the whole subtree of that directory. For files there's no difference. none. zero. file is file.mfssetsclassβ changes the current storage class of the given object(s).-rgives you recursive mode again. πmfscopysclassβ copies the storage class from one object (SOURCE_OBJECT) to the given object(s). copy paste but make it filesystem.mfsxchgsclassβ sets the storage class of the given object(s) toDST_SCLASS_NAME, but only when the current storage class is set toSRC_SCLASS_NAME. conditional queen. it's giving "if and only if".
π OPTIONS π
Most MooseFS tools use -n, -h, -H, -k, -m and -g options to pick the format of printed numbers. Here's the whole tea:
-nβ print exact numbers. no rounding, no vibe, just the truth.-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 in kibis (binary kilo β 1024).-mβ show plain numbers in mebis (binary mega β 1024^2).-gβ show plain numbers in gibis (binary giga β 1024^3).-rβ recursive mode, as described above for each tool. π-?β displays a short usage message. the "help me bestie" button. π
You can get the same formatting behaviour by setting the MFSHRFORMAT environment variable to:
0β exact numbers1orhβ binary prefixes2orHβ SI prefixes3orh+β exact numbers and binary prefixes4orH+β exact numbers and SI prefixes
The default is to print just exact numbers. π (yes, exactly as it sounds, no secret extra mode, i checked.)
π¦ NOTES π¦
INHERITANCE
When a new object is created in MooseFS, the storage class is inherited from the parent directory. πΆ A newly created object always inherits the current value of its parent's storage class β like it's just born wearing whatever the parent was wearing.
Changing a directory's storage class does not affect its already created children. nope. they're grown, they have their own lives. π€
To change the storage class for a directory and all of its children, use the -r option. that's the whole point of -r. slay.
PREDEFINED STORAGE CLASSES
A new MooseFS instance will have these classes predefined:
2CPβ onlyKEEPstate defined, keep 2 copies on any labels (this is the default class for the/directory π)3CPβ onlyKEEPstate defined, keep 3 copies on any labelsEC4+1β inKEEPstate, keep 2 copies on any labels; inARCHIVEstate, keep chunks in EC4+1 format on any labels; archive delay is 1 day and is calculated using the file's ctime; files smaller than 512kiB will not be converted to EC formatEC4+2β (pro only) inKEEPstate, keep 3 copies on any labels; inARCHIVEstate, keep chunks in EC4+2 format on any labels; archive delay is 1 day and is calculated using the file's ctime; files smaller than 512kiB will not be converted to EC formatEC8+1β inKEEPstate, keep 2 copies on any labels; inARCHIVEstate, keep chunks in EC8+1 format on any labels; archive delay is 1 day and is calculated using the file's ctime; files smaller than 512kiB will not be converted to EC formatEC8+2β (pro only) inKEEPstate, keep 3 copies on any labels; inARCHIVEstate, keep chunks in EC8+2 format on any labels; archive delay is 1 day and is calculated using the file's ctime; files smaller than 512kiB will not be converted to EC format
β³ the old lore (up to version 4.56.0)
Up to version 4.56.0 of MooseFS the predefined classes were different. The following information pertains to old MooseFS behaviour. In newer versions of MooseFS the classes mentioned below might exist as a result of an upgrade, but will behave exactly like any user-defined classes. This information is left here purely for informative reasons and will be removed from this manual page at some point:
(Behaviour up to version 4.56.0) "For compatibility reasons, every fresh or freshly upgraded instance of MooseFS has 9 predefined storage classes. Their names are single digits, from 1 to 9, and their definitions are*to9*. They are equivalents of simple numeric goals from previous versions of the system. In case of an upgrade, all files that had goal N before upgrade, will now have N storage class. These classes can be modified only when option-fis specified. It is advised to create new storage classes in an upgraded system and migrate files withmfsxchgsclasstool, rather than modify the predefined classes. The predefined classes CANNOT be deleted."
that last all-caps CANNOT is doing a lot of work and honestly? deserved. π
π REPORTING BUGS π
Found a bug? bestie, tell the devs: <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), mfsscadmin(1)
and that's the whole page, bestie π this was MooseFS 4.59.2-1, dated May 2026 β go forth and set your storage classes correctly, periodt. πβ¨
π¦ 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