mfsdiagtools(1)
π NAME π
okay bestie, say hi to mfsdiagtools β the MooseFS diagnostic tools, a whole little squad of utilities from the MooseFS family that check your files, hunt down your chunks, patch up your broken stuff, and count your dirs. icon behavior only. β¨
π¦ SYNOPSIS π¦
mfscheckfile [-?] [-n|-h|-H|-k|-m|-g] FILE...
mfsfileinfo [-?] [-n|-h|-H|-k|-m|-g] [-q|-c|-s] [-p] [-w] FILE...
mfsfilerepair [-?] [-n|-h|-H|-k|-m|-g] [-d] FILE...
mfsdirinfo [-?] [-n|-h|-H|-k|-m|-g] [-i|-d|-f|-c|-l|-s|-r] [-p]
OBJECT...
mfsfilepaths [-?] OBJECT|INODE...
πΈ DESCRIPTION πΈ
okay so there are five tools in this little friend group and they all have main character energy, let me introduce you π
π mfscheckfile
this one checks and prints the number of chunks and the number of chunk copies that belong to the file(s) you name. and the slay part? it works on any file, including deleted ones β yep, the trash. nothing is ever really gone, bestie. ποΈβ¨
π mfsfileinfo
this one prints the location (chunkserver host and port) of each chunk copy belonging to the file(s) you point at. again: any file, including deleted (trash). she sees everything.
now the flags, because there are a few:
-qflips on quick mode β which only shows the number of EC parts or valid copies. short and sweet, we love to see it.-cturns on receiving chunk checksums from the chunkservers.-sturns on calculating the file signature (built from those received checksums).-pdisplays the path to the chunk file on the chunkserver for every chunk.-wdisplays only "wrong" chunks β and by wrong I mean invalid, missing, or wrong version. π©
π«Ά mfsfilerepair
your girl here deals with broken files β specifically the ones causing I/O errors on read operations β and her whole goal is to make them partially readable. she's a healer, a fixer, a gentle soul.
here's the tea on how she works:
- if there's a chunk version mismatch, she sets the chunk version known to
mfsmasterto the highest one found on the chunkservers. highest wins, periodt. - if there is no available copy of a chunk (meaning all copies are invalid or missing), that chunk gets marked as "read-as-zeros" β so a read operation will return zeros, and a write operation will fail. π
- when/if a chunkserver with the missing chunk connects, the file will be fully available again. she always comes back π
and if you use option -d, then the missing/invalid chunk is permanently zeroed. permanent. no take backs.
β οΈ note, and pls actually read this one: it is advisable to make a copy (not a snapshot) of any file repaired with this tool β especially if there's a possibility that chunkservers with more existing chunks will be connected to the system in the future (for example, after an outage). this is to prevent mismatched content of chunks with the same version in a file. π has to be a copy, not a snapshot. iykyk.
π mfsdirinfo
this is the extended, MooseFS-specific equivalent of the du -s command and honestly? upgraded fr fr.
she prints a summary for each specified object β that's a single file or a directory tree. if you only want to see one parameter, just add one of the show options (go look at SHOW OPTIONS, bestie, they're right below π).
by default she returns data from the internal master counters β which is very fast, but not precise. and the catch: all repeated nodes (hard links) and chunks (snapshots) are counted multiple times. π
so if you want stats that are more precise, use the -p switch, which turns on a slow, recursive procedure. in this mode, nodes and chunks are counted only once, and the system uses the current number of chunk copies instead of goal/labels. slow but honest, we stan.
and a lil note for the system administrators out there: you might consider using mfsmetadirinfo instead (peep mfsmetadirinfo(8)). π
π§ mfsfilepaths
this tool can be used to find all occurrences (hard links) of a given file in the filesystem. she's the one who finds your file's whole extended family.
she can also be used to find a file with a given inode number. but β and this is important β in the case of searching for an inode number, the tool has to be run in an mfs mounted directory. no mounting, no finding. β¨
β¨ OPTIONS β¨
π GENERAL OPTIONS
most MooseFS tools use the -n, -h, -H, -k, -m and -g options to select the format of printed numbers. let's break it down:
-ncauses to print exact numbers.-huses binary prefixes (Ki,Mi,Gias2^10,2^20etc.).-Huses SI prefixes (k,M,Gas10^3,10^6etc.).-k,-mand-gshow plain numbers respectively in kibis (binary kilo β1024), mebis (binary mega β1024^2) and gibis (binary giga β1024^3).
and you can get the exact same result by setting the MFSHRFORMAT environment variable to one of these:
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. simple, clean, no notes. π
-?β displays a short usage message. your lil help button π«Ά
β SHOW OPTIONS β
these are the pick-your-param girlies. choose your fighter:
-iβ show number of inodes-dβ show number of directories-fβ show number of files-cβ show number of chunks-lβ show length (sum of file lengths)-sβ show size (sum of chunks lengths)-rβ show realsize (estimated hdd usage β usually size multiplied by current goal) π₯
π REPORTING BUGS π
found a bug? (rude of it, honestly.) 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), mfsmetadirinfo(8)
and that's the whole page, bestie!! this one's from MooseFS 4.59.2-1, dated May 2026 π go forth and diagnose ur chunks, ily, mwah π«Άβ¨π
π¦ 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