Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
mfschunktool(8) 	     This is part of MooseFS		 mfschunktool(8)

NAME
     mfschunktool - checks chunk integrity offline

SYNOPSIS
     mfschunktool    [-f]    [-r]    [-n]    [-e]    [-x]    [-m    damaged_dir]
     chunk_file|mfs_hdd_path ...

DESCRIPTION
     mfschunktool checks chunk integrity using stored CRC checksums  in  chunk's
     header. It can also 'repair' chunk (fix stored checksums). This tool may be
     useful  to  check last written chunks after possible data corruption (power
     down etc.) If the supplied parameter is a file, the tool  will  check  this
     file. If the supplied parameter is a directory, the tool will traverse this
     directory	recursively  and  try  to check all files that seem to be chunks
     (they are named like chunk files or, if -n option is used, also have  head-
     ers like chunk files, even when the name is wrong).

     Notice!  This  tool  should never be used while the chunk server process is
     active! If the tool is used on a chunk disk (aka path in  mfshdd.cfg  file)
     it  will check if the chunk server is working and refuse to operate. But if
     it's used on a single file or subdirectory, such check is not possible  and
     it's  the	responsibility	of the user to make sure the tool is not used on
     "working" chunks, as it could lead to data loss.

OPTIONS
     -f     turn on fast mode (in this mode only last block is tested -  usually
	    this is enough to find corrupted chunks)

     -r     turn  on  repair  mode (if checksums on given chunk don't match then
	    they will be overwritten by checksums calculated using actual data)

     -n     turn on name fixing mode (if the chunk file name is not correct  but
	    there  is  proper file header, the tool will rename given file using
	    data stored in the header)

     -e     turn on empty block crc check for 1.0 version chunks (force checking
	    crc values for non existing blocks - may fail in case of chunks that
	    were truncated)

     -x     turn on reporting successful check (print 'OK' message  when  every-
	    thing is correct)

     -m damaged_dir
	    move damaged chunks to a specified directory damaged_dir; see NOTES

NOTES
     The  option  to move damaged chunks to a specified directory is most useful
     when whole directories (disks) with chunks are scanned, and can be employed
     in different ways, depending on what other options are  used  at  the  same
     time.

     If -r option is used together with -m option, then only chunks that are un-
     repairable  will be moved. This is a fast approach to chunk repairing, that
     repairs and cleans the chunk directory (disk) in one go.

     If only option -m is used, then all damaged chunks will be moved to a spec-
     ified directory. The user can then use the mfschunktool again in  this  di-
     rectory, this time with the -r option, to repair all chunks that can be re-
     paired,  but  only  introduce  the  repaired chunks back into the system if
     there is no other copy available from another chunkserver (a copy that  did
     not  need	a repair operation in the first place). This is a more time con-
     suming, but safer approach to repairing multiple chunks, e.g. after a power
     failure.

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 Soft-
     ware 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  de-
     tails.

     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
     mfschunkserver(8)

MooseFS 4.59.1-1		    May 2026			 mfschunktool(8)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mfschunktool&sektion=8&manpath=FreeBSD+Ports+15.1.quarterly>

home | help