]>
Commit | Line | Data |
---|---|---|
7c673cae FG |
1 | :orphan: |
2 | ||
3 | ========================================================== | |
4 | monmaptool -- ceph monitor cluster map manipulation tool | |
5 | ========================================================== | |
6 | ||
7 | .. program:: monmaptool | |
8 | ||
9 | Synopsis | |
10 | ======== | |
11 | ||
12 | | **monmaptool** *mapfilename* [ --clobber ] [ --print ] [ --create ] | |
13 | [ --add *ip*:*port* *...* ] [ --rm *ip*:*port* *...* ] | |
14 | ||
15 | ||
16 | Description | |
17 | =========== | |
18 | ||
19 | **monmaptool** is a utility to create, view, and modify a monitor | |
20 | cluster map for the Ceph distributed storage system. The monitor map | |
21 | specifies the only fixed addresses in the Ceph distributed system. | |
22 | All other daemons bind to arbitrary addresses and register themselves | |
23 | with the monitors. | |
24 | ||
25 | When creating a map with --create, a new monitor map with a new, | |
26 | random UUID will be created. It should be followed by one or more | |
27 | monitor addresses. | |
28 | ||
29 | The default Ceph monitor port is 6789. | |
30 | ||
31 | ||
32 | Options | |
33 | ======= | |
34 | ||
35 | .. option:: --print | |
36 | ||
37 | will print a plaintext dump of the map, after any modifications are | |
38 | made. | |
39 | ||
40 | .. option:: --clobber | |
41 | ||
42 | will allow monmaptool to overwrite mapfilename if changes are made. | |
43 | ||
44 | .. option:: --create | |
45 | ||
46 | will create a new monitor map with a new UUID (and with it, a new, | |
47 | empty Ceph file system). | |
48 | ||
49 | .. option:: --generate | |
50 | ||
51 | generate a new monmap based on the values on the command line or specified | |
52 | in the ceph configuration. This is, in order of preference, | |
53 | ||
54 | #. ``--monmap filename`` to specify a monmap to load | |
55 | #. ``--mon-host 'host1,ip2'`` to specify a list of hosts or ip addresses | |
11fdf7f2 | 56 | #. ``[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. |
7c673cae FG |
57 | |
58 | .. option:: --filter-initial-members | |
59 | ||
60 | filter the initial monmap by applying the ``mon initial members`` | |
61 | setting. Monitors not present in that list will be removed, and | |
62 | initial members not present in the map will be added with dummy | |
63 | addresses. | |
64 | ||
65 | .. option:: --add name ip:port | |
66 | ||
67 | will add a monitor with the specified ip:port to the map. | |
68 | ||
69 | .. option:: --rm name | |
70 | ||
71 | will remove the monitor with the specified ip:port from the map. | |
72 | ||
73 | .. option:: --fsid uuid | |
74 | ||
75 | will set the fsid to the given uuid. If not specified with --create, a random fsid will be generated. | |
76 | ||
77 | ||
78 | Example | |
79 | ======= | |
80 | ||
81 | To create a new map with three monitors (for a fresh Ceph file system):: | |
82 | ||
83 | monmaptool --create --add mon.a 192.168.0.10:6789 --add mon.b 192.168.0.11:6789 \ | |
84 | --add mon.c 192.168.0.12:6789 --clobber monmap | |
85 | ||
86 | To display the contents of the map:: | |
87 | ||
88 | monmaptool --print monmap | |
89 | ||
90 | To replace one monitor:: | |
91 | ||
92 | monmaptool --rm mon.a --add mon.a 192.168.0.9:6789 --clobber monmap | |
93 | ||
94 | ||
95 | Availability | |
96 | ============ | |
97 | ||
98 | **monmaptool** is part of Ceph, a massively scalable, open-source, distributed | |
99 | storage system. Please refer to the Ceph documentation at http://ceph.com/docs | |
100 | for more information. | |
101 | ||
102 | ||
103 | See also | |
104 | ======== | |
105 | ||
106 | :doc:`ceph <ceph>`\(8), | |
107 | :doc:`crushtool <crushtool>`\(8), |