ceph集群 octups添加Monitor
添加Monitor
- 在目标节点导出mon的钥匙环文件
sudo -u ceph ceph auth get mon. -o /tmp/ceph.mon.keyring
- 获取monmap并写入文件
sudo -u ceph ceph mon getmap -o /tmp/monmap
Note:
可以通过
monmaptool --print /tmp/monmap
显示文件内容monmaptool: monmap file /tmp/monmap epoch 2 fsid ec2a0b57-bd62-44e9-9366-4bcf8e603157 last_changed 2023-02-05T17:09:37.493264+0800 created 2023-02-05T15:40:34.105788+0800 min_mon_release 15 (octopus) 0: [v2:192.168.100.26:3300/0,v1:192.168.100.26:6789/0] mon.cargo-cluster-26
- 初始化mon目录
sudo -u ceph ceph-mon --mkfs -i $HOSTNAME --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
Note:
sudo -u ceph ceph-mon [--cluster {cluster-name}] --mkfs -i $HOSTNAME --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
- 启动服务
sudo systemctl start ceph-mon@$HOSTNAME
sudo systemctl enable ceph-mon@$HOSTNAME
/etc/ceph/ceph.conf必须配置publick_network和cluster_network 方可启动服务