Skip to main content

MooseFS PRO only.

mfslocadmin

MooseFS locations administration tool.

This page reproduces the manual page mfslocadmin(1) as the product ships it: the text man mfslocadmin prints on a machine where the packages are installed. It is not edited here, and where it disagrees with the rest of this documentation, the documentation is the side kept against the sources. What the subject is: Command line tools.

Synopsis​

mfslocationcreate [-?] [-M mount_point] location_name

mfslocationdelete [-?] [-M mount_point] location_name

mfslocationsetdefault [-?] [-M mount_point] location_name

mfslocationstate [-?] [-M mount_point] -s new_state location_name

mfslocationrename [-?] [-M mount_point] old_location_name new_location_name

mfslocationmap [-?] [-M mount_point] [-f] -i ip_range_definition location_name

mfslocationunmap [-?] [-M mount_point] [-f] -i ip_range_definition

mfslocationlist [-?] [-M mount_point]

Description​

This is a set of tools for managing MooseFS locations. Locations are used to divide a MooseFS cluster into logical parts, each part can have its own storage policies for chunks and each part can be independently shut down from the cluster. See NOTES for more detailed explanation.

mfslocationcreate adds a new location (up to 8 in total, one default location always exists)

mfslocationdelete removes (deletes) a given location (the default location cannot be deleted); location needs to be "empty" for deletion, see NOTES for more detailed explanation.

mfslocationsetdefault sets the given location as the default location

mfslocationstate changes the given location's state between on, off and i/o only

mfslocationrename changes the given location's name

mfslocationmap adds a range of IP numbers to a specified location; MooseFS modules with these IPs will be assigned to this location

mfslocationunmap removes a range of IP numbers if defined in any location

mfslocationlist lists all the locations

Options​

-s state to set, one of the following: ON, OFF, IO

-i definition of IP range/list, see NOTES for details

-f force an IP mapping or unmapping; in case of forced mapping any IPs previously assigned to another location will be moved to currently mapped location; in case of forced unmapping any existing MooseFS modules with unmapped IPs will be moved to the default location

-M MooseFS mount point, doesn't need to be specified if a tool is run inside MooseFS mounted directory or MooseFS is mounted in /mnt/mfs/

-? displays short usage message

Notes​

Locations are a new feature, added in MooseFS 5.0. All MooseFS modules can be assigned to one of up to 8 locations (not all locations must be used) and these groups can be used in further managing the cluster: storage classes can have different policies for each location, any location can be switched on fully (ON state), partially (IO state) or switched off (OFF state). This allows admins to set up clusters that consist of several (geographical) locations and decide, using storage classes, which data should be replicated to which location with what kind of Redundancy Policy. The use of locations is not mandatory - if no mapping is defined using the location tools and only the default location exists, the cluster will behave like MooseFS 4.x used to when it comes to data storage.

MooseFS modules are assigned to locations using IP mappings, that means, if a process uses an IP number assigned to a location named 'foo', it will be assigned to location 'foo'. Any IP numbers not assigned explicitly to a specific location will always be assigned to the default location and will cause the master leader to write a syslog notice, that an unmapped module has connected.

LOCATION STATES​

ON means the location is switched fully on, i.e. the Leader master will expect all modules (other masters, chunkservers and metaloggers) in this location to be on and connected, and all regular cluster operations will be performed on all modules in this location

IO means the location is switched on partially, i.e. the Leader master will expect all modules (other masters, chunkservers and metaloggers) in this location to be on and connected, any i/o operations requested by clients (mounts) will be performed on these modules, but no replication (including rebalance) and no deletion operations will be performed

OFF means the location is switched off, i.e. the Leader master does not excect any of the chunkserver modules in this location to work and will not accept connections from them even if they attempt to connect; chunkserver modules belonging to a location in OFF state are not taken into account by the master leader selection algorithms

ON state should be used for locations that are working normally. IO state should be used for locations that have temporarily lowered or unstable network connection. OFF state should be used for locations that are down due to maintenance, network outage or other issues that prevent the modules from stable work.

A location with the Leader master cannot be switched to OFF state - the Leader role needs to be transferred to another master via mfssupervisor tool first.

IP RANGES​

IP ranges can be defined in one of three ways:

FIP-TIP - all IP numbers from FIP to TIP, inclusive

IP/BITS - the whole IP class with given size in BITS

IP - single IP number

LEADER BEHAVIOUR​

In a MooseFS instance without locations the Leader master can only be selected if more than half chunkservers are connected. In a MooseFS instance with locations, each location has up to one vote, and a location has a vote if and only if more than half chunkservers belonging to this location are connected. More than half locations can select a Leader master and also exactly half locations, but only if they include the default location, can select a Leader.

DEFAULT LOCATION​

One, default location always exists in MooseFS with location capability. This location is called 'default' when the system is first initialized, but can be renamed. To check, which of your current locations is the default, you can use the mfslocationlist tool. You can switch the default to another location using the mfslocationsetdefault tool.

The default location has the following constraints:

  • its state cannot be changed to OFF,
  • it cannot be deleted.

If a user needs to switch the default location to OFF state, they must first set another location as the default one.

All connected, but not mapped (IP not matching any of the existing mappings) modules are always assigned to the default locations.

Examples​

Add a new location, called 'foo':

mfslocationcreate foo

Rename the default location 'default' to 'bar':

mfslocationrename default bar

Add all IPs between 192.168.1.50 and 192.168.1.100 (inclusive both) to location 'foo'.

mfslocationmap -i 192.168.1.50-192.168.1.100 foo

Add a whole class of IPs starting with 192.168.2 to location 'bar'.

mfslocationmap -i 192.168.2.0/24 bar

Remove IP 192.168.1.100 from location mappings

mfslocationunmap -i 192.168.1.100

Switch location's 'foo' state to ON:

mfslocationstate -s ON foo

See also​

mfsmount(8), mfstools(1)