Ceph Squid : मॉनिटर्स जोड़ें या हटाएँ2024/05/03 |
मौजूदा क्लस्टर से मॉनिटर डेमॉन को जोड़ने या हटाने का तरीका इस प्रकार है।
| +--------------------+ | +----------------------+ | [dlp.srv.world] |10.0.0.30 | 10.0.0.31| [www.srv.world] | | Ceph Client +-----------+-----------+ RADOSGW | | | | | | +--------------------+ | +----------------------+ +----------------------------+----------------------------+ | | | |10.0.0.51 |10.0.0.52 |10.0.0.53 +-----------+-----------+ +-----------+-----------+ +-----------+-----------+ | [node01.srv.world] | | [node02.srv.world] | | [node03.srv.world] | | Object Storage +----+ Object Storage +----+ Object Storage | | Monitor Daemon | | | | | | Manager Daemon | | | | | +-----------------------+ +-----------------------+ +-----------------------+ |
[1] | उदाहरण के लिए, एडमिन नोड पर मॉनिटर डेमॉन के लिए एक [node04] नोड जोड़ें। |
# सार्वजनिक कुंजी स्थानांतरित करें root@node01:~# ssh-copy-id node04 # आवश्यक पैकेज स्थापित करें root@node01:~# ssh node04 "apt update; apt -y install ceph python3-packaging"
# मॉनिटर मैप कॉन्फ़िगर करें root@node01:~# FSID=$(grep "^fsid" /etc/ceph/ceph.conf | awk {'print $NF'}) root@node01:~# NODENAME="node04" root@node01:~# NODEIP="10.0.0.54" root@node01:~# monmaptool --add $NODENAME $NODEIP --fsid $FSID /etc/ceph/monmap monmaptool: monmap file /etc/ceph/monmap monmaptool: set fsid to 3666a474-14e0-4c5f-ad1e-daf2e30aed8fID /etc/ceph/monmap monmaptool: writing epoch 0 to /etc/ceph/monmap (2 monitors) # मॉनिटर डेमॉन को कॉन्फ़िगर करें root@node01:~# scp /etc/ceph/ceph.conf node04:/etc/ceph/ceph.conf root@node01:~# scp /etc/ceph/ceph.mon.keyring node04:/etc/ceph root@node01:~# scp /etc/ceph/monmap node04:/etc/ceph root@node01:~# ssh node04 "ceph-mon --cluster ceph --mkfs -i node04 --monmap /etc/ceph/monmap --keyring /etc/ceph/ceph.mon.keyring" root@node01:~# ssh node04 "chown -R ceph:ceph /etc/ceph /var/lib/ceph/mon" root@node01:~# ssh node04 "ceph auth get mon. -o /etc/ceph/ceph.mon.keyring" root@node01:~# ssh node04 "systemctl enable --now ceph-mon@node04" root@node01:~# ssh node04 "ceph mon enable-msgr2"
ceph -s cluster: id: 3666a474-14e0-4c5f-ad1e-daf2e30aed8f health: HEALTH_OK services: mon: 2 daemons, quorum node01,node04 (age 13s) mgr: node01(active, since 76m) osd: 3 osds: 3 up (since 9m), 3 in (since 10m) rgw: 1 daemon active (1 hosts, 1 zones) data: pools: 5 pools, 129 pgs objects: 226 objects, 454 KiB usage: 175 MiB used, 480 GiB / 480 GiB avail pgs: 129 active+clean |
[2] | मौजूदा क्लस्टर से मॉनिटर डेमॉन को हटाने के लिए, निम्नानुसार कमांड चलाएँ। उदाहरण के लिए, [node04] नोड हटाएँ। |
root@node01:~# ceph -s cluster: id: 3666a474-14e0-4c5f-ad1e-daf2e30aed8f health: HEALTH_OK services: mon: 2 daemons, quorum node01,node04 (age 13s) mgr: node01(active, since 76m) osd: 3 osds: 3 up (since 9m), 3 in (since 10m) rgw: 1 daemon active (1 hosts, 1 zones) data: pools: 5 pools, 129 pgs objects: 226 objects, 454 KiB usage: 175 MiB used, 480 GiB / 480 GiB avail pgs: 129 active+clean # मॉनिटर डेमॉन हटाएँ root@node01:~# ceph mon remove node04
# मॉनिटर डेमॉन को अक्षम करें root@node01:~# ssh node04 "systemctl disable --now ceph-mon@node04.service" ceph -s cluster: id: 3666a474-14e0-4c5f-ad1e-daf2e30aed8f health: HEALTH_OK services: mon: 1 daemons, quorum node01 (age 44s) mgr: node01(active, since 78m) osd: 3 osds: 3 up (since 10m), 3 in (since 12m) rgw: 1 daemon active (1 hosts, 1 zones) data: pools: 5 pools, 129 pgs objects: 226 objects, 454 KiB usage: 175 MiB used, 480 GiB / 480 GiB avail pgs: 129 active+clean |
Sponsored Link |
|