Skip to main content

Command line tools

Every command MooseFS installs, grouped by the task it belongs to, together with the manual page that documents it. The manual page holds the syntax and every argument. This page says which manual page to open. The mount options of mfsmount, and the mfsmount.cfg file that presets them, are listed here in full.

Every machine with the packages installed has these manual pages, so man mfsmaster answers there. The same set stands in Man pages, reproduced as the product ships it. Each entry of the Manual page column below opens one of those pages.

The tools that work on files and directories print numbers in the format you ask for. -n prints exact numbers. -h uses binary prefixes (Ki, Mi, Gi). -H uses SI prefixes (k, M, G). -k, -m and -g print plain kibis, mebis and gibis. The environment variable MFSHRFORMAT sets the same thing for every call instead of one. Its values are 0 for exact numbers, 1 or h for binary prefixes, and 2 or H for SI prefixes. 3 or h+ prints exact numbers and binary prefixes together. 4 or H+ does the same with SI prefixes. You get exact numbers when you ask for neither.

Running the cluster​

CommandWhat it doesManual page
mfsmasterStart, restart or stop MooseFS master process.mfsmaster(8)
mfschunkserverStart, restart or stop MooseFS chunkserver process.mfschunkserver(8)
mfsmetaloggerStart, restart or stop MooseFS metalogger process.mfsmetalogger(8)
mfsguiStart, restart or stop MooseFS GUI server.mfsgui(8)
mfssupervisorTool for controlling the work of MooseFS master process.mfssupervisor(8)

Mounting a file system​

CommandWhat it doesManual page
mfsmount, mount.moosefsMount MooseFS.mfsmount(8)
mfsbdevMooseFS block device daemon/management tool.mfsbdev(8)

Storage classes and patterns​

CommandWhat it doesManual page
mfsclonesclass, mfscreatesclass, mfsdeletesclass, mfsimportsclass, mfslistsclass, mfsmodifysclass, mfsrenamesclass, mfsscadminMooseFS storage class administration tool.mfsscadmin(1)
mfscopysclass, mfsgetsclass, mfssclass, mfssetsclass, mfsxchgsclassMooseFS storage classes management tools.mfssclass(1)
mfscreatepattern, mfsdeletepattern, mfslistpattern, mfspatadminMooseFS patterns administration tool.mfspatadmin(1)

Trash and archiving​

CommandWhat it doesManual page
mfscopytrashretention, mfsgettrashretention, mfssettrashretention, mfstrashretentionMooseFS trash retention management tools.mfstrashretention(1)
mfsarchive, mfschkarchive, mfsclrarchive, mfssetarchiveMooseFS archive storage mode management tools.mfsarchive(1)

Snapshots​

CommandWhat it doesManual page
mfsappendchunks, mfsmakesnapshot, mfsrmsnapshot, mfssnapshotsMooseFS snapshot tools.mfssnapshots(1)

Attributes, access control lists and quotas​

CommandWhat it doesManual page
mfscopyeattr, mfsdeleattr, mfseattr, mfsgeteattr, mfsseteattrMooseFS extra attributes management tools.mfseattr(1)
mfsfacl, mfsgetfacl, mfssetfaclMooseFS file access control lists (extended attributes) management tools.mfsfacl(1)
mfscopyquota, mfsdelquota, mfsgetquota, mfsquota, mfssetquotaMooseFS quota management tools.mfsquota(1)

Information about files and directories​

CommandWhat it doesManual page
mfscheckfile, mfsdiagtools, mfsdirinfo, mfsfileinfo, mfsfilepaths, mfsfilerepairMooseFS diagnostic tools.mfsdiagtools(1)

Monitoring and statistics​

CommandWhat it doesManual page
mfscliGUI's counterpart in TXT mode.mfscli(1)
mfsstatsdumpDump usage data from master stats file in csv or png format.mfsstatsdump(8)
mfscsstatsdumpDump usage data from chunkserver stats file in csv or png format.mfscsstatsdump(8)
mfsnetdumpDump network traffic as mfs packets.mfsnetdump(8)
mfslicinfo PRO (PRO Edition only)Display MooseFS licence information from one or more master servers.mfslicinfo(1)

Metadata and chunk files​

CommandWhat it doesManual page
mfsmetadumpDump MooseFS metadata info in human readable format.mfsmetadump(8)
mfsmetadirinfoUses MooseFS metadata to calculate precise directory information (similar to mfsdirinfo).mfsmetadirinfo(8)
mfsmetasearchUses MooseFS metadata to find specific files.mfsmetasearch(8)
mfschunktoolChecks chunk integrity offline.mfschunktool(8)
mfschunkdbdumpDumps data stored by a chunkserver in a chunkdb file.mfschunkdbdump(8)

