System development or Technical something

Install Ceph in CentOS 7.


I confirmed this url.

I use these nodes.

node role ip
ceph01 mon.node1/osd.0
ceph02 osd.1
ceph03 osd.2
ceph04 ceph-deploy
ceph05 client

In the following description, I prepared server setting at the all nodes.
The following description show a part of execution.

Install epel repository.

[root@ceph04 ~]# yum install epel-release
[root@ceph04 ~]# yum update

Set NTP(chrony)

[root@ceph03 ~]# yum install chrony

[root@ceph03 ~]# vi /etc/chrony.conf
[root@ceph03 ~]# systemctl start chronyd
[root@ceph03 ~]# systemctl enable chronyd

[root@ceph04 ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address         Stratum Poll Reach LastRx Last sample
^* ntp-a2.nict.go.jp             1   6    77    25   +165us[+2840us] +/- 5197us
[root@ceph04 ~]#

Check SELinux.

[root@ceph04 ~]# getenforce
[root@ceph04 ~]#

Stop(disable) Firewall. if you need to enable, you should configure firewall setting.

[root@ceph04 ~]# systemctl stop firewalld
[root@ceph04 ~]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@ceph04 ~]#

[root@ceph04 ~]# iptables -nL
Chain INPUT (policy ACCEPT)
target     prot opt source               destination

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
[root@ceph04 ~]#

At this time, I don't have DNS. so I use hosts file.

[root@ceph04 ~]# cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 ceph01 ceph02 ceph03 ceph04 ceph05
[root@ceph04 ~]#

I use cuser to access by ssh without pass.

[root@ceph04 ~]# useradd cuser
[root@ceph04 ~]# passwd cuser

After switch cuser

[cuser@ceph04 ~]$ ssh-keygen -t rsa -b 2048 -N ""
[cuser@ceph04 ~]$ ssh-copy-id cuser@ceph01
[cuser@ceph04 ~]$ ssh-copy-id cuser@ceph02
[cuser@ceph04 ~]$ ssh-copy-id cuser@ceph03
[cuser@ceph04 ~]$ ssh-copy-id cuser@ceph04

Set to use sudo.

[root@ceph04 ~]# echo "cuser ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/cuser
cuser ALL = (root) NOPASSWD:ALL
[root@ceph04 ~]# sudo chmod 0440 /etc/sudoers.d/cuser
[root@ceph04 ~]#
[root@ceph04 ~]# cat << EOM > /etc/yum.repos.d/ceph.repo
> [ceph-noarch]
> name=Ceph noarch packages
> baseurl=http://download.ceph.com/rpm-mimic/el7/noarch
> enabled=1
> gpgcheck=1
> type=rpm-md
> gpgkey=https://download.ceph.com/keys/release.asc
[root@ceph04 ~]#

But instead of creating the repository configuration file, I just need to install ceph-release as follows:

[root@ceph04 ~]# yum install ceph-release