Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring and Installing New Servers

Disabling the Firewall

On each server node and client node, run the following commands in sequence to disable the firewall:

1
2
3
systemctl stop firewalld
systemctl disable firewalld
systemctl status firewalld

Configuring Host Names

  1. Set the permanent static host names as ceph4 and ceph5.

    Set the host name of Ceph server node 4 to ceph4:

    1
    hostnamectl --static set-hostname ceph4
    

    Set the host name of Ceph server node 5 to ceph5:

    1
    hostnamectl --static set-hostname ceph5
    
  2. Modify /etc/hosts on each server and client.
    1
    vim /etc/hosts
    
    Add the following content to the file:
     192.168.3.156   ceph1 
     192.168.3.157   ceph2 
     192.168.3.158   ceph3 
     192.168.3.197   ceph4 
     192.168.3.198   ceph5
     192.168.3.192   client1 

Configuring NTP

Ceph automatically checks the time of the storage nodes. If a large time difference is detected, an alarm will be generated. To prevent the time difference between storage nodes, perform the following steps:

  1. Install the NTP service.
    1. On each server node and client node, install the NTP service.
      1
      yum -y install ntp ntpdate
      

    2. Back up the existing configuration on each server node and client node.
      1
      cd /etc && mv ntp.conf ntp.conf.bak
      
    3. Create an NTP file on the server node ceph1.
      1
      vim /etc/ntp.conf
      
      Add the NTP server information:
      1
      2
      3
      4
      5
      restrict 127.0.0.1
      restrict ::1
      restrict 192.168.3.0 mask 255.255.255.0
      server 127.127.1.0
      fudge 127.127.1.0 stratum 8
      

      restrict 192.168.3.0 mask 255.255.255.0 indicates the network segment and subnet mask of ceph1.

    4. Create an NTP file on ceph4, ceph5, and all client nodes.
      1
      vim /etc/ntp.conf
      
      Add the client information:
      1
      server 192.168.3.166
      
    5. Save the settings and exit.
  2. Start the NTP service.
    1. On ceph1, start the NTP service and check the service status.
      1
      2
      3
      systemctl start ntpd
      systemctl enable ntpd
      systemctl status ntpd
      

    2. Forcibly synchronize the time of all other nodes with the NTP server (ceph1) time.
      1
      ntpdate ceph1
      
    3. Write the hardware clock to all nodes except ceph1 to prevent the configuration failure after the restart.
      1
      hwclock -w
      
    4. Install and start the crontab tool on all nodes except ceph1.
      1
      2
      3
      4
      yum install -y crontabs
      chkconfig crond on
      systemctl start crond
      crontab -e
      
    5. Add the following information to enable the system to automatically synchronize time with ceph1 every 10 minutes:
      1
      */10 * * * * /usr/sbin/ntpdate 192.168.3.166
      

Configuring Password-Free Login

Enable ceph1 to access all cluster/client nodes (including ceph1) without a password and client1 to access all cluster/client nodes (including client1) without a password.

  1. Generate a public key on ceph1 and send the public key to each server node and client node.
    1
    2
    ssh-keygen -t rsa 
    for i in {4..5}; do ssh-copy-id ceph$i; done
    
  2. Generate a public key on client1 and send the public key to each server node and client node.
    1
    2
    ssh-keygen -t rsa 
    for i in {4..5}; do ssh-copy-id ceph$i; done
    

After entering the ssh-keygen -t rsa command, press Enter to use the default configuration.

Setting the Permissive Mode

Set the permissive mode on each server node and client node.

  • Set the permissive mode temporarily. The configuration becomes invalid after the system restarts.
    1
    setenforce permissive
    

  • Set the permissive mode permanently. The configuration takes effect upon the next restart.
    1
    vim /etc/selinux/config
    

    Set SELINUX to permissive.

Configuring the EPEL Source

Run the following command on each cluster node and client node to configure the Extra Packages for Enterprise Linux (EPEL) source:

1
yum install epel-release -y

Configuring the Ceph Mirror Source

  1. Create a ceph.repo file on each server node and client node.
    1
    vim /etc/yum.repos.d/ceph.repo
    

    Add the following content to the file:

    [Ceph]
    name=Ceph packages for $basearch
    baseurl=http://download.ceph.com/rpm-luminous/el7/$basearch
    enabled=1
    gpgcheck=1
    type=rpm-md
    gpgkey=https://download.ceph.com/keys/release.asc
    priority=1
     
    [Ceph-noarch]
    name=Ceph noarch packages
    baseurl=http://download.ceph.com/rpm-luminous/el7/noarch
    enabled=1
    gpgcheck=1
    type=rpm-md
    gpgkey=https://download.ceph.com/keys/release.asc
    priority=1
     
    [ceph-source]
    name=Ceph source packages
    baseurl=http://download.ceph.com/rpm-luminous/el7/SRPMS
    enabled=1
    gpgcheck=1
    type=rpm-md
    gpgkey=https://download.ceph.com/keys/release.asc
    priority=1
  2. Update the Yum source.
    1
    yum clean all && yum makecache
    

Installing the Ceph Software

  1. Check the current version on an existing Ceph node.
    1
    ceph -v
    

    The following information is displayed:

  2. Install the Ceph software on the new node. Ensure that the Ceph version is the same as that of existing nodes.
    1
    yum -y install ceph*12.2.11 –exclude ceph-debuginfo
    
  3. Check the version after the new node is installed.
    1
    ceph -v
    

    The following information is displayed: