monmaptool – ceph 监视器运行图操作工具¶
提纲¶
描述¶
monmaptool 工具用于创建、查看、修改用于 Ceph 分布式存储系统的监视器集群运行图。监视器图只是在 Ceph 分布式系统中定义了几个固定的地址,其他所有守护进程绑定到任意地址、并注册到监视器。
用 –create 选项创建新图时,会创建新的随机 UUID ,此选项后还应加一或多个监视器地址。
Ceph 监视器 v1 版信使协议的端口是 6789 ,而 v2 版协议的端口是 3300 。
Multiple actions can be performed per invocation.
选项¶
-
--print¶ 在所有修改完成后,打印一份监视器图的纯文本转储。
-
--feature-list[plain|parseable]¶ list the enabled features as well as the available ones.
By default, a human readable output is produced.
-
--create¶ 新建一监视器图,它有新的 UUID (用它可创建个新的空 Ceph 文件系统)。
-
--clobber¶ 更改时允许 monmaptool 覆盖 mapfilename 。
Only useful when –create is used.
-
--generate¶ 基于命令行参数或配置文件中的配置生成新 monmap ,配置来源优先级如下:
--monmap filename指定要载入的 monmap--mon-host 'host1,ip2'指定一系列主机或 IP 地址配置文件中包含
mon addr选项的[mon.foo]段落。请注意,不建议此方法、且将来的版本会删除此选项。
-
--filter-initial-members¶ 用
mon initial members选项的设置过滤初始 monmap ,不在此列表内的监视器将被删除、没在图内的初始成员将用假地址加入。
-
--addname ip[:port]¶ 把指定 ip:port 的监视器加入图中。
If the nautilus feature is set, and the port is not, the monitor will be added for both messenger protocols.
-
--addvname [protocol:ip:port[,...]]¶ add a monitor with the specified version:ip:port to the map.
-
--rmname¶ 从图中删除 ip:port 监视器。
-
--fsiduuid¶ 把 fsid 设置为指定的 uuid ,如果 –create 时没指定,将会随机生成一个。
-
--feature-setvalue [--optional|--persistent]¶ enable a feature.
-
--feature-unsetvalue [--optional|--persistent]¶ disable a feature.
-
--enable-all-features¶ enable all supported features.
-
--set-min-mon-releaserelease¶ set the min_mon_release.
实例¶
新建一个有三个监视器的新图(为新的 Ceph 集群):
monmaptool --create --add nodeA 192.168.0.10 --add nodeB 192.168.0.11 \
--add nodeC 192.168.0.12 --enable-all-features --clobber monmap
显示监视器图内容:
monmaptool --print monmap
替换一个监视器:
monmaptool --rm nodeA monmap
monmaptool --add nodeA 192.168.0.9 monmap
使用范围¶
monmaptool 是 Ceph 的一部分,这是个伸缩力强、开源、分布式的存储系统,更多信息参见 http://ceph.com/docs 。