Locations​

CommandWhat it doesManual page
mfslocadmin, mfslocationcreate, mfslocationdelete, mfslocationlist, mfslocationmap, mfslocationrename, mfslocationsetdefault, mfslocationstate, mfslocationunmap PRO (PRO Edition only)MooseFS locations administration tool.mfslocadmin(1)

Patches​

CommandWhat it doesManual page
mfsapplypatch, mfscreatepatch, mfsdumppatch, mfspatch PRO (PRO Edition only)MooseFS patch tools.mfspatch(1)

Commands that have been replaced​

CommandWhat it doesManual page
mfscopygoal, mfsgetgoal, mfssetgoalMooseFS goal management tools DEPRECATED, use mfssclass tools instead.mfsgoal(1)
mfscopytrashtime, mfsgettrashtime, mfssettrashtime, mfstrashtimeDEPRECATED MooseFS trash time management tools (use mfstrashretention tools instead).mfstrashtime(1)
mfsmetarestoreDoesn't exist in this version of MooseFS.mfsmetarestore(8)

Manual pages that cover the set​

Manual pageWhat it covers
mfstools(1)Perform MooseFS-specific operations.
moosefs(7)Fault tolerant, highly reliable, near indefinitely scalable, fast distributed file system in User Space.

Mount options​

Options of mfsmount. An option is given as -o NAME=VALUE. Several options are separated by commas. A dash in the default column stands for an option that is not set at all.

OptionDefaultWhat it does
-p, --passwordnot setSimilar to -o mfspassword=PASSWORD, but show prompt and ask user for password.
-n, --nostdoptsnot setDo not add standard MFS mount options: -o allow_other.
-o nonemptynot setAllow to mount MFS in nonempty directory. Available on FUSE 3, macOS and FreeBSD.
-o mfscfgfile=CFGFILE, -c CFGFILEnot setLoad some mount options from external file (if not specified then use default file: /etc/mfs/mfsmount.cfg or /etc/mfsmount.cfg).
-o mfsdebugnot setPrint some debugging information.
-o mfsmeta, -m, --metanot setMount meta filesystem (trash etc.).
-o mfsflattrashnot setUse flat trash structure in meta.
-o mfsdelayedinitnot setConnection with master is done in background - with this option mount can be run without network (good for being run from fstab / init scripts etc.).
-o mfsmkdircopysgid=N1 on Linux, 0 elsewhereSgid bit should be copied during mkdir operation.
-o mfssugidclearmode=SMODEEXT on Linux, BSD on the BSDs, OSX on macOS and Solaris, NEVER elsewhereSet sugid clear mode (see below).
-o mfscachemode=CMODEFBSDAUTO on FreeBSD, AUTO elsewhereSet cache mode (see below).
-o mfscachefilesnot set(deprecated) equivalent to -o mfscachemode=YES.
-o mfsreaddirplusminto=SEC0.0001Set minimal entry/attributes cache timeout for readdirplus in seconds.
-o mfsattrcacheto=SEC1.0Set attributes cache timeout in seconds.
-o mfsxattrcacheto=SEC30.0Set extended attributes (xattr) cache timeout in seconds.
-o mfsentrycacheto=SEC0.0Set file entry cache timeout in seconds.
-o mfsdirentrycacheto=SEC1.0Set directory entry cache timeout in seconds.
-o mfsnegentrycacheto=SEC0.0Set negative entry cache timeout in seconds.
-o mfssymlinkcacheto=SEC300.0Set symbolic link cache timeout in seconds.
-o mfsgroupscacheto=SEC300.0Set supplementary groups cache timeout in seconds.
-o mfsrlimitnofile=N100000On startup mfsmount tries to change number of descriptors it can simultaneously open.
-o mfsnice=N-19On startup mfsmount tries to change his 'nice' value.
-o mfsmemlocknot setTry to lock memory. Available where the system can lock a process in memory.
-o mfslimitarenas=N4If N>0 then limit glibc malloc arenas. Available where the C library tunes malloc arenas.
-o mfsallowoomkillernot setDo not disable out of memory killer. Linux only.
-o mfslogminlevel=LEVELINFOMinimal message level to log ([D]EBUG,[I]NFO,[N]OTICE,[W]ARNING or [E]RROR).
-o mfslogelevateto=LEVELNOTICESend messages with log level lower than LEVEL to syslog as LEVEL (levels as above).
-o mfsfsyncmintime=SEC0.0Force fsync before last file close when file was opened/created at least SEC seconds earlier (always do fsync before close).
-o mfswritecachesize=N256Define size of write cache in MiB.
-o mfsreadaheadsize=N256Define size of all read ahead buffers in MiB.
-o mfsreadaheadleng=N1048576Define amount of bytes to be additionally read.
-o mfsreadaheadtrigger=N10 * mfsreadaheadlengDefine amount of bytes read sequentially that turns on read ahead.
-o mfserroronlostchunknot setWhen all known chunkservers are connected to the master and the required chunk is missing then immediately finish I/O and return an error.
-o mfserroronnospacenot setWhen all known chunkservers are connected to the master and there is no free space then immediately finish I/O and return an error.
-o mfsioretries=N30Define number of retries before I/O error is returned.
-o mfstimeout=N0Define maximum timeout in seconds before I/O error is returned (which means no timeout).
-o mfslogretry=N5Define minimal retry counter on which system will start log I/O messages.
-o mfsmaster=HOST, -H HOSTmfsmasterDefine mfsmaster location.
-o mfsport=PORT, -P PORT9421Define mfsmaster port number.
-o mfsbind=IP, -B IPnot setDefine source ip address for connections (chosen automatically by OS).
-o mfsproxy=IP, -L IP127.0.0.1Define listen ip address of local master proxy for communication with tools.
-o mfssubfolder=PATH, -S PATH/Define subfolder to mount as root.
-o mfspassword=PASSWORDnot setAuthenticate to mfsmaster with given password.
-o mfspassfile=FILENAMEnot setAuthenticate to mfsmaster with password from given file.
-o mfsmd5pass=MD5not setAuthenticate to mfsmaster using directly given md5 (only if mfspassword is not defined).
-o mfspreflabels=LABELEXPRnot setSpecify preferred labels for choosing chunkservers during I/O.
-o mfsnoxattrsnot setTurn off xattr support.
-o mfsnoposixlocksnot setTurn off support for global posix locks (lockf + ioctl) - locks will work locally. Needs FUSE 2.6 or newer.
-o mfsnobsdlocksnot setTurn off support for global BSD locks (flock) - locks will work locally. Needs FUSE 2.9 or newer.

