monmaptool – ceph monitor cluster map manipulation tool

Synopsis

monmaptoolmapfilename [ –clobber ] [ –print ] [ –create ][ –add ip:port__… ] [ –addv [protocol:ip:port*[,…*] ] ] [ –rm ip:port__… ]

Description

monmaptool is a utility to create, view, and modify a monitorcluster map for the Ceph distributed storage system. The monitor mapspecifies the only fixed addresses in the Ceph distributed system.All other daemons bind to arbitrary addresses and register themselveswith the monitors.

When creating a map with –create, a new monitor map with a new,random UUID will be created. It should be followed by one or moremonitor addresses.

The default Ceph monitor port is 6789.

Options

  • —print
  • will print a plaintext dump of the map, after any modifications aremade.
  • —clobber
  • will allow monmaptool to overwrite mapfilename if changes are made.
  • —create
  • will create a new monitor map with a new UUID (and with it, a new,empty Ceph file system).
  • —generate
  • generate a new monmap based on the values on the command line or specifiedin the ceph configuration. This is, in order of preference,
  1. —monmap filename to specify a monmap to load

  2. —mon-host 'host1,ip2' to specify a list of hosts or ip addresses

  3. [mon.foo] sections containing mon addr settings in the config. Note that this method is not recommended and support will be removed in a future release.

  • —filter-initial-members
  • filter the initial monmap by applying the mon initial memberssetting. Monitors not present in that list will be removed, andinitial members not present in the map will be added with dummyaddresses.
  • —add name ip:port
  • will add a monitor with the specified ip:port to the map.
  • —addv name [protocol:ip:port[,…]]
  • will add a monitor with the specified version:ip:port to the map.
  • —rm name
  • will remove the monitor with the specified ip:port from the map.
  • —fsid uuid
  • will set the fsid to the given uuid. If not specified with –create, a random fsid will be generated.

Example

To create a new map with three monitors (for a fresh Ceph file system):

  1. monmaptool --create --add mon.a 192.168.0.10:6789 --add mon.b 192.168.0.11:6789 \
  2. --add mon.c 192.168.0.12:6789 --clobber monmap

To display the contents of the map:

  1. monmaptool --print monmap

To replace one monitor:

  1. monmaptool --rm mon.a --add mon.a 192.168.0.9:6789 --clobber monmap

Availability

monmaptool is part of Ceph, a massively scalable, open-source, distributedstorage system. Please refer to the Ceph documentation at http://ceph.com/docsfor more information.

See also

ceph(8),crushtool(8),