mfstopology.cfg
The file that assigns addresses to network locations. The Master Server counts the distance between two machines from this file. That distance decides which copy of a chunk a client is offered first, and, where REPLICATIONS_RESPECT_TOPOLOGY in mfsmaster.cfg asks for it, where replication copies a chunk from. A storage class can also ask for copies to sit in different racks. The file is optional: a network with a single switch, or a network whose layout does not matter, works with this file empty.
IP_ADDRESSES LOCATION_PATH
Addresses
| Form | Meaning |
|---|---|
* | Every address. |
n.n.n.n | A single address. |
n.n.n.n/b | An address class, written as a network address and a number of significant bits. |
n.n.n.n/m.m.m.m | An address class, written as a network address and a mask. |
f.f.f.f-t.t.t.t | An address range, both ends included. |
An address that more than one line covers belongs to the last of them. Lines starting with # are comments.
Location paths
A location path is a sequence of words separated by |, written from the widest part of your network to the narrowest. Machines that share a path form one rack. An address that no line of the file covers gets the empty path.
Examples
| Line | Meaning |
|---|---|
192.168.1.0/24 US|CHICAGO|WTOWER|R1A | IP addresses can be defined as a network class with number of significant bits. |
192.168.2.0-192.168.2.255 PL|WARSAW|GROCHOWSKA|R154 | IP addresses can be defined as a range of IP addresses. |
192.168.3.0/255.255.255.0 123 | IP address blocks can be defined as a network class with network mask. |
192.168.1.1 A|B|C | As a single IP address. |