mfstopology.cfg(5)
π mfstopology.cfg(5) β MooseFS network topology definitions π
okay bestie, so this is mfstopology.cfg(5), and it's literally part of MooseFS πΈ. Sit down, grab a strawberry π, because we're about to make your network map cute and organized.
β¨ NAME β¨
mfstopology.cfg β MooseFS network topology definitions. that's it, that's the name, iconic.
π DESCRIPTION π
So here's the tea β: the file mfstopology.cfg is the one that assigns IP addresses to network locations. That's its whole job and it does it beautifully π
.
Now β and this is important β this file is optional. fr fr. If your network is tiny (like, one switch, baby network energy) or you just don't need network topology, then leave this file empty and go live your life. No cap. π¦
π SYNTAX π
The syntax is:
IP_ADDRESSES LOCATION_PATH
Lines that start with the # character? Ignored as comments. ghosted. not even read. π
So IP_ADDRESS can come in a few different forms, and you're gonna pick whichever one fits your vibe:
*β literally all addresses. the whole buffet. β¨n.n.n.nβ one single IP address. just the one. main character. πn.n.n.n/bβ an IP class, specified by network address plus the bits numbern.n.n.n/m.m.m.mβ an IP class, specified by network address plus maskf.f.f.f-t.t.t.tβ an IP range, specified by from-to addresses (and yes, inclusive, both ends are in the club π«Ά)
And LOCATION_PATH? That one you specify as a sequence of words separated by vertical bars. we love a good | moment. π
π NOTES π
Okay here's where it gets juicy.
If one IP belongs to more than one definition, then the last definition is used. Last one wins, sorry to the earlier ones, they ate but they lost. π
Each set of IP addresses that shares a common location path gets counted as one rack. And this rack and/or IP info is used by the master if CHUNKS_UNIQUE_MODE in mfsmaster.cfg is set to a value greater than 0 (go peek at the mfsmaster.cfg(5) manual for more on that π). It's also used in storage classes if the distinguish feature is being used (and for that one, refer to the mfsscadmin(1) manual πΈ).
Now, distance between IP numbers, bestie, is defined like this:
0when the IP numbers are the same1when the IP numbers are different, but the paths specified by these numbers are the same- if the paths are different, distance is defined as one plus the maximum number of elements from both paths after the common starting part
And what is distance even for? So glad you asked. π
Distance is used for these purposes:
- When a chunk is needed for I/O operations, copies of chunks are sent to the client(mount) sorted by the distance from that client. But heads up β the client may alter that order based on internal settings (preferred labels, or internal congestion preventing algorithms; for more info about preferred labels, refer to the
mfsmount(8)manual π). - In the master, the distance and racks information gets used when
CREATIONS_RESPECT_TOPOLOGYand/orREPLICATIONS_RESPECT_TOPOLOGYare set to a value greater than0. For more on that, refer to themfsmaster.cfg(5)manual. π
π EXAMPLES π
Look at these little cuties doing their thing:
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 the given location paths. math but make it fashion:
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
okay numbers slay π
π 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/>.
β οΈ the warranty thing is real, bestie. no warranty, no cap, read the license. π
π SEE ALSO π
and that's the whole page, bestie!! π«Ά this was MooseFS 4.59.2-1, dated May 2026 β go forth and organize your racks, you absolute icon πβ¨ππ¦πΈπ
π¦ where this page comes from
- arch rolling: moosefs 4.59.2-2 Β· GPL-2.0-only
- nixos 26.05: moosefs 4.59.2
- nixpkgs unstable: moosefs 4.59.2
- ubuntu stonking: moosefs-master 4.59.2-1 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms