Configuring the Environment
In this document, three server nodes and three client nodes are planned for the Ceph cluster.
- Configure the mirror source on all server nodes.
Skip this step if the Internet access is available.
- Configure the openEuler local source.
Upload the everything mirror source file of the OS to the server. Specifically, use an SFTP tool to upload openEuler-***-everything-aarch64-dvd.iso to the /root directory of the server.
1 2
mkdir -p /iso mount /root/openEuler-***-everything-aarch64-dvd.iso /iso
- Create a mirror Yum source.
1vi /etc/yum.repos.d/openEuler.repo - Add the following content to the file:
1 2 3 4 5 6
[Base] name=Base baseurl=file:///iso enabled=1 gpgcheck=0 priority=1
- Configure the openEuler local source.
- Download compat-openssl10-1.0.2o-5.fc30.aarch64.rpm and install it.Download address: https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/aarch64/os/Packages/c/
wget https://archives.fedoraproject.org/pub/archive/fedora/linux/releases/30/Everything/aarch64/os/Packages/c/compat-openssl10-1.0.2o-5.fc30.aarch64.rpm --no-check-certificate rpm -ivh compat-openssl10-1.0.2o-5.fc30.aarch64.rpm
- Disable the firewall.
To disable the firewall on the current node, run the following commands on all server and client nodes:
1 2 3
systemctl stop firewalld systemctl disable firewalld systemctl status firewalld

- Configure host names.Configure the permanent static host names. Set the names of the server nodes to ceph1 to ceph3 and that of the client nodes to client1 to client3.
- Configure node names.
- ceph1:
1hostnamectl --static set-hostname ceph1
- client1:
1hostnamectl --static set-hostname client1
Configure other nodes in the same way.
- ceph1:
- Modify the domain name resolution file.
1vi /etc/hostsAdd the following content to the /etc/hosts file on all server and client nodes:
1 2 3 4 5 6
192.168.3.166 ceph1 192.168.3.167 ceph2 192.168.3.168 ceph3 192.168.3.160 client1 192.168.3.161 client2 192.168.3.162 client3
The preceding IP addresses are only examples. Replace them as required. You can run the ip a command to query the actual IP address. You are advised to set the host names of the three server nodes to ceph1 to ceph3 and the host names of the three client nodes to client1 to client3. The preceding example uses three servers and three clients. Change the number of nodes based on the site requirements.
- Configure node names.
- Configure Network Time Protocol (NTP).Ceph automatically checks the time between storage nodes. If the time difference between different nodes is large, an alarm is generated. Therefore, configure clock synchronization between nodes.
- Install the NTP service.
- Install NTP on all server and client nodes.
1yum -y install ntp ntpdate
- Back up the original configurations of all server and client nodes.
1cd /etc && mv ntp.conf ntp.conf.bak
- Create an NTP file on ceph1, which serves as the NTP server.
1vi /etc/ntp.confAdd the following content to the NTP file:1 2 3 4 5 6 7 8 9
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 default kod nomodify notrap nopeer noquery interface ignore wildcard interface listen x.x.x.x (IP address of the server)
The line restrict 192.168.3.0 mask 255.255.255.0 indicates the network segment and subnet mask of the ceph1 node.
- Create an NTP file on ceph2, ceph3, and all client nodes.
1vi /etc/ntp.confAdd the following content in which the IP address is the IP address of ceph1:1server 192.168.3.166
- Install NTP on all server and client nodes.
- Start the NTP service.
- Start the NTP service on ceph1 and check the service status.
1 2 3
systemctl start ntpd systemctl enable ntpd systemctl status ntpd

- Forcibly synchronize the NTP server (ceph1) time to all the other nodes.
1ntpdate ceph1
- Write the hardware clock to all nodes except ceph1 to prevent configuration failures after the restart.
1hwclock -w
- Install and start the crontab tool on all nodes except ceph1.
1 2 3 4
yum install -y crontabs systemctl enable crond.service systemctl start crond crontab -e
- Add the following content so that all the other nodes automatically synchronize time with ceph1 every 10 minutes:
1*/10 * * * * /usr/sbin/ntpdate 192.168.3.166
- Start the NTP service on ceph1 and check the service status.
- Install the NTP service.
- Configure password-free login.
Generate a public key on ceph1 and deliver it to each other server node and client node.
- For a three-node network of ceph1, ceph2, ceph3, client1, client2, and client3:
1 2 3
ssh-keygen -t rsa for i in {1..3};do ssh-copy-id ceph$i;done for i in {1..3};do ssh-copy-id client$i;done
- For a network of ceph1 and client1:
1 2 3
ssh-keygen -t rsa ssh-copy-id ceph1 ssh-copy-id client1
After entering the first command ssh-keygen -t rsa, press Enter to use the default configuration.


- For a three-node network of ceph1, ceph2, ceph3, client1, client2, and client3:
- Set the permissive mode.
Set the permissive mode on all server and client nodes.
- Temporarily disable the SELinux function. The setting becomes invalid after the OS is restarted.
1setenforce permissive
- Set the permissive mode permanently. The configuration takes effect upon the next restart.
1vi /etc/selinux/configSet SELINUX to permissive.

- Temporarily disable the SELinux function. The setting becomes invalid after the OS is restarted.