我要评分
获取效率
正确性
完整性
易理解

Configuring MON Nodes

Perform operations in this section only on ceph1.

  1. Create a /root/ceph-mycluster/ cluster directory and use ceph-deploy to deploy the node configuration file.
    1
    2
    mkdir /root/ceph-mycluster && cd /root/ceph-mycluster
    ceph-deploy new ceph1 ceph2 ceph3
    

    When running node configuration commands and using ceph-deploy to operate the Ceph cluster, you are advised to perform the operations in a dedicated cluster directory (/root/ceph-mycluster/ for example) instead of the /etc/ceph/ directory to avoid conflicts.

  2. Configure MON nodes.
    1. Configure the public network, cluster network, and MON nodes in the ceph.conf file that is automatically generated in the /root/ceph-mycluster/ directory.
      1
      vi /root/ceph-mycluster/ceph.conf
      
      Modify the content in the ceph.conf file as follows:
       1
       2
       3
       4
       5
       6
       7
       8
       9
      10
      11
      12
      13
      [global]
      fsid = 0207ddea-2150-4509-860d-365e87420b3e
      mon_initial_members = ceph1, ceph2, ceph3
      mon_host = 192.168.3.160,192.168.3.167,192.168.3.166
      auth_cluster_required = cephx
      auth_service_required = cephx
      auth_client_required = cephx
      
      public_network = 192.168.3.0/24
      cluster_network = 192.168.4.0/24
      
      [mon]
      mon_allow_pool_delete = true
      
    2. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.

      The modification is to isolate the internal cluster network from the external access network. 192.168.4.0 is used for data synchronization in the internal storage cluster (used only between storage nodes), and 192.168.3.0 is used for data exchange between storage nodes and compute nodes.