mfsbdev.cfg
configuration file for MooseFS block device daemon; refer to mfsbdev.cfg(5) manual for details
Moosefs block device daemon/management tool
mfsbdev start
[-H
masterhost]
[-P
masterport]
[-B
masterbind]
[-S
masterpath]
[{-p
masterpassword | -x
passwordfile}]
[-l
linksocket]
[-i
init_mappings_file]
[-o
options]
mfsbdev stop
[-l
linksocket]
mfsbdev map
[-l
linksocket]
-f
mfsfile
[-d
nbddevice]
[-n
linkname]
[-s
bdevsize]
[{-b
blocksize | -5 | -1 | -2 | -4}]
[-r]
[-i]
mfsbdev {unmap
[-l
linksocket]
(
-f
mfsfile | -d
nbddevice | -n
linkname
)}
mfsbdev list
[-l
linksocket]
[{-t
m | u | i}]
mfsbdev {resize
[-l
linksocket]
(
-f
mfsfile | -d
nbddevice | -n
linkname
)
[-s
bdevsize]}
This tool is used to manage block devices. This tool works in Linux ONLY. Kernel module nbd must be loaded for this tool to work properly.
start - starts the daemon; the daemon only listens on a socket at this point; all the other commands use the socket to communicate with the daemon; if no socket is specified via -l option, the default is used: /dev/mfs/nbdsock
stop - stops the daemon
map - maps a file on mfs to be used as a block device
unmap - removes a mapping
list - lists current mappings
resize - changes the size of a block device (requires kernel version 4.18 or higher)
-H - master host; default is 'mfsmaster'
-P - master port; default is '9421'
-S - master path (subfolder in MFS that will be used as a root for all block device mappings); default is '/'
-p - master password; mutually exclusive with -x option; if neither -p nor -x are supplied, the tool tries to connect without a password
-x - path to a file containing master password; mutually exclusive with -p option; if neither -p nor -x are supplied, the tool tries to connect without a password
-l - path to communication socket; default is /dev/mfs/nbdsock
-f - path to mfs file used to map block device;
-d - path to network block device ('/dev/nbdX'); by default (if this parameter is not supplied) first available device is used with the map command
-n - name of symbolic link created in '/dev/mfs', pointing at the network block device created by the map command; default is a combination of master hostname, port and mfs file name
-s - size of the block device, both SI and IEC suffixes can be used; default is the size of the file the block device is mapped to
-b - block size in bytes
-5 - use block size 512 bytes (eq to -b 512)
-1 - use block size 1024 bytes (eq to -b 1024)
-2 - use block size 2048 bytes (eq to -b 2048)
-4 - use block size 4096 bytes (eq to -b 4096)
-r - maps block device as readonly (allows multiple mappings of the same file)
-i (map) - ignore locks; one file may be mapped to more than one block device, each map operation will try to obtain the appropriate lock (shared for ro, exclusive for rw) but will succeed even if the lock is not obtained
-t - forces the list command to display information in a format ready to use with map (m parameter) or unmap (u parameter) command or with MooseFS mfsbdev.cfg file format (i parameter)
-i (start) - use config file supplied in parameter to start initial block devices; for formatting of the config see mfsbdev.cfg(5)
-o - additional params, mfsmount-style, many params can be defined, separated by comma:
mfswritecachesize=Nspecify write cache size in MiB (in range: 16..2048 - default: 128)
mfsreadaheadsize=Ndefine size of all read ahead buffers in MiB (in range: 16..2048 - default: 128)
mfsreadaheadleng=Ndefine amount of bytes to be additionally read (in range: 128KiB..2MiB - default: 2097152 = 2MiB)
mfsreadaheadtrigger=Ndefine amount of bytes read sequentially that turns on read ahead (default: 20971520)
mfserroronlostchunkwhen all known chunkservers are connected to the master and the required chunk is missing then immediately finish I/O and return an error
mfserroronnospacewhen all known chunkservers are connected to the master and there is no free space then immediately finish I/O and return an error
mfsioretries=Nspecify number of retries before I/O error is returned (default: 30)
mfstimeout=Ndefine maximum timeout in seconds before I/O error is returned (default: 0 - which means no timeout)
mfslogretry=Ndefine minimal retry counter on which system will start log I/O messages (default: 5)
mfsmaster=HOSTconnect with MooseFS master on HOST (default is mfsmaster) - equivalent to -H
mfsport=PORTconnect with MooseFS master on PORT (default is 9421) - equivalent to -P
mfsbind=IPlocal address to use for connecting with master instead of default one - equivalent to -B
mfssubfolder=PATH mount specified MooseFS directory (default is /, i.e. whole filesystem) - equivalent to -S
mfspassword=PASSWORDauthenticate to MooseFS master with PASSWORD
mfspreflabels=LABELEXPRspecify preferred labels for choosing chunkservers during I/O
mfsnbdtimeout=Ndefine maximum timeout in seconds before kernel gives up (default: 1800)
mfsbdev.cfg
configuration file for MooseFS block device daemon; refer to mfsbdev.cfg(5) manual for details
mfsbdev start - start nbd daemon with default options (masterhost = mfsmaster, masterport = 9421, linksocket = /dev/mfs/nbdsock, authentication without password)
mfsbdev start -H mfsmaster.my.domain -P 9521 -x /etc/mfs/mastersecret - start nbd daemon that will connect to master mfsmaster.my.domain on port 9521 using password read from file /etc/mfs/mastersecret
mfsbdev stop -l /tmp/mynbdinstance - stop nbd daemon using for communication unix socket /tmp/mynbdinstance
mfsbdev map -f devices/mybdev1.bin -s 2Ti -n mytestvm - add mapping to daemon using for communication default socket (/dev/mfs/nbdsock). Device will be assigned automatically, file devices/mybdev1.bin will be mapped to this device, link '/dev/mfs/mytestvm' to this device will be created and block device will have size of 2TiB.
mfsbdev unmap -n mytestvm - remove mapping that has link named mytestvm (uses link /dev/mfs/mytestvm).
4 releases since Debian 11 (Bullseye); the text changed 3 times.