IT. POST LIST

POST ALL LABEL

ceph - 기본설치1 - 공통설치 및 설정

By 때찌때찌맴매 - 4월 19, 2018



ceph - 기본설치1 공통설치 및 설정


* ceph는 기본적으로 데비안계열 기반으로 진행 되는데, 본 포스팅은 centos에서 진행합니다. 
* 해당 작업서버는 총 7대로써 컨트롤서버인 MGMT(mon 3rd도 같이 사용예정) 1대, 모니터 서버 mon 2대, 스토리지 osd 4대로 구성합니다. vm으로 테스트해도 동일하며, 다른 부분은 스토리지의 RAID를 하느냐, 단일 디스크들을 사용하는냐 입니다.
* ceph - 기본설치 1 메뉴얼은 서버들의 공통설치 및 설정 입니다.

[ yum repolist ]

* ceph 관련 저장소 및  epel-release 저장소를 설치 합니다.
* 다른 저장소 지정은  https://hoguinside.blogspot.kr/2017/11/yum.html  에서 등록하세요.

[root@localhost ~]# echo '[ceph]
name=Ceph packages for $basearch
baseurl=http://download.ceph.com/rpm-jewel/el7/$basearch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

[ceph-noarch]
name=Ceph noarch packages
baseurl=http://download.ceph.com/rpm-jewel/el7/noarch
enabled=1
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc

[ceph-source]
name=Ceph source packages
baseurl=http://download.ceph.com/rpm-jewel/el7/SRPMS
enabled=0
priority=2
gpgcheck=1
type=rpm-md
gpgkey=https://download.ceph.com/keys/release.asc ' > /etc/yum.repos.d/ceph.repo

[root@localhost ~]# yum install epel-release -y && yum repolist


[ 시간 동기화  ntp 설치 ]

* ceph의 장애 포인트중 하나는 시간 동기화 입니다. 서버 시간이 동일하지 않으면 데이터 동기화시 경고 메시지가 발생합니다.
  기본 설정은 0.3초 인데 동기화 단위 시간은 설정에서 변경 가능하며, 0.몇초 단위가 일치해야 경고 메시지가발생하기 않습니다.
* 해당 작업은 7대 서버에 각각 진행합니다.

[root@localhost ~]# yum install ntp -y
[root@localhost ~]# vi /etc/ntp.conf
.
.
.
 18 e public servers from the pool.ntp.org project.
 19 # Use public servers from the pool.ntp.org project..org/join.html).
 20 # Please consider joining the pool (http://www.pool.ntp.org/join.html).
 21 #server 0.centos.pool.ntp.org iburst    => 21 ~ 24 주석
 22 #server 1.centos.pool.ntp.org iburst
 23 #server 2.centos.pool.ntp.org iburst
 24 #server 3.centos.pool.ntp.org iburst

    server kr.pool.ntp.org    # => 해당 3줄 추가
    server time.bora.net
    server time.kornet.net

 25 #adcast 192.168.1.255 autokey        # broadcast server
 26 #broadcast 192.168.1.255 autokey        # broadcast server
 27 #broadcastclient autokey                # broadcast client
.
.
.

[root@localhost ~]# service ntpd restart
Redirecting to /bin/systemctl restart ntpd.service

[root@localhost ~]# systemctl enable ntpd
Created symlink from /etc/systemd/system/multi-user.target.wants/ntpd.service to /usr/lib/systemd/system/ntpd.service.

[root@localhost ~]# netstat -nlp | grep ntp
udp        0      0 192.168.1.17:123         0.0.0.0:*                     22546/ntpd          
udp        0      0 127.0.0.1:123           0.0.0.0:*                     22546/ntpd          
udp        0      0 0.0.0.0:123             0.0.0.0:*                     22546/ntpd          
udp6       0      0 fe80::6eb3:11ff:fe3:123 :::*                          22546/ntpd          
udp6       0      0 ::1:123                 :::*                          22546/ntpd          
udp6       0      0 :::123                  :::*                          22546/ntpd   


[ HOST 설정 및 selinux off ]

[root@localhost ~]# vi /etc/hosts
192.168.1.11 MGTM
192.168.1.12 mon-0
192.168.1.13 mon-1
192.168.1.17 osd-0
192.168.1.18 osd-1
192.168.1.19 osd-2
192.168.1.20 osd-3


* 각 서버에서 HOSTNAME 변경
[root@localhost ~]# echo mgmt > /etc/hostname
[root@localhost ~]# echo mon-0 > /etc/hostname
[root@localhost ~]# echo mon-1 > /etc/hostname
[root@localhost ~]# echo osd-0 > /etc/hostname
[root@localhost ~]# echo osd-1 > /etc/hostname
[root@localhost ~]# echo osd-2 > /etc/hostname
[root@localhost ~]# echo osd-3 > /etc/hostname

[root@localhost ~]# setenforce 0  (해당 작업은 리부팅 하지 않았을 경우에 입력하고, 리부팅 예정이면 하지 않아도 무방합니다.)

[root@localhost ~]# vi /etc/selinux/config 
SELINUX=disabled  # => disabled 로 변경

[root@localhost ~]# reboot
.
.
[root@mgmt ~]# sestatus -v
SELinux status:                 disabled

[ SSH KEYGEN 생성 및 복사 ]

* 우분투나 타 메뉴얼등을 보면 ceph계정을 생성해서 진행하지만 본 포스팅은 root 로 진행합니다.
* 패스워드는 공란으로 엔터로 넘어갑니다.

[root@mgmt ~]# ssh-keygen 
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:26/AzqPSPY6Wdp48sn410UDwVOGD7pjl8JEM9iTeWXA root@mgmt
The key's randomart image is:
+---[RSA 2048]----+
|        .o+.E.   |
|         o.=     |
|        + +o+    |
|       o O.+..   |
|        S X.     |
|       . @o.     |
|     . o*.=.     |
|    . *=Bo .     |
|     ==OB+...    |
+----[SHA256]-----+

* 아래와 같이 7대 모두 공개키를 복사해 줍니다. 주의 할점은 mgmt 자기 자신에게도 복사를 해야 합니다. 
  ceph 설치시 7대 전부 진행해야 하기 때문에 해당 작업을 하지 않으면 일일이  패스워드를 입력해야 합니다.

[root@mgmt ~]# ssh-copy-id mgmt
.
.
[root@mgmt ~]# ssh-copy-id mon-0
.
.
[root@mgmt ~]# ssh-copy-id mon-1
.
.
.

[root@mgmt ~]# ssh osd-0
Last failed login: Wed Apr 18 11:20:35 KST 2018 from xxx.xxx.xx.xxx.ptr.cy4n.net on ssh:notty
There were 25 failed login attempts since the last successful login.
Last login: Wed Apr 18 11:10:12 2018 from xxx.xx.xx.x
[root@osd-0 ~]# 


* 테스트 후 정상적이면 CEPH 설치작업으로 넘어 갑니다.

  • Share:

You Might Also Like

0 개의 댓글