help reconfiguring ceph

Oct 9, 2024
223
8
18
Hi, I installed Ceph on a single network. Now I would like to split the networks into the cluster net and public net. By reading the Ceph configuration file, do I just need to change the subnet for the respective networks? I'm attaching my configuration file.

[global]
auth_client_required = cephx
auth_cluster_required = cephx
auth_service_required = cephx
cluster_network = 192.168.21.1/24
fsid = 00594592-9b93-41ed-8b4e-c116d8706535
mon_allow_pool_delete = true
mon_host = 192.168.21.1 192.168.21.2 192.168.21.3
ms_bind_ipv4 = true
ms_bind_ipv6 = false
osd_pool_default_min_size = 2
osd_pool_default_size = 3
public_network = 192.168.21.1/24

[client]
keyring = /etc/pve/priv/$cluster.$name.keyring

[client.crash]
keyring = /etc/pve/ceph/$cluster.$name.keyring

[mon.pve1]
public_addr = 192.168.21.1

[mon.pve2]
public_addr = 192.168.21.2

[mon.pve3]
public_addr = 192.168.21.3



My new networks are: public net 192.168.25.1
and the cluster net is 192.168.24.1. Can I just change them in this file?
 
Changing the Ceph cluster network is easy. Change it in the config file and restart the OSDs. Only one host at a time! systemctl restart ceph-osd.target.

The Ceph Public network is a bit more involved because it is not just the config file. The Ceph MONs also have their internal monmap.
The best approach here would probably be to first change the public_network line, but leave all other mentions for the MONs in that network alone.
Then destroy and recreate each MON one by one with a minute in between or so. That way, all mentions of the MON in the ceph.conf file, and the MON internal monmap will be switched over to the new network when recreating each MON.

Use ss -tulpn | grep ceph to see if the services moved over to the new network.