mfsdiagtools(1)

πŸ“¦
version 4.59.2 Β· 5 versions
, in arch rolling, nixos 26.05, nixpkgs unstable, ubuntu stonking

πŸ’… 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:

  • -q flips on quick mode β€” which only shows the number of EC parts or valid copies. short and sweet, we love to see it.
  • -c turns on receiving chunk checksums from the chunkservers.
  • -s turns on calculating the file signature (built from those received checksums).
  • -p displays the path to the chunk file on the chunkserver for every chunk.
  • -w displays 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 mfsmaster to 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:

  • -n causes to print exact numbers.
  • -h uses binary prefixes (Ki, Mi, Gi as 2^10, 2^20 etc.).
  • -H uses SI prefixes (k, M, G as 10^3, 10^6 etc.).
  • -k, -m and -g show 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 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. 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 (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