mfstopology.cfg(5)

NAME
mfstopology.cfg - MooseFS network topology definitions

DESCRIPTION
The file mfstopology.cfg assigns IP addresses to network locations. This file is optional. If your network is very small (i.e. has just one switch) or network topology is not necessary then leave this file empty.

  SYNTAX

Syntax is:

IP_ADDRESSES LOCATION_PATH

Lines starting with # character are ignored as comments.

IP_ADDRESS can be specified in several forms:

*	all addresses
n.n.n.n	single IP address
n.n.n.n/b	IP class specified by network address and bits number
n.n.n.n/m.m.m.m	IP class specified by network address and mask
f.f.f.f-t.t.t.t	IP range specified by from-to addresses (inclusive)

LOCATION_PATH can be specified as a sequence of words separated by vertical bars.

NOTES
If one IP belongs to more than one definition then the last definition is used.

Each set of ip addresses with a common location path is considered one rack. Rack and/or IP information is used by the master if CHUNKS_UNIQUE_MODE in mfsmaster.cfg is set to value greater than 0 (refer to mfsmaster.cfg(5) manual for more information) and in storage classes if the distinguish feature is used (refer to mfsscadmin(1) manual for more information).

Distance between IP numbers is defined as follows: 0 when IP numbers are the same, 1 when IP numbers are different, but paths specified by these numbers are the same. In case of different paths distance is defined as one plus maximum number of elements from both paths after common starting part.

Distance is used for the following purposes:
Copies of chunks are sent to the client(mount) sorted by the distance from this client when a chunk is needed for I/O operations. Notice that the client may alter that order based on internal settings (preferred labels or internal congestion preventing algorithms; for more information about preferred labels refer to mfsmount(8) manual).
In the master the distance and racks information is used when CREATIONS_RESPECT_TOPOLOGY and/or REPLICATIONS_RESPECT_TOPOLOGY are set to value greater than 0. For more information refer to mfsmaster.cfg(5) manual.

EXAMPLES
192.168.1.0/24 US|CHICAGO|WTOWER|R1A

192.168.2.0-192.168.2.255 PL|WARSAW|GROCHOWSKA|R154

192.168.3.0/255.255.255.0 123

192.168.1.1 A|B|C

  DISTANCE EXAMPLES
Distances calculated for two different IP numbers mapped to given location paths:

d('US','DE') = 2

d('US','') = 2

d('US|PHOENIX|AT&T|RACK1','US|PHOENIX|AT&T|RACK2') = 2

d('US|PHOENIX|AT&T|RACK1','US|PHOENIX|ATM|RACK7') = 3

d('US|PHOENIX|AT&T|RACK1','US|CHICAGO|AT&T|RACK2') = 4

d('US|PHOENIX|AT&T|RACK1','US|ATM') = 4

d('US|PHOENIX|AT&T|RACK1','DE|BERLIN|ATM|RACK175') = 5

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 Software 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 details. 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
mfsmaster(8), mfsmaster.cfg(5)