change ip node and public_network in cluster
I have implemented a ceph cluster with cephadm which has three monitors and three OSDs each node have one interface 192.168.0.0/24 network. I want to change the address of the machines to the range 10.4.4.0/24. Is there a solution for this change without data loss and failure? i change the pubic_network in mon and change the ip node but its not worked . how can i sovle this problem? ``` ceph orch host ls HOST ADDR LABELS STATUS ceph-01 192.168.0.130 _admin,rgw ceph-02 192.168.0.131 _admin,rgw ceph-03 192.168.0.132 _admin,rgw 3 hosts in cluster ```` [root@ceph-01 ~]# ceph config get mon public_network 192.168.0.0/24 ```` [root@ceph-01 ~]# ceph orch ls NAME PORTS RUNNING REFRESHED AGE PLACEMENT alertmanager ?:9093,9094 1/1 112s ago 9M count:1 ceph-exporter 3/3 114s ago 8M * crash 3/3 114s ago 9M * grafana ?:3000 1/1 112s ago 8M count:1 mgr 2/2 113s ago 9M count:2 mon 3/3 114s ago 8M count:3 node-exporter ?:9100 3/3 114s ago 9M * osd.dashboard-admin-1685787597651 6 114s ago 8M * prometheus ?:9095 1/1 112s ago 3M count:1 ````
Hi, I recommend to read the docs[1] carefully. The preferred method is to add a mon within the new ip range and then remove the old ones one by one to maintain quorum. The hosts must be able to route between those networks. If you don't have an additional mon available or there can't be any routing between those networks you would need to follow the advanced method [2]. Basically, you would edit the monmap to reflect the new ip range and then inject it into the stopped mon daemons. That means your cluster has to be stopped, of course. Regards, Eugen [1] https://docs.ceph.com/en/reef/rados/operations/add-or-rm-mons/#changing-a-mo... [2] https://docs.ceph.com/en/reef/rados/operations/add-or-rm-mons/#changing-a-mo... Zitat von farhad kh <farhad.khedriyan@gmail.com>:
I have implemented a ceph cluster with cephadm which has three monitors and three OSDs each node have one interface 192.168.0.0/24 network. I want to change the address of the machines to the range 10.4.4.0/24. Is there a solution for this change without data loss and failure? i change the pubic_network in mon and change the ip node but its not worked . how can i sovle this problem? ``` ceph orch host ls HOST ADDR LABELS STATUS ceph-01 192.168.0.130 _admin,rgw ceph-02 192.168.0.131 _admin,rgw ceph-03 192.168.0.132 _admin,rgw 3 hosts in cluster
```` [root@ceph-01 ~]# ceph config get mon public_network 192.168.0.0/24 ```` [root@ceph-01 ~]# ceph orch ls NAME PORTS RUNNING REFRESHED AGE PLACEMENT alertmanager ?:9093,9094 1/1 112s ago 9M count:1 ceph-exporter 3/3 114s ago 8M * crash 3/3 114s ago 9M * grafana ?:3000 1/1 112s ago 8M count:1 mgr 2/2 113s ago 9M count:2 mon 3/3 114s ago 8M count:3 node-exporter ?:9100 3/3 114s ago 9M * osd.dashboard-admin-1685787597651 6 114s ago 8M * prometheus ?:9095 1/1 112s ago 3M count:1 ```` _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
Hi, thanks But this document is for old versions and cannot be used for the container version . I used the reef version and when I retrieve the monmap and edit I can't use ceph-mon to change the monmap or any way to change I tried to solve this problem by adding a new node and deleting the old nodes, but because the monmap has not changed, it does not allow adding a new node with a different subnet. is ther a way for this change in container versions?
Hi, your response arrived in my inbox today, so sorry for the delay. I wrote a blog post [1] just two weeks ago for that procedure with cephadm, Zac adopted that and updated the docs [2]. Can you give that a try and let me know if it worked? I repeated that procedure a couple of times to be sure the docs are correct, but of course there's still a chance I might have missed something. Thanks, Eugen [1] http://heiterbiswolkig.blogs.nde.ag/2024/02/22/cephadm-change-public-network... [2] https://docs.ceph.com/en/latest/rados/operations/add-or-rm-mons/#using-cepha... Zitat von farhad khedriyan <farhad.khedriyan@gmail.com>:
Hi, thanks But this document is for old versions and cannot be used for the container version . I used the reef version and when I retrieve the monmap and edit I can't use ceph-mon to change the monmap or any way to change I tried to solve this problem by adding a new node and deleting the old nodes, but because the monmap has not changed, it does not allow adding a new node with a different subnet. is ther a way for this change in container versions? _______________________________________________ ceph-users mailing list -- ceph-users@ceph.io To unsubscribe send an email to ceph-users-leave@ceph.io
participants (3)
-
Eugen Block
-
farhad kh
-
farhad khedriyan