Skip to main content

mfsbdev.cfg

The file that says which files stored in MooseFS become block devices when the mfsbdev daemon starts. The daemon reads the file when start is given the -i option, and maps one device per line. Writing the file and starting the daemon with it is in Block device operations.

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

Fields​

Empty lines and lines that start with ; or # are ignored. Every other line is one device. The fields stand in the order below, separated by blanks. A field you do not set takes * when a field to its right is set.

FieldMeaning
pathThe file that becomes the device. The path is relative to the MooseFS root, or to the directory the -S option of start names, not to your local file system.
deviceThe network block device to serve it through, as /dev/nbd1. Absent or *: the first free device.
linknameThe name of the symbolic link created in /dev/mfs for the device. Absent or *: the same default name a mapping made without -n gets.
sizeThe size of the device, in bytes or with a unit, as 64MiB. Absent or *: the size of the file.
bsizeThe block size of the device. Absent or *: 4096 bytes. Up to 5.1.0, a line that leaves it out, or writes *, leaves the daemon with no block size, so write it there.
flagsWhat the device may do and whether it takes a lock, from the table below. Absent: rw,lock.

Flags​

Several flags stand on one line, separated by commas. Where two flags conflict, such as ro with rw or lock with nolock, the last one counts.

FlagMeaning
roA read-only device.
rwA read/write device.
lockThe device takes a lock on the file: shared for ro, exclusive for rw.
nolockThe device does not require a lock. It tries to take one, and is mapped even when it cannot.

A word that is none of these is ignored. The daemon prints that word.

Examples​

LineMeaning
my_devices/device1 /dev/nbd3 mfsdevice1 67108864 1024 roA read-only device of 67108864 bytes, in blocks of 1024 bytes, served through /dev/nbd3 and reachable as /dev/mfs/mfsdevice1.
my_devices/device2 /dev/nbd7 mfsdevice2 64MiB 1024 ro,nolockThe same, with the size written with a unit, and mapped even when the lock cannot be taken.