.TH mfstopology.cfg "5" "October 2020" "MooseFS 3.0.115-1" "This is part of MooseFS" .SH NAME mfstopology.cfg \- MooseFS network topology definitions .SH DESCRIPTION The file \fBmfstopology.cfg\fP 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. .SH SYNTAX .PP Syntax is: .TP \fIIP_ADDRESSES\fP \fILOCATION_PATH\fP .PP Lines starting with \fB#\fP character are ignored as comments. .PP \fIIP_ADDRESS\fP can be specified in several forms: .PP .nf .ta +2i \fB*\fP all addresses \fBn.n.n.n\fP single IP address \fBn.n.n.n/b\fP IP class specified by network address and bits number \fBn.n.n.n/m.m.m.m\fP IP class specified by network address and mask \fBf.f.f.f-t.t.t.t\fP IP range specified by from-to addresses (inclusive) .fi .PP \fILOCATION_PATH\fP can be specified as a sequence of words separated by vertical bars. .SH NOTES If one IP belongs to more than one definition then the last definition is used. .PP Distance between IP numbers is defined as follows: \fB0\fP when IP numbers are the same, \fB1\fP 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. .PP Distances are used to sort chunkservers during read and write operations. They are also used by goal chunks replications if you enable \fBREPLICATIONS_RESPECT_TOPOLOGY\fP (see \fBmfsmaster.cfg\fP\|(5)). New chunks are created randomly (without using topology information). Rebalance routines may take distances into account (see \fBCHUNKS_UNIQUE_MODE\fP in \fBmfsmaster.cfg\fP\|(5)). .SH EXAMPLES 192.168.1.0/24 US|CHICAGO|WTOWER|R1A .PP 192.168.2.0-192.168.2.255 PL|WARSAW|GROCHOWSKA|R154 .PP 192.168.3.0/255.255.255.0 123 .PP 192.168.1.1 A|B|C .SH DISTANCE EXAMPLES Distances calculated for two different IP numbers mapped to given location paths: .PP d('US','DE') = 2 .PP d('US','') = 2 .PP d('US|PHOENIX|AT&T|RACK1','US|PHOENIX|AT&T|RACK2') = 2 .PP d('US|PHOENIX|AT&T|RACK1','US|PHOENIX|ATM|RACK7') = 3 .PP d('US|PHOENIX|AT&T|RACK1','US|CHICAGO|AT&T|RACK2') = 4 .PP d('US|PHOENIX|AT&T|RACK1','US|ATM') = 4 .PP d('US|PHOENIX|AT&T|RACK1','DE|BERLIN|ATM|RACK175') = 5 .SH COPYRIGHT Copyright (C) 2020 Jakub Kruszona-Zawadzki, Core Technology Sp. z o.o. 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 MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html .SH "SEE ALSO" .BR mfsmaster (8), .BR mfsmaster.cfg (5)