3.8. Ceph Monitor 的最低配置


如果 Ceph 配置文件中尚未配置 DNS 和 monitor 地址,则 Ceph Monitor 的裸机监控设置包括每个 monitor 的主机名。您可以在 [mon] 下或在特定监控器的条目下配置它们。

[mon]
mon_host = hostname1,hostname2,hostname3
mon_addr = 10.0.0.10:6789,10.0.0.11:6789,10.0.0.12:6789,10.0.0.10:3300,10.0.0.11:3300,10.0.0.12:3300
Copy to Clipboard Toggle word wrap

或者

[mon.a]
host = hostname1
mon_addr = 10.0.0.10:6789, 10.0.0.10:3300
Copy to Clipboard Toggle word wrap
注意

此 monitor 的最小配置假定部署工具为您生成 fsidmon. 键。

重要

部署 Ceph 集群后,请勿更改 monitor 的 IP 地址。

要配置 Ceph 集群以进行 DNS 查找,请在 Ceph 配置文件中设置 mon_dns_srv_name 设置。

设置后,配置 DNS。为 DNS 区域中的 monitor 创建 IPv4 (A) 或 IPv6 (AAAA) 记录。

示例

#IPv4
mon1.example.com. A 192.168.0.1
mon2.example.com. A 192.168.0.2
mon3.example.com. A 192.168.0.3

#IPv6
mon1.example.com. AAAA 2001:db8::100
mon2.example.com. AAAA 2001:db8::200
mon3.example.com. AAAA 2001:db8::300
Copy to Clipboard Toggle word wrap

其中: example.com 是 DNS 搜索域。

然后,使用名称 mon_dns_srv_name 配置设置创建 SRV TCP 记录,指向三个监控器。以下示例使用默认的 ceph-mon 值。

示例

_ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon1.example.com.
_ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon2.example.com.
_ceph-mon._tcp.example.com. 60 IN SRV 10 60 6789 mon3.example.com.
_ceph-mon._tcp.example.com. 60 IN SRV 10 60 3300 mon1.example.com.
_ceph-mon._tcp.example.com. 60 IN SRV 10 60 3300 mon2.example.com.
_ceph-mon._tcp.example.com. 60 IN SRV 10 60 3300 mon3.example.com.
Copy to Clipboard Toggle word wrap

监视器默认在端口 67893300 上运行,其优先级和 weight 分别设置为 1060,在示例中分别设置为 10 和 60。

返回顶部
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2025 Red Hat