Skip to main content

mfsbdev.cfg

MooseFS block device daemon config file.

This page reproduces the manual page mfsbdev.cfg(5) as the product ships it: the text man mfsbdev.cfg prints on a machine where the packages are installed. It is not edited here, and where it disagrees with the rest of this documentation, the documentation is the side kept against the sources. What the subject is: Command line tools.

Description​

This is the config file that can be read by the mfbsdev tool if the -i option was supplied along with the start command. The file contains definitions of block devices (one per line) that should be initialized when mfsbdev tool is started.

It is strongly recommended to not create this file from scratch. Instead, it's best to create all the necessary devices using mfsbdev command and its parameters, as described in mfsbdev(8) and then list them with the mfsbdev list -i command and use the output to create a config file. The following description is provided so it explains the content of the config file and allows to adjust it if necessary.

FORMAT​

Empty lines and lines that start with a semicolon (;) or hash (#) sign are ignored. Every other line should match the format:

path [ device|* [ linkname|* [ size|* [ bsize|* [ flags ]]]]]

path information is obligatory and should be a path to a file on MooseFS that will be used as the block device; the path should be relative to MooseFS root or path defined with -S option when starting mfsbdev, not your local file system root

device information is optional, if supplied should point to a network block device path (eg. /dev/nbd1); if not present or * is supplied, first available block device will be used

linkname information is optional, if supplied should indicate the name of symbolic link created in '/dev/mfs', pointing at the network block device created by the map command; if not present or * is supplied, default link name will be used

size information is optional, if supplied indicates block device size; if not present or * is supplied, the size of the file indicated by the first parameter is used

bsize information is optional, if supplied indicates block size; if not present or * is supplied, 4096 bytes block is used

flags information is optional, can contain the following flags (separated by comma if more than one is listed) ro - read only device, rw read/write device, lock - device requires an appropriate type of lock (shared for ro, exclusive for rw), nolock - device does not require a lock (will try to obtain it, but will ignore failure); if nothing is supplied, the default of rw, lock is assumed; if two conflicting flags are supplied (i.e. ro and rw or lock and nolock) the last one wins

Examples​

Create read/write devices with default block device path, default linkname, using file size as device size, with default block size:

my_devices/device1

my_devices/device2 * * * * rw

Create read only devices with specific parameters:

my_devices/device1 /dev/nbd3 mfsdevice1 67108864 1024 ro

my_devices/device2 /dev/nbd7 mfsdevice2 64MiB 1024 ro,nolock

See also​

mfsmount(8), mfsbdev(8)