An option that mfsmount does not know is passed on to FUSE and the system, so rw, ro, suid, nosuid, dev, nodev, exec and noexec work as mount(8) describes them.

Cache modes​

Values of -o mfscachemode=CMODE.

ModeMeaning
DIRECTForces direct io (bypasses cache).
NO, NONE, NEVERAlways flush data cache on file open (safest but can reduce efficiency).
YES, ALWAYSAlways keep data cache on file open (dangerous).
AUTOFile cache is managed by mfsmaster automatically (should be very safe and efficient).
FBSDAUTOFreeBSD only: works as AUTO with FUSE protocol 7.23 and newer, and as DIRECT with older FUSE.

Sugid clear modes​

Values of -o mfssugidclearmode=SMODE. They say when MooseFS clears the suid and sgid bits of a file whose owner changes. A user other than root who writes to a file or truncates it clears the bits whatever the mode, as on Linux. Under EXT and XFS, suid is cleared always and sgid only when the group execute bit is set. Under every other mode, both bits are cleared.

ModeMeaning
NEVERMFS will not change suid and sgid bit on chown.
ALWAYSClear suid and sgid on every chown - safest operation.
OSXStandard behavior in OS X and Solaris (chown made by unprivileged user clear suid and sgid).
BSDStandard behavior in *BSD systems (like in OSX, but only when something is really changed).
EXTStandard behavior in most file systems on Linux (directories not changed, others: suid cleared always, sgid only when group exec bit is set).
XFSStandard behavior in XFS on Linux (like EXT but directories are changed by unprivileged users).

mfsmount.cfg​

The file that presets mount options and the mount point. One line is one entry:

LineWhat it means
# or ; in the first columnComment. The line is ignored.
Empty lineIgnored.
Anything elseA mount option, exactly as it would be written after -o on the command line. Several options may stand on one line, separated by commas.
A line starting with /The mount point to use when the command line names none. Give it once: with several such lines, there is no guarantee which one wins.

mfsmount reads /etc/mfs/mfsmount.cfg, and /etc/mfsmount.cfg when /etc/mfs/mfsmount.cfg is absent. Neither has to exist.

-c FILE, or -o mfscfgfile=FILE, reads that file instead of the default file. A file named this way has to exist: mfsmount stops when that file does not exist.

An option given on the command line wins over the same option in the file.

An example of the file:

nosuid,nodev
mfsmaster=mfsmaster
mfspassword=secret
/mnt/mfs