SlideShare a Scribd company logo
1 of 75
Download to read offline
Copyright 2015 osci.kr. All Rights Reserved / Confidential
RHEL/CentOS 7
Pacemaker 기반 High Availability
운영자 가이드
(주)오픈소스컨설팅
2015. 12. 15
문경윤 차장
2
Pacemaker 기반 Linux High Availability OverviewI
II
III
클러스터 운영 기본
클러스터 운영 실무
IV 부록
Agenda
본 문서는 특정 고객사의 특수한 환경을 고려하여 작성된 내용이 일부 포함된 운영
메뉴얼이므로 Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수
있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지
않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오.
RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로
작성되었습니다.
3
1. Pacemaker 기반
Linux High Availability
Overview
1.1. Pacemaker Overview
4
1.1. Pacemaker Overview 1. Pacemaker 기반 Linux High Availability Overview
1.1.1. Pacemaker Architecture
High Level에서 Pacemaker 기반 클러스터는 3개 요소로 구성되어 있습니다.
Non-cluster aware
components :
이 요소들은 리소스 start,
stop, 모니터링 용도의
스크립트 뿐만 아니라
스크립트들이 구현한
다양한 표준들 사이의
차이점을 보완하는 local
daemon을 포함합니다.
Core cluster infrastructure는
messaging과 membership
기능을 제공합니다.
클러스터 이벤트(노드 leaving과 join)와 리소스
이벤트(장애 모니터링) 뿐만 아니라 관리자의 구성
변경에 대해 프로세스하고 반응하는 중심부.
이 모든 이벤트의 반응에서 Pacemaker는
이상적인 클러스터 상태를 산정하고 최적의 경로를
마련합니다.
▲ Conceptual Stack Overview
5
1.1. Pacemaker Overview
1.1.1. Pacemaker Architecture
Corosync가 결합되면 Pacamaker는
클러스터 파일시스템 커뮤니티의 최근의
표준화 작업에 힘입어 널리 알려진
오픈소스 클러스터 파일시스템들을
지원합니다.
이 커뮤니티들은 메시징 기능을 위한
Corosync와, 멤버쉽(노드 up/down)과
fencing 서비스를 위한 Pacemaker를
활용하는 일반적인 분산 lock manager를
활용합니다.
▲ The Pacemaker Stack
1. Pacemaker 기반 Linux High Availability Overview
6
1.1. Pacemaker Overview
1.1.1. Pacemaker Architecture
1. Pacemaker 기반 Linux High Availability Overview
7
1.1. Pacemaker Overview
1.1.1. Pacemaker Architecture
Cluster Information Base (CIB)
The Pacemaker information daemon으로, DC(Designated Co-ordinator; Pacemaker에 의해 할당된
노드로서, CIB를 통해 클러스터 상태와 액션을 저장하고 분산)로부터 현재의 구성과 상태 정보를
내부적으로 배포하고 동기화하기 위해 XML을 사용합니다.
1. Pacemaker 기반 Linux High Availability Overview
8
1.1. Pacemaker Overview
1.1.1. Pacemaker Architecture
Cluster Resource Management Daemon (CRMd)
Pacemaker 클러스터 리소스 동작은 이 데몬을 통해 라우트됩니다. CRMd에 의해 관리되는 리소스는
필요할 때 이동되고 인스턴스화되고 바뀌는 클라이언트 시스템에 의해 쿼리될 수 있습니다.
각 클러스터 노드는 또한 CRMd와 리소스 간 인터페이스로써 동작하는 local resource manager
daemon(LRMd)을 포함합니다. LRMd는 CRMd에서 agent를 향해 커맨드를 전달합니다. 이 커맨드는 상태
정보를 시작하고 중지하고 릴레이하는 것과 같은 것입니다.
1. Pacemaker 기반 Linux High Availability Overview
9
1.1. Pacemaker Overview
1.1.1. Pacemaker Architecture
Shoot the Other Node in the Head (STONITH)
종종 power switch와 함께 연결되는, STONITH는 Pacemaker에서 fence 요청을 처리하고 노드의 전원을
강제로 down시키고 데이터 무결성을 보장하기 위해 클러스터로부터 해당 노드를 remove 처리하는
클러스터 리소스로써 동작합니다. STONITH는 CIB에서 구성되고 일반적인 클러스터 리소스로써
모니터링될 수 있습니다.
1. Pacemaker 기반 Linux High Availability Overview
10
1.2.2. Pacemaker Configuration and Management Tools
1.1. Pacemaker Overview
Pacemaker는 클러스터의 배포, 모니터링, 관리를 위해 두 가지의 구성 도구로 특징을 이루고 있습니다.
pcs
pcs는 Pacemaker의 모든 측면과 Corosync hearbeat daemon을 제어합니다. 커맨드라인 기반 프로그램인
pcs는 아래의 관리 태스크들을 발휘합니다:
- Pacemaker/Corosync cluster를 생성하고 구성
- 실행 상태에서 클러스터의 구성을 수정
- 클러스터 시작, 중지, 상태 정보 출력 등을 비롯하여 Pacemaker와 Corosync를 원격으로 구성
1. Pacemaker 기반 Linux High Availability Overview
11
1.2.2. Pacemaker Configuration and Management Tools
1.1. Pacemaker Overview
pcs-gui
Pacemaker/Corosync 클러스터 생성 및 구성을 위한 그래피컬한 사용자 인터페이스.
커맨드 기반 pcs 유틸리티와 동등한 기능성을 가짐 ▼ RHEL7의 pcs-gui 화면
1. Pacemaker 기반 Linux High Availability Overview
12
2. Cluster 운영 기본
2.1. Topology
2.2. Cluster Infrastructure 점검
2.3. Cluster 시작 및 검증
2.4. The pcs Command Line Interface 기본
2.5. 자주 사용되는 pcs Command
13
2.1. Topology
hostname : node1 hostname : node2
2. Cluster 운영 기본
service network
heartbeat network
fencing device network
111.111.111.10192.168.0.1010.0.0.110
10.0.0.10
111.111.111.20 192.168.0.20 10.0.0.120
10.0.0.20
Storage
1G Ethernet Switch
10G Ethernet Switch
San Switch
14
2.2. Cluster Infrastructure 점검
클러스터 서비스를 정상적으로 구동하기 위해서는 클러스터 인프라가 정상적으로 준비되어 있어야 합니다.
아래 요소들을 필히 체크한 뒤 클러스터를 구동해야 합니다. 클러스터 구동 뿐만 아니라 운영 중에도 아래
요소들 중 하나라도 문제가 생기면 노드 장애 시 올바른 failover가 이루어지는 것이 보증되지 않습니다.
FQDN or hostname – 클러스터는 노드들을 FQDN or hostname으로 식별합니다.
Network – 클러스터 노드 간 통신은 TCP/IP 기반으로 이루어집니다.
Shared volume – 모든 클러스터 노드들에 물리적으로 연결되는 볼륨으로, 실시간으로 변경되는
데이터는 이 볼륨에 위치시켜야 합니다.
NTP – 클러스터와 같은 멀티 노드 아키텍처에서 노드 간 시각 동기화는 필수적입니다.
Firewall – 클러스터 통신에 사용되는 TCP/UDP 포트가 노드 간 open되어 있어야 합니다.
STONITH(fencing device) – 클러스터 노드에 장애 발생 시 장애 노드에 의한 shared volume의 data
corruption을 방지하기 위해 전원을 차단하는 방법 등으로 장애 노드의 shared volume 액세스를
차단하는 장치입니다.
2. Cluster 운영 기본
15
2.2.1. FQDN or hostname
/etc/hosts 구성 및 확인
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
111.111.111.10 node1
111.111.111.30 cluster-svc
111.111.111.20 node2
# HA heartbeat
192.168.0.10 node1-HB
192.168.0.20 node2-HB
# HP iLO
10.0.0.10 node1-CO
10.0.0.20 node2-CO
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
16
2.2.2. Network
네트워크 인터페이스 link status 및 ip address 확인 – node1
[root@node1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond2 state UP qlen 1000
link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff
3: eno49: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond2 state UP qlen 1000
link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff
4: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:14:03:c1 brd ff:ff:ff:ff:ff:ff
5: ens1f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond0 state UP qlen 1000
link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff
6: eno50: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5c:b9:01:89:5d:6d brd ff:ff:ff:ff:ff:ff
7: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:14:03:c2 brd ff:ff:ff:ff:ff:ff
8: eno51: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5c:b9:01:89:5d:6e brd ff:ff:ff:ff:ff:ff
9: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:14:03:c3 brd ff:ff:ff:ff:ff:ff
10: eno52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
1000
link/ether 5c:b9:01:89:5d:6f brd ff:ff:ff:ff:ff:ff
inet 10.0.0.110/24 brd 10.146.31.255 scope global eno52
valid_lft forever preferred_lft forever
inet6 fe80::5eb9:1ff:fe89:5d6f/64 scope link
valid_lft forever preferred_lft forever
11: ens1f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond1 state UP qlen 1000
link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff
12: ens4f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond0 state UP qlen 1000
link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff
13: ens4f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond1 state UP qlen 1000
link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff
14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff
inet 111.111.111.10/24 brd 45.112.1.255 scope global bond0
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:9238/64 scope link
valid_lft forever preferred_lft forever
15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff
inet 172.16.88.10/24 brd 172.16.88.255 scope global bond1
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:9239/64 scope link
valid_lft forever preferred_lft forever
16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.10/24 brd 192.10.5.255 scope global bond2
valid_lft forever preferred_lft forever
inet6 fe80::3ea8:2aff:fe14:3c0/64 scope link
valid_lft forever preferred_lft forever
[root@node1 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
17
2.2.2. Network
네트워크 인터페이스 link status 및 ip address 확인 – node2
[root@node2 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond2 state UP qlen 1000
link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff
3: eno49: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond2 state UP qlen 1000
link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff
4: ens1f0: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master
bond0 state DOWN qlen 1000
link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff
5: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:13:49:35 brd ff:ff:ff:ff:ff:ff
6: eno50: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5c:b9:01:89:62:8d brd ff:ff:ff:ff:ff:ff
7: eno51: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 5c:b9:01:89:62:8e brd ff:ff:ff:ff:ff:ff
8: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:13:49:36 brd ff:ff:ff:ff:ff:ff
9: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether 3c:a8:2a:13:49:37 brd ff:ff:ff:ff:ff:ff
10: eno52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen
1000
link/ether 5c:b9:01:89:62:8f brd ff:ff:ff:ff:ff:ff
inet 10.0.0.120/24 brd 10.146.31.255 scope global eno52
valid_lft forever preferred_lft forever
inet6 fe80::5eb9:1ff:fe89:628f/64 scope link
valid_lft forever preferred_lft forever
11: ens1f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond1 state UP qlen 1000
link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff
12: ens4f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond0 state UP qlen 1000
link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff
13: ens4f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master
bond1 state UP qlen 1000
link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff
14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff
inet 111.111.111.20/24 brd 45.112.1.255 scope global bond0
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:8aa0/64 scope link
valid_lft forever preferred_lft forever
15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff
inet 172.16.88.20/24 brd 172.16.88.255 scope global bond1
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:8aa1/64 scope link
valid_lft forever preferred_lft forever
16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UP
link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.20/24 brd 192.10.5.255 scope global bond2
valid_lft forever preferred_lft forever
inet6 fe80::3ea8:2aff:fe13:4934/64 scope link
valid_lft forever preferred_lft forever
[root@node2 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
18
2.2.2. Network
routing table 확인
[root@node1 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 111.111.111.1 0.0.0.0 UG 0 0 0 bond0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno52
111.111.111.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
172.16.88.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 bond2
[root@node1 ~]#
[root@node2 ~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 111.111.111.1 0.0.0.0 UG 0 0 0 bond0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno52
111.111.111.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0
172.16.88.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1
192.168.0..0 0.0.0.0 255.255.255.0 U 0 0 0 bond2
[root@node2 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
19
2.2.3. Shared volume
device-mapper multipath 구성 및 확인 – node1
[root@node1 ~]# multipath -ll
360060e8005bd75000000bd750000005f dm-12 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:8 sdl 8:176 active ready running
`- 10:0:0:8 sdw 65:96 active ready running
360060e8005bd75000000bd750000005e dm-11 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:7 sdk 8:160 active ready running
`- 10:0:0:7 sdv 65:80 active ready running
360060e8005bd75000000bd750000005d dm-8 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:6 sdj 8:144 active ready running
`- 10:0:0:6 sdu 65:64 active ready running
360060e8005bd75000000bd750000005c dm-5 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:5 sdi 8:128 active ready running
`- 10:0:0:5 sdt 65:48 active ready running
360060e8005bd75000000bd750000005b dm-2 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:4 sdh 8:112 active ready running
`- 10:0:0:4 sds 65:32 active ready running
360060e8005bd75000000bd750000005a dm-10 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:3 sdg 8:96 active ready running
`- 10:0:0:3 sdr 65:16 active ready running
360060e8005bd75000000bd7500000059 dm-3 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:2 sdf 8:80 active ready running
`- 10:0:0:2 sdq 65:0 active ready running
360060e8005bd75000000bd7500000061 dm-4 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:10 sdn 8:208 active ready running
`- 10:0:0:10 sdy 65:128 active ready running
360060e8005bd75000000bd7500000058 dm-9 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:1 sde 8:64 active ready running
`- 10:0:0:1 sdp 8:240 active ready running
360060e8005bd75000000bd7500000060 dm-6 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:9 sdm 8:192 active ready running
`- 10:0:0:9 sdx 65:112 active ready running
360060e8005bd75000000bd7500000057 dm-7 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:0 sdd 8:48 active ready running
`- 10:0:0:0 sdo 8:224 active ready running
[root@node1 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
20
2.2.3. Shared volume
device-mapper multipath 구성 및 확인 – node2
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
[root@node2 ~]# multipath -ll
360060e8005bd75000000bd750000005f dm-12 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:8 sdl 8:176 active ready running
`- 10:0:0:8 sdw 65:96 active ready running
360060e8005bd75000000bd750000005e dm-11 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:7 sdk 8:160 active ready running
`- 10:0:0:7 sdv 65:80 active ready running
360060e8005bd75000000bd750000005d dm-8 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:6 sdj 8:144 active ready running
`- 10:0:0:6 sdu 65:64 active ready running
360060e8005bd75000000bd750000005c dm-5 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:5 sdi 8:128 active ready running
`- 10:0:0:5 sdt 65:48 active ready running
360060e8005bd75000000bd750000005b dm-2 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:4 sdh 8:112 active ready running
`- 10:0:0:4 sds 65:32 active ready running
360060e8005bd75000000bd750000005a dm-10 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:3 sdg 8:96 active ready running
`- 10:0:0:3 sdr 65:16 active ready running
360060e8005bd75000000bd7500000059 dm-3 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:2 sdf 8:80 active ready running
`- 10:0:0:2 sdq 65:0 active ready running
360060e8005bd75000000bd7500000061 dm-4 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:10 sdn 8:208 active ready running
`- 10:0:0:10 sdy 65:128 active ready running
360060e8005bd75000000bd7500000058 dm-9 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:1 sde 8:64 active ready running
`- 10:0:0:1 sdp 8:240 active ready running
360060e8005bd75000000bd7500000060 dm-6 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:9 sdm 8:192 active ready running
`- 10:0:0:9 sdx 65:112 active ready running
360060e8005bd75000000bd7500000057 dm-7 HITACHI ,OPEN-V
size=14G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=1 status=active
|- 6:0:0:0 sdd 8:48 active ready running
`- 10:0:0:0 sdo 8:224 active ready running
[root@node2 ~]#
21
2.2.3. Shared volume
[root@node1 ~]# egrep -v '^$|^#' /etc/multipath.conf
defaults {
user_friendly_names no
find_multipaths yes
}
devices {
device {
vendor "HITACHI "
product "OPEN-V "
path_grouping_policy multibus
path_checker readsector0
path_selector "round-robin 0"
hardware_handler "0"
failback 15
rr_weight priorities
no_path_retry queue
}
}
[root@node1 ~]#
[root@node2 ~]# egrep -v '^$|^#' /etc/multipath.conf
defaults {
user_friendly_names no
find_multipaths yes
}
devices {
device {
vendor "HITACHI "
product "OPEN-V "
path_grouping_policy multibus
path_checker readsector0
path_selector "round-robin 0"
hardware_handler "0"
failback 15
rr_weight priorities
no_path_retry queue
}
}
[root@node2 ~]#
[root@node1 ~]# systemctl list-unit-files | grep multipathd
multipathd.service enabled
[root@node1 ~]#
[root@node2-HB ~]# systemctl list-unit-files | grep multipathd
multipathd.service enabled
[root@node2 ~]#
device-mapper multipath 구성 및 확인
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
22
2.2.3. Shared volume
LVM 확인
[root@node1 ~]# lvs
LV VG Attr LSize Pool Origin
Data% Meta% Move Log Cpy%Sync Convert
home vg00 -wi-ao---- 20.00g
root vg00 -wi-ao---- 30.00g
swap vg00 -wi-ao---- 16.00g
tmp vg00 -wi-ao---- 5.00g
var vg00 -wi-ao---- 20.00g
var_crash vg00 -wi-ao---- 149.86g
data4 vgha01 -wi-a----- 10.00g
data2 vgha01 -wi-a----- 10.00g
data3 vgha01 -wi-a----- 20.00g
data1 vgha01 -wi-a----- 100.00g
[root@node1 ~]#
[root@node2 ~]# lvs
LV VG Attr LSize Pool Origin
Data% Meta% Move Log Cpy%Sync Convert
home vg00 -wi-ao---- 20.00g
root vg00 -wi-ao---- 30.00g
swap vg00 -wi-ao---- 16.00g
tmp vg00 -wi-ao---- 5.00g
var vg00 -wi-ao---- 20.00g
var_crash vg00 -wi-ao---- 149.86g
data4 vgha01 -wi-a----- 10.00g
data2 vgha01 -wi-a----- 10.00g
data3 vgha01 -wi-a----- 20.00g
data1 vgha01 -wi-a----- 100.00g
[root@node2 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
lvs 커맨드 출력내용 중 클러스터 리소스로 사용되는 논리볼륨의 Attr 필드에 “a(activate)” tag가
존재하는지 확인합니다. 이 tag가 존재하여야 논리볼륨에 액세스 가능합니다.
23
2.2.4. NTP
시각 동기화 상태 확인
[root@node1 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*send.mx.cdnetwo 133.100.8.2 2 u 686 1024 377 4.666 -0.279 1.777
+dadns.cdnetwork 133.100.8.2 2 u 529 1024 377 3.465 0.770 2.449
[root@node1 ~]#
[root@node2 ~]# ntpq -p
remote refid st t when poll reach delay offset jitter
==============================================================================
*send.mx.cdnetwo 133.100.8.2 2 u 686 1024 377 4.666 -0.279 1.777
+dadns.cdnetwork 133.100.8.2 2 u 529 1024 377 3.465 0.770 2.449
[root@node2 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
24
2.2.5. Firewall
방화벽 비활성화 여부 확인
[root@node1 ~]# 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@node1 ~]# systemctl list-unit-files | grep firewalld
firewalld.service disabled
[root@node1 ~]#
2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
[root@node2 ~]# 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@node2 ~]# systemctl list-unit-files | grep firewalld
firewalld.service disabled
[root@node2 ~]#
25
2.2.6. STONITH(fencing device)
node1에서 fence_ipmilan 도구로 fencing device(HP iLO4)에 인증 테스트
2.2. Cluster Infrastructure 점검
[root@node1 ~]# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
[root@node1 ~]#
[root@node1 ~]# fence_ipmilan -P -a 10.0.0.20 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.20 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
[root@node1 ~]#
hostname : node1 hostname : node2
ipmilan auth requestipmilan auth request
2. Cluster 운영 기본
26
2.2.6. STONITH(fencing device)
node2에서 fence_ipmilan 도구로 fencing device(HP iLO4)에 인증 테스트
2.2. Cluster Infrastructure 점검
[root@node2 ~]# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
[root@node2 ~]#
[root@node2 ~]# fence_ipmilan -P -a 10.0.0.20 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.20 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
[root@node2 ~]#
hostname : node1 hostname : node2
ipmilan auth requestipmilan auth request
2. Cluster 운영 기본
27
2.3.1. pcsd 서비스 시작 및 검증
[root@node1 ~]# systemctl start pcsd
[root@node1 ~]# systemctl status pcsd
pcsd.service - PCS GUI and remote configuration interface
Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled)
Active: active (running) since Fri 2015-11-20 23:34:22 KST; 49s ago
Main PID: 638 (pcsd)
CGroup: /system.slice/pcsd.service
???€638 /bin/sh /usr/lib/pcsd/pcsd start
???€662 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb
???€663 /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb
Nov 20 23:34:22 node2.cluster.com systemd[1]: Started PCS GUI and remote configuration interface.
[root@node1 ~]#
Pacemaker를 컨트롤하기 위해 사용되는 pcs 커맨드라인 인터페이스를 사용하기 위해서는 클러스터
노드에 pcsd 서비스가 active상태여야 합니다.
[root@node1 ~]# systemctl list-unit-files | grep pcsd
pcsd.service enabled
[root@node1 ~]#
편의를 위해 시스템 시작 시 pcsd를 자동으로 activate하는 설정이 되어 있는지 확인합니다. Pacemaker
패키지 설치 당시 default로 enable 세팅되어 있습니다.
2.3. Cluster 시작 및 검증 2. Cluster 운영 기본
28
pcsd 서비스가 active 상태라면 이제 pcs 커맨드라인 인터페이스를 사용할 수 있습니다.
클러스터 노드가 모두 reboot된 상태에서 Pacemaker 클러스터 구동을 위한 명령어는 아래와 같습니다.
아무 노드에서 1회 실행합니다.
2.3.2. cluster 시작 및 검증
# pcs cluster start --all
특정 클러스터 노드만 reboot된 상태에서 해당 노드를 Pacemaker 클러스터에 join 시키기 위한
명령어는 아래와 같습니다. 아무 노드에서 1회 실행합니다.
# pcs cluster start <node>
2.3. Cluster 시작 및 검증 2. Cluster 운영 기본
29
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Online: [ node1-HB node2-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node2-HB
node2-CO (stonith:fence_ilo4): Started node2-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
2.3.3. cluster 및 resource 구동 상태 확인
cluster를 구동하였으면 cluster의 상태를 확인합니다.
# pcs status
2. Cluster 운영 기본2.3. Cluster 시작 및 검증
Online: [ node1-HB node2-HB ]
두 노드의 corosync, pacemaker
daemon이 모두 active 상태임을 의미하며
이 daemon들이 active되지 않으면
클러스터를 운영할 수 없습니다.
PCSD Status:
node1-HB: Online
node2-HB: Online
pcsd daemon이 active
상태임을 의미하며 pcs
command-line
인터페이스를 사용
가능합니다. Pacemaker
클러스터를 제어하기 위해
가장 먼저 선행되어야 할
조건입니다.
30
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Online: [ node1-HB node2-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node2-HB
node2-CO (stonith:fence_ilo4): Started node2-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
2.3.3. cluster 및 resource 구동 상태 확인
cluster를 구동하였으면 cluster의 상태를 확인합니다.
# pcs status
2. Cluster 운영 기본2.3. Cluster 시작 및 검증
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
① : daemon이 현재 active
② : 시스템 시작 시 disabled
(# systemctl disable <service name>)
① ②
31
active node에서 shared volume의 마운트 상태 및 VIP(Virtual IP), 어플리케이션 프로세스의 구동
상태를 확인합니다.
[root@node1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg00-root 30G 8.8G 22G 30% /
devtmpfs 63G 0 63G 0% /dev
tmpfs 63G 39M 63G 1% /dev/shm
tmpfs 63G 66M 63G 1% /run
tmpfs 63G 0 63G 0% /sys/fs/cgroup
(중략)
/dev/mapper/vg00-var_crash 150G 33M 150G 1% /var/crash
/dev/mapper/vgha01-data1 100G 5.8G 95G 6% /data1
/dev/mapper/vgha01-data2 10G 33M 10G 1% /data2
/dev/mapper/vgha01-data3 20G 33M 20G 1% /data3
/dev/mapper/vgha01-data4 10G 33M 10G 1% /data4
[root@node1 ~]#
[root@node1 ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
(중략)
14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP
link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff
inet 111.111.111.10/24 brd 45.112.1.255 scope global bond0
valid_lft forever preferred_lft forever
inet 111.111.111.30/24 brd 45.112.1.255 scope global secondary bond0
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:9238/64 scope link
valid_lft forever preferred_lft forever
15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP
link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff
inet 172.16.88.71/24 brd 172.16.88.255 scope global bond1
valid_lft forever preferred_lft forever
inet6 fe80::211:aff:fe68:9239/64 scope link
valid_lft forever preferred_lft forever
16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP
link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.10/24 brd 192.10.5.255 scope global bond2
valid_lft forever preferred_lft forever
inet6 fe80::3ea8:2aff:fe14:3c0/64 scope link
valid_lft forever preferred_lft forever
[root@node1 ~]#
[root@node1 ~]# ps auxww
2. Cluster 운영 기본2.3. Cluster 시작 및 검증
2.3.3. cluster 및 resource 구동 상태 확인
32
RRP(Redundant Ring Protocol)의 상태를 확인합니다. bond0 인터페이스에 할당된 111.111.111.0/24
네트워크를 Redundant Ring Protocol용 네트워크로 구성하였습니다.
# corosync-cfgtool -s
2. Cluster 운영 기본2.3. Cluster 시작 및 검증
2.3.3. cluster 및 resource 구동 상태 확인
[root@node1 ~]# corosync-cfgtool -s
Printing ring status.
Local node ID 1
RING ID 0
id = 192.168.0.10
status = ring 0 active with no faults
RING ID 1
id = 111.111.111.10
status = ring 1 active with no faults
[root@node1 ~]#
RING ID 0 : heartbeat network
192.168.0.0/24
RING ID 1 : service network
111.111.111.0/24
node1 node2
33
2.4. The pcs Command Line Interface 기본
2.4.1. Syntax
pcs 커맨드라인 syntax는 아래와 같습니다.
pcs <parameters>
pcs 커맨드와 함께 사용되는 parameter는 많은 level을 갖고 있습니다. 아래의 syntax를 적용할 수
있습니다.
pcs <parameter1> <parameter2>
pcs 커맨드라인 help는 문서화가 잘 되어 있고 매우 유용합니다. depth에 관해서는 모든 level에서 pcs
커맨드 사용에 관한 도움을 받을 수 있습니다.
pcs <parameter1> <parameter2> --help
2. Cluster 운영 기본
# pcs resource –h
Usage: pcs resource [commands]...
Manage pacemaker resources
Commands:
show [resource id] [--all]
Show all currently configured resources or if a resource is specified
show the options for the configured resource. If --all is specified
resource options will be displayed
start <resource id>
Start resource specified by resource_id
34
2.4. The pcs Command Line Interface 기본
2.4.2. Parameters
pcs 커맨드라인 도구는 아래의 액션들이 이루어지도록 합니다.
cluster
cluster 파라미터는 클러스터에서 사용을 원하는 노드를 인증하는 것을 허용합니다. 또한 클러스터 timeout,
redundant ring protocols, Quorum 옵션 구성을 허용합니다.
resource
resource 파라미터는 신규 클러스터 리소스를 추가하는 것을 허용합니다. 또한 클러스터 리소스를 클러스터
범위 내에서 enabling, disabling, moving하는 것을 허용합니다.
stonith
stonith 파라미터는 클러스터에서 사용되기 위한 fencing 장치 구성을 가능하게 하고 fence 장치와 함께
클러스터 노드를 관리합니다.
constraints
constraints 파라미터는 클러스터 리소스를 그룹화하는 것을 가능하게 합니다; 클러스터 리소스, start와
stop 순서, 선호되는 리소스 위치(노드)를 구성할 수 있습니다.
2. Cluster 운영 기본
35
2.4. The pcs Command Line Interface 기본
2.4.2. Parameters
property
property 파라미터는 Quorum 손실, STONITH가 없는 등의 특수한 상황에서의 클러스터 동작을 구성하도록
허용합니다.
status
status 파라미터는 현재의 클러스터와 리소스 상태를 보여 줍니다.
config
config 파라미터는 사용자 친화적인 형태로 완전한 클러스터 구성을 출력합니다.
2. Cluster 운영 기본
36
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Online: [ node1-HB node2-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node2-HB
node2-CO (stonith:fence_ilo4): Started node2-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
2.5.1. cluster 및 resource 구동 상태 확인
2. Cluster 운영 기본2.5. 자주 사용되는 pcs Command
# pcs status
37
2.5.2. cluster 구성 정보 상세 확인
2. Cluster 운영 기본2.5. 자주 사용되는 pcs Command
[root@node1 ~]# cat /var/lib/pacemaker/cib/cib.xml
<cib crm_feature_set="3.0.10" validate-with="pacemaker-2.3" epoch="212" num_updates="0" admin_epoch="0" cib-last-written="Mon Dec 7
15:43:37 2015" update-origin="node1-HB" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="2">
<configuration>
<crm_config>
<cluster_property_set id="cib-bootstrap-options">
<nvpair id="cib-bootstrap-options-have-watchdog" name="have-watchdog" value="false"/>
<nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.13-a14efad"/>
<nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/>
<nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="cluster"/>
<nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/>
<nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="1000"/>
</cluster_property_set>
</crm_config>
<nodes>
<node id="1" uname="node1-HB"/>
<node id="2" uname="node2-HB">
<instance_attributes id="nodes-2"/>
</node>
</nodes>
<resources>
(이하 생략)
# cat /var/lib/pacemaker/cib/cib.xml
클러스터 구성 변경 시 /var/lib/pacemaker/cib/cib.xml 파일을
직접 편집하지 마십시오. 오직 pcs 커맨드라인 인터페이스를
통해서 클러스터 구성을 변경해야 합니다.
38
2.5. 자주 사용되는 pcs Command
2.5.3. 모든 resource를 다른 node로 수동 move하기
2. Cluster 운영 기본
# pcs cluster standby <active node>
standby mode는 모든 resource를 다른 node로 move하는 데에 사용될 수 있습니다. 현재 모든
resource들이 active 중인 node는 standby mode로 전환 시 모든 resource들이 다른 node로 move되며
standby mode로 전환됩니다.
standby mode 상태인 original active node는 unstandby mode로 설정하여 원상 복구합니다.
# pcs cluster unstandby <original active node>
39
2.5. 자주 사용되는 pcs Command
2.5.4. 단일 resource를 다른 node로 수동 move하기
2. Cluster 운영 기본
Rgmanager 기반 RHEL6 Cluster와는 달리 Pacemaker 기반 RHEL7 클러스터는 단일 resource를 다른
노드로 move 시 약간의 주의가 필요합니다. pcs의 파라미터 중 resource constraints에 대한 이해가
필요합니다.
# pcs resource move <resource id> [destination node]
resource move 시엔 주로 location constraints만을 주의하면 됩니다.
move 대상으로 resource group 내 아무 resource id를 명시합니다. resource group id를 명시할 수
있는 방법은 제공되지 않습니다. 하나의 resource id만을 명시하여 move하면 resource group의
모든 resource가 move됩니다.
location constraints – resource를 실행할 수 있는 node를 결정
order constraints - resource를 실행할 곳에 실행 순서를 결정
colocation constraints – 다른 resource와 연계하여 어디에 위치시킬 것인지 결정
constraints 종류
resource를 move 시 주의사항
40
2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본
resource를 다른 클러스터 노드로 move하면 새로운 location constraints가 해당 resource에 자동
생성되며 이는 이후의 manual move 및 node fail로 인한 failover/failback에 영향을 주므로 삭제할
필요가 있습니다.
move 시 destination node 명시 유무에 따라 location constraints score 변화에 차이가 있습니다.
☞ Step 1. move 대상 resource에 “INFINITY”또는 “-INFINITY” score를 갖는 location
constraints가 있는지 확인하여 있다면 해당 location constraints 삭제
2.5.4. 단일 resource를 다른 node로 수동 move하기
41
2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본
[root@node1 ~]# pcs resource move data1 node2-HB
[root@node1 ~]# pcs constraint --full
Location Constraints:
Resource: APP_SCRIPT
Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB)
Resource: VirtualIP
Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB)
Resource: data1
Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB)
Enabled on: node1-HB (score:INFINITY) (role: Started) (id:cli-prefer-data1)
Resource: data2
Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB)
Resource: data3
Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB)
Resource: data4
Enabled on: node1-HB (score:100) (id:location-data4-on-node1-HB)
Ordering Constraints:
Colocation Constraints:
[root@node1 ~]#
▼ 2노드 클러스터에서 destination node를 명시하고 move 시 추가되는 location constraints
node1-HB -> node2-HB 로 manual move 후 role:Started가 INFINITY 스코어로 node2-HB 노드에
Enabled 되었다는 의미로 이 constraint를 그대로 두면 다음에 해당 resource를 같은 방법으로 다른
노드에 manual move하기는 자유로우나 resource group 내 다른 resource를 manual move 시 이
constraint의 영향 때문에 manual move가 지속적으로 방지됩니다. resource를 manual move하는 데에
영향을 주는 constraint이므로 삭제를 권장합니다.
2.5.4. 단일 resource를 다른 node로 수동 move하기
42
2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본
[root@node1 ~]# pcs resource move data1
[root@node1 ~]# pcs constraint --full
Location Constraints:
Resource: APP_SCRIPT
Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB)
Resource: VirtualIP
Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB)
Resource: data1
Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB)
Disabled on: node1-HB (score:-INFINITY) (role: Started) (id:cli-ban-data1-on-node1-HB)
Resource: data2
Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB)
Resource: data3
Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB)
Resource: data4
Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB)
Ordering Constraints:
Colocation Constraints:
[root@node1 ~]#
▼ 2노드 클러스터에서 destination node를 명시하지 않고 move 시 추가되는 location constraints
node1-HB -> node2-HB 로 manual move 후 role:Started가 -INFINITY 스코어로 node1-HB 노드에
Disabled 되었다는 의미로 이 constraint를 그대로 두면 다음에 해당 resource를 같은 방법으로 이전의
active 노드(node1-HB)에 manual move 및 failback이 방지되며 resource group 내 다른 resource를
manual move 시 이 constraint의 score 영향 때문에 manual move가 지속적으로 방지됩니다.
resource를 manual move하는 데에 영향을 주는 constraint이므로 삭제를 권장합니다.
2.5.4. 단일 resource를 다른 node로 수동 move하기
43
2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본
[root@node1 ~]# pcs constraint --full
Location Constraints:
Resource: APP_SCRIPT
Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB)
Resource: VirtualIP
Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB)
Resource: data1
Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB)
Disabled on: node1-HB (score:-INFINITY) (role: Started) (id:cli-ban-data1-on-node1-HB)
Resource: data2
Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB)
Resource: data3
Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB)
Resource: data4
Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB)
Ordering Constraints:
Colocation Constraints:
[root@node1 ~]#
resource를 manual move하기 전 삭제하고자 하는 location constraints id를 확인합니다.
해당 location constraints id를 삭제합니다.
[root@node1 ~]# pcs constraint remove cli-ban-data1-on-node1-HB
이제 resource를 다른 노드로 자유롭게 move할 수 있습니다.
또는 pcs resource clear 커맨드를 사용합니다(권장).
[root@node1 ~]# pcs resource clear data1
2.5.4. 단일 resource를 다른 node로 수동 move하기
44
2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본
☞ Step 2. 원하는 노드에 resource를 manual move
☞ Step 3. original active node에 resource를 다시 manual move하고 싶다면 해당 resource의
constraint를 확인(1의 과정 반복)하고 clear
[root@node1 ~]# pcs resource move <resource id> [destination node]
[root@node1 ~]# pcs constraint --full
[root@node1 ~]# pcs resource clear <resource id>
☞ Step 4. original active node에 resource를 manual move
[root@node1 ~]# pcs resource move <resource id> [destination node]
2.5.4. 단일 resource를 다른 node로 수동 move하기
단일 resource가 아닌 모든 resource를 move 시 pcs cluster standby 커맨드 사용을 권장합니다.
pcs resource move 커맨드에 의해 생성된 constraints 제거 시 pcs resource clear 를 사용
권장합니다.
45
3. Cluster 운영 실무
3.1. 모니터링 및 유지보수
3.2. 장애처리
46
3.1.1. 기본 모니터링
3. Cluster 운영 실무3.1. 모니터링 및 유지보수
# pcs status
형식)
목적 RHEL7 클러스터 인프라 구성 상태를 정확히 확인하고 주기적으로 체크해야 할 사항을 리스트
대상 RHEL7 클러스터 인프라 전체
조치 개요 리소스 정보, Stonith 정보 등을 주기적으로 확인
조치 상세 클러스터 정보 확인에는 pcs status 를 이용합니다.
47
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Online: [ node1-HB node2-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node2-HB
node2-CO (stonith:fence_ilo4): Started node2-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
3. Cluster 운영 실무3.1. 모니터링 및 유지보수
3.1.1. 기본 모니터링
48
3.1.2. HA 노드 하드웨어 유지보수
3.1. 모니터링 및 유지보수 3. Cluster 운영 실무
목적
클러스터 노드의 하드웨어 펌웨어나 커널/보안 업데이트 시 필요한 노드 reboot 시 서비스 downtime 최
소화
대상 RHEL7 클러스터의 모든 노드
조치 개요 pcs 커맨드라인의 standby/unstandby mode를 이용
조치 상세
Pacemaker는 중요 클러스터 노드를 standby mode로 전환하는 것을 허용합니다. 클러스터 노드가
standby mode가 되면 그 노드는 클러스터 리소스와 서비스를 더 이상 제공할 수 없습니다. standby
mode는 클러스터 노드의 유지보수 동작에 유용합니다.
# pcs cluster standby [<node>] | --all
형식)
# pcs cluster unstandby [<node>] | --all
49
3.1.2. HA 노드 하드웨어 유지보수
3.1. 모니터링 및 유지보수 3. Cluster 운영 실무
Active node Standby node Active node Standby node
Active node
Active nodeStandby node
Active node Standby node
Active node
# pcs cluster standby node2-HB
# pcs cluster start node2-HB
# pcs cluster unstandby node2-HB
# pcs cluster standby node1-HB
# shutdown -r now
# shutdown -r now # pcs cluster start node1-HB
standby mode
resources movement
범
례
50
3.1.2. HA 노드 하드웨어 유지보수
3.1. 모니터링 및 유지보수 3. Cluster 운영 실무
Active nodeStandby nodeActive node Standby node
Active nodeStandby node Active nodeStandby node
# pcs cluster standby node2-HB
Active node Standby node
# pcs cluster unstandby node1-HB
# pcs cluster unstandby node2-HB
standby mode
resources movement
범
례
51
3. Cluster 운영 실무
목적
active node가 fail되어 모든 resource가 original standby node로 failover되어 운영 중인 상태에서
current active node fail 시 resource가 failback되지 않도록 함, original active node로는 오직 manual
failback만이 가능하도록 함
대상 failover되었을 때의 original active node에 설정
조치 개요
original standby node에 resource가 failover되어 있는 상태에서 pcs constraint 커맨드로 original active
node에 –INFINITY 스코어의 location constraint를 설정합니다.
조치 상세
original standby node에 resource가 failover되어 있는 상태에서 original active node를 클러스터에 re-
join 시킨 후 모든 resource에 대해 original active node에 resource move를 방지하는 constraint 설정을
합니다.
# pcs constraint location add <id> <resource id> <original active node> -INFINITY
이제 original standby node를 fail시키면 모든 resource는 failback되지 않고 Stopped status를 유지합니
다. fail시킨 original standby node를 클러스터에 re-join시키면 모든 resource가 auto start됩니다.
※ resource-stickiness value가 INFINITY가 아니되, location constraints score보다 높도록 사전 설정되
어 있는 시스템에만 위 조치 방법이 유효합니다.
https://access.redhat.com/solutions/739813
# pcs constraint location add <id> <resource id> <original active node> -INFINITY
형식)
3.1. 모니터링 및 유지보수
3.1.3. never fallback 설정 및 운영
52
3.1. 모니터링 및 유지보수 3. Cluster 운영 실무
Active node Standby node Active node
# pcs constraint location add location-data1-on-node1-HB data1 node1-HB -INFINITY
# pcs constraint location add location-data2-on-node1-HB data2 node1-HB -INFINITY
# pcs constraint location add location-data3-on-node1-HB data3 node1-HB -INFINITY
# pcs constraint location add location-data4-on-node1-HB data4 node1-HB -INFINITY
# pcs constraint location add location-VirtualIP-on-node1-HB VirtualIP node1-HB -INFINITY
Active nodeStandby nodeStandby node
Stopped
# pcs cluster start node1-HB
3.1.3. never fallback 설정 및 운영 standby mode
resources movement
범
례
node failure
53
3.1. 모니터링 및 유지보수 3. Cluster 운영 실무
Standby node
Stopped
# pcs cluster start node2-HB
Active nodeStandby node
Active nodeStandby node
Active nodeStandby node
# pcs cluster standby node2-HB
Active node Standby node
Active node Standby node# pcs cluster unstandby node2-HB
# pcs constraint location remove location-data1-on-node1-HB
# pcs constraint location remove location-data2-on-node1-HB
# pcs constraint location remove location-data3-on-node1-HB
# pcs constraint location remove location-data4-on-node1-HB
# pcs constraint location remove location-VirtualIP-on-node1-HB
3.1.3. never fallback 설정 및 운영
원복 완료
standby mode
resources movement
범
례
node failure
54
3. Cluster 운영 실무3.2. 장애 처리
3.2.1. on-fail=ignore 옵션과 함께 생성한 resource가 fail되었을 시 복구
목적
on-fail=ignore 옵션과 함께 생성한 resource가 fail되었을 시 해당 resource를 복구한 후 클러스터에 올바
르게 enable시키기
대상 RHEL7 클러스터의 모든 resource (파일시스템, VIP, 어플리케이션)
조치 개요 resource 복구 후 crm_resource –C(clear) 커맨드 이용하여 error message를 clear
조치 상세
파일시스템 / VIP / 어플리케이션이 fail되었을 시 해당 resource의 fail을 ignore하도록 설정한
Pacemaker 클러스터에서는 pcs status로 확인 시 “Failed actions:” 섹션에 fail 사유가 출력됩니다. 해
당 resource를 복구한 뒤 crm_resource –C(clear) 커맨드 이용하여 error messages를 clear합니다.
파일시스템 복구 : mount <device name> <mount point>
VIP 복구 : ip addr add <ip address/netmask> dev <interface>
어플리케이션(LSB Compliant Script) 복구 : /etc/init.d/<script name> start
이후 아래 커맨드로 error messages를 clear
# crm_resource –C
# crm_resource –C
형식)
# vi /var/lib/pacemaker/cib/cib.xml
※ resource의 on-fail="ignore" 옵션 설정 유무 확인 시 /var/lib/pacemaker/cib/cib.xml 참고
55
3. Cluster 운영 실무
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015
Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Online: [ node1-HB node2-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB (failure ignored)
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node2-HB
node2-CO (stonith:fence_ilo4): Started node2-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
문제 해결 : fail된 파일시스템의 문제를 해결하였으면 정상적으로 mount되어 있는
상태에서 위의 에러메시지를 clear합니다.
# crm_resource –C
만약 fail된 파일시스템 resource 문제를 해결하지 않은 상태에서 위 커맨드를 실행하면
해당 resource는 물론 resource group 내 다른 리소스들까지 모두 fail되므로 주의합니다.
3.2. 장애 처리
3.2.1. 리소스가 fail되었을 경우
문제 설명 : “data1_monitor_60000”의 의미는 resource id가 data1인 파일시스템
리소스가 fail(여기서는 강제 umount하여 임의로 fail 유발)되어 나타난 에러메시지로
60000은 “interval 60 seconds(default)”를 의미합니다.
“failure ignored”는 “ on-fail=ignore (resource fail이 발생하더라도 failover를
일으키지 않고 무시하도록 하는 설정)”옵션을 주어 생성한 리소스에 실제 fail이
발생했을 경우 나타나는 메시지입니다.
56
3. Cluster 운영 실무3.2. 장애 처리
목적 offline status로 확인되는 노드를 클러스터에 re-join시켜 서비스 고가용성을 확보
대상 RHEL7 클러스터의 모든 노드
조치 개요
클러스터 노드가 fail되어 fencing된 후 pcs status 커맨드로 offline status 확인될 시 해당 노드의 (물리적)
문제를 해결하고 클러스터에 re-join시킨다
조치 상세
resource level의 장애가 아닌 cluster level의 장애가 노드에 발생하면 해당 노드는 STONITH 장치에 의
해 fencing(default: reboot)됩니다. 해당 노드의 (물리적) 문제를 해결한 뒤 클러스터에 re-join시키기 위해
pcs 커맨드라인의 cluster 파라미터를 이용합니다.
# pcs cluster start <node> | --all
형식)
3.2.2. offline 상태의 node를 클러스터에 re-join
57
3. Cluster 운영 실무
[root@node1 ~]# pcs status
Cluster name: cluster
Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB
Stack: corosync
Current DC: node1-HB (version 1.1.13-a14efad) - partition with quorum
2 nodes and 8 resources configured
Node node2-HB (2): OFFLINE
Online: [ node1-HB ]
Full list of resources:
Resource Group: clustergroup
data1 (ocf::heartbeat:Filesystem): Started node1-HB (failure ignored)
data2 (ocf::heartbeat:Filesystem): Started node1-HB
data3 (ocf::heartbeat:Filesystem): Started node1-HB
data4 (ocf::heartbeat:Filesystem): Started node1-HB
VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB
APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB
node1-CO (stonith:fence_ilo4): Started node1-HB
node2-CO (stonith:fence_ilo4): Started node1-HB
PCSD Status:
node1-HB: Online
node2-HB: Online
Daemon Status:
corosync: active/disabled
pacemaker: active/disabled
pcsd: active/enabled
[root@node1 ~]#
node2가 어떤 원인으로 인해 fail되어 OFFLINE 상태로 있습니다.
원인 분석 및 조치 후 클러스터 노드에 re-join 시키기 위해서 아래와 같이
조치합니다.
# pcs cluster start node2-HB
3.2. 장애 처리
3.2.2. offline 상태의 node를 클러스터에 re-join
58
4. 부록
4.1. rgmanager 클러스터 vs pacemaker 클러스터
4.2. 구축용 커맨드 모음
4.3. 운영용 커맨드 모음
4.4. Bug Errata
59
4.1. rgmanager 클러스터 vs pacemaker 클러스터 4. 부록
Configuration
Component
rgmanager Pacemaker
Cluster
configuration file
각 노드의 클러스터 구성 파일은
/etc/cluster/cluster.conf이며 이는 필요 시 직접
편집될 수 있습니다. 다른 방법을 원하면 클러
스터 구성을 정의하기 위해 luci 또는 ccs 인터
페이스를 사용하십시오.
Cluster와 Pacemaker 구성 파일은
/etc/corosync/corosync.conf 와
/var/lib/pacemaker/cib/cib.xml 입니다. 이 파일을
직접 편집하지 마십시오; 대신 pcs 또는 pcsd 인
터페이스를 사용하십시오.
Network setup 클러스터를 구성하기 전에 IP 주소와 SSH를 구
성하십시오.
클러스터를 구성하기 전에 IP 주소와 SSH를 구성
하십시오.
Cluster
Configuration
Tools
luci, ccs 커맨드, cluster.conf 파일 manual 편
집
pcs 또는 pcsd
Installation rgmanager 설치(ricci, luci, resource, fencing
agents에 의존성을 가짐). 필요 시 lvm2-cluster
와 gfs2-utils 설치
pcs와 fencing agents 설치. 필요 시 lvm2-cluster
와 gfs2-utils 설치
출처
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Reference/ap-ha-rhel6-rhel7-HAAR.html
60
4. 부록
Configuration
Component
rgmanager Pacemaker
Starting cluster
services
아래의 과정대로 클러스터 서비스 시작과 활성
화
1. cman, rgmanager 시작. 필요 시 clvmd와
gfs2 시작합니다.
2. luci 인터페이스 사용 시 ricci 시작하고 luci
시작합니다.
3. chkconfig on 실행하여 각 노드 실행 시에 시
작되도록 합니다.
선택사항으로 cluster service를 시작하고 활성
화를 위해 ccs --start를 실행할 수 있습니다
아래의 과정대로 클러스터 서비스 시작과 활성화
1. 모든 노드에서 systemctl start pcsd.service 실
행한 뒤 각 노드 실행 시에 시작되도록 하기 위해
systemctl enable pcsd.service 실행합니다.
2. corosync와 pacamaker를 시작하기 위해 클러
스터의 한 노드에서 pcs cluster start --all 실행합
니다.
Controlling
access to
configuration
tools
luci를 위해, root 사용자나 luci 퍼미션을 가진
사용자는 luci에 액세스할 수 있습니다. 모든 액
세스는 노드를 위한 ricci 패스워드를 필요로 합
니다.
pcsd gui는 hacluster 사용자의 인증을 요구합니
다. hacluster는 공통 시스템 사용자입니다. root
사용자는 hacluster의 패스워드를 세팅할 수 있습
니다.
4.1. rgmanager 클러스터 vs pacemaker 클러스터
61
4. 부록
Configuration
Component
rgmanager Pacemaker
Cluster creation luci나 ccs 또는 cluster.conf를 직접 수정하는
방법을 써서 클러스터의 이름을 짓고 어떤 노드
를 클러스터에 포함시킬지 정의하십시오.
pcs cluster setup 커맨드나 pcsd Web UI를 써서
클러스터의 이름을 짓고 노드를 포함시키십시오.
pcs cluster node add 커맨드나 pcsd Web UI를
사용하여 여러분은 존재하는 클러스터에 노드를
추가할 수 있습니다.
Propagating
cluster
configuration to
all nodes
luci를 써서 cluser 구성 시, propagation은 자동
으로 이루어집니다. ccs를 쓸 시, --sync 옵션을
사용하십시오. 여러분은 또한 cman_tool
version –r 커맨드를 사용할 수 있습니다.
클러스터와 Pacemaker 구성 파일인
corosync.conf와 cib.xml의 propagation은 cluster
setup 또는 노드나 resource 추가 시 자동으로 이
루어집니다.
4.1. rgmanager 클러스터 vs pacemaker 클러스터
62
[root@node1 ~]# yum install pcs fence-agents-all
[root@node2 ~]# yum install pcs fence-agents-all
4.2. 구축용 커맨드 모음 4. 부록
클러스터용 패키지 설치
[root@node1 ~]# firewall-cmd --permanent --add-service=high-availability
[root@node1 ~]# firewall-cmd --add-service=high-availability
[root@node1 ~]# firerewall-cmd --list-services --zone=public
[root@node2 ~]# firewall-cmd --permanent --add-service=high-availability
[root@node2 ~]# firewall-cmd --add-service=high-availability
[root@node2 ~]# firerewall-cmd --list-services --zone=public
firewalld 설정 – firewalld를 사용할 경우
[root@node1 ~]# systemctl stop firewalld ; systemctl firewalld ; systemctl status firewalld
[root@node2 ~]# systemctl stop firewalld ; systemctl firewalld ; systemctl status firewalld
firewalld 설정 – firewalld를 사용하지 않을 경우
For TCP: Ports 2224, 3121, 21064
For UDP: Ports 5405
For DLM (if using the DLM lock manager with clvm/GFS2): Port 21064
63
4.2. 구축용 커맨드 모음 4. 부록
[root@node1 ~]# passwd hacluster
[root@node2 ~]# passwd hacluster
hacluster(pcs 관리자 계정) 계정의 패스워드를 모든 노드에 설정
[root@node1 ~]# systemctl start pcsd.service ; systemctl enable pcsd.service
[root@node2 ~]# systemctl start pcsd.service ; systemctl enable pcsd.service
모든 노드의 pcsd daemon 시작 및 enable
64
111.111.111.10 node1
111.111.111.30 cluster-svc
111.111.111.20 node2
# HA heartbeat
192.168.0.10 node1-HB
192.168.0.20 node2-HB
# HP iLO
10.0.0.10 node1-CO
10.0.0.20 node2-CO
4. 부록
모든 노드에 클러스터용 네트워크 정보를 /etc/hosts에 동일하게 설정
[root@node1 ~]# pcs cluster auth node1-HB node2-HB
클러스터 각 노드의 hacluster 계정 인증
[root@node1 ~]# pcs cluster setup --start --name cluster node1-HB,node1 node2-HB,node2
RRP(Redundant Ring Protocol)를 사용하도록 cluster setup
4.2. 구축용 커맨드 모음
65
4. 부록
STONITH 설정 - HP iLO4를 사용할 경우
[root@node1 ~]# pcs stonith create node1-CO fence_ilo4 ipaddr="10.0.0.10" login="admin" 
passwd="passwd" pcmk_host_list="node1-CO" action=reboot op monitor interval=30s
[root@node1 ~]# pcs stonith create node2-CO fence_ilo4 ipaddr="10.0.0.20" login="admin" 
passwd="passwd" pcmk_host_list="node2-CO" action=reboot op monitor interval=30s
4.2. 구축용 커맨드 모음
STONITH 설정 - Red Hat Enterprise Virtualization Manger 3.4 Fencing을 사용할 경우
[root@node1 ~]# pcs stonith create rhevfence fence_rhevm pcmk_host_list="node1,node2" 
pcmk_host_map="node1:osc-RHEL7.1_HA_node1;node2:osc-RHEL7.1_HA_node2" 
ipaddr=192.168.0.250 login=admin@internal passwd=passwd ssl=1 ssl_insecure=1 
action=reboot op monitor interval=30s
※ How to configure stonith agent 'fence_rhevm' in RHEL cluster with pacemaker.
https://access.redhat.com/solutions/891523
※ fence_rhevm fails to fence a node with error "Peer's certificate issuer has been marked as not
trusted by the user" or "No route to host" in RHEL 7
https://access.redhat.com/solutions/870603
66
4. 부록
resource 추가 – FileSystem (on-fail=ignore 옵션 추가)
[root@node1 ~]# pcs resource create data1 Filesystem 
device=/dev/vgha01/data1 directory=/data1 fstype=xfs --group clustergroup op monitor on-fail=ignore
[root@node1 ~]# pcs resource create data2 Filesystem 
device=/dev/vgha01/data2 directory=/data2 fstype=xfs --group clustergroup op monitor on-fail=ignore
[root@node1 ~]# pcs resource create data3 Filesystem 
device=/dev/vgha01/data3 directory=/data3 fstype=xfs --group clustergroup op monitor on-fail=ignore
[root@node1 ~]# pcs resource create data4 Filesystem 
device=/dev/vgha01/data4 directory=/data4 fstype=xfs --group clustergroup op monitor on-fail=ignore
4.2. 구축용 커맨드 모음
[root@node1 ~]# pcs resource create VirtualIP IPaddr2 ip=111.111.111.30 cidr_netmask=24 
nic=bond0 --group clustergroup op minitor interval=30s
resource 추가 – VIP
[root@node1 ~]# pcs resource create APP_SCRIPT lsb:APP_SCRIPT.sh --group clustergroup 
op monitor on-fail=ignore
resource 추가 – LSB-compliant custom script (on-fail=ignore 옵션 추가)
※ 스크립트를 /etc/init.d/ 에 위치시킨 뒤 실행해야 한다
67
4. 부록
[root@node1 ~]# pcs stonith update node1-CO delay=5
heartbeat network와 fence network가 분리된 환경에서 Fence Races 또는 Fence Death 예방하기 위해
Delaying Fencing 적용
4.2. 구축용 커맨드 모음
※ Delaying Fencing in a Two Node Cluster to Prevent Fence Races or "Fence Death" Scenarios
https://access.redhat.com/solutions/54829
[root@node1 ~]# pcs property set default-resource-stickiness=1000
[root@node1 ~]# pcs constraint location add location-data1-on-node1-HB data1 node1-HB 100
[root@node1 ~]# pcs constraint location add location-data2-on-node1-HB data2 node1-HB 100
[root@node1 ~]# pcs constraint location add location-data3-on-node1-HB data3 node1-HB 100
[root@node1 ~]# pcs constraint location add location-data4-on-node1-HB data4 node1-HB 100
[root@node1 ~]# pcs constraint location add location-VirtualIP-on-node1-HB VirtualIP node1-HB 100
[root@node1 ~]# pcs constraint location add location-APP_SCRIPT-on-node1-HB APP_SCRIPT node1-HB 100
auto failback 방지 설정(location constraints 설정)
※ 'pcs resource move' does not have any effect when using resource-stickiness=infinity on a
resource or resource group with pacemaker in RHEL 6 or 7
https://access.redhat.com/solutions/739813
68
4. 부록
# pcs status
클러스터 동작 상태 확인
4.3. 운영용 커맨드 모음
# cat /var/lib/pacemaker/cib/cib.xml
클러스터 구성 정보 확인
# pcs cluster standby <current active node>
resource를 move하기
# pcs cluster unstandby <current standby node>
# pcs cluster start <current offline node> | --all
offline 상태의 노드를 cluster에 re-join
69
4. 부록
# pcs constraint --full
resource constraints 정보 확인
4.3. 운영용 커맨드 모음
# pcs constraint –full
# pcs constraint remove <id>
resource constraints 중 원하는 constraints 삭제
# systemctl start pcsd
pcsd 서비스 시작
※ constraints 정보는 임의로 변경하지 마십시오. 필요 시 전문가의 가이드를 받거나 constraints에 대해
충분히 이해한 뒤에 적용하십시오.
# pcs resource update <resource id> <options>
resource 옵션 변경
70
4. 부록4.4. Bug Errata
증상
RHEL 7.1 High Availability Add On의 default 패키지 설치된 환경에서 fencing 실패
# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L
ADMINISTRATOR chassis power status
1 Error in open session response message : no matching cipher suite
Error: Unable to establish IPMI v2 / RMCP+ session Unable to get Chassis Power Status
Failed: Unable to obtain correct plug status or plug is not available
환경
하드웨어 :
HP ProLiant DL380 Gen9
운영체제 및 패키지:
Red Hat Enterprise Linux 7.1 with the High Availability Add On or before
fence-agents-ipmilan-4.0.11-10.el7.x86_64 or before
원인
RHEL 7 Update 1에서, ipmitools가 새로운 기본 cipher를 사용하도록 업데이트되었습니다. 업데이트된
이번 cipher는 특정 하드웨어와 호환되지 않을 수 있어 fence_ipmilan은 관리자나 사용자가 cipher 값을
지정하여 ipmitools을 사용하는 방법을 더 이상 필요로 하지 않습니다.
bug fix 전 cipher의 default 값은 0이며 fix 후 cipher의 default 값이 3으로 변경되었습니다.
4.4.1. Fencing with fence_ipmilan fails in RHEL7
71
진단
1) BEFORE fix - fence_ipmilan default cipher was set to 0
# rpm -q fence-agents-ipmilan
fence-agents-ipmilan-4.0.11-10.el7.x86_64
# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L ADMINISTRATOR chassis power status
1 Error in open session response message : no matching cipher suite
Error: Unable to establish IPMI v2 / RMCP+ session Unable to get Chassis Power Status
Failed: Unable to obtain correct plug status or plug is not available
4. 부록4.4. Bug Errata
4.4.1. Fencing with fence_ipmilan fails in RHEL7
72
진단
2) AFTER fix - default cipher not set, ipmitool default version used (-C 3)
# rpm -q fence-agents-ipmilan
fence-agents-ipmilan-4.0.11-11.el7_1.x86_64
# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd -C 0
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L ADMINISTRATOR chassis power status
1 Error in open session response message : no matching cipher suite
Error: Unable to establish IPMI v2 / RMCP+ session
Unable to get Chassis Power Status
Failed: Unable to obtain correct plug status or plug is not available
# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd -C 3
Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 3 -p 623 -L ADMINISTRATOR chassis power status
0 Chassis Power is on
Status: ON
4. 부록4.4. Bug Errata
4.4.1. Fencing with fence_ipmilan fails in RHEL7
73
조치
아래의 패키지들로 업데이트(서로 의존성 가짐)
fence-agents-ipmilan-4.0.11-11.el7_1 or later
fence-agents-common-4.0.11-11.el7_1 or later
fence-agents-scsi-4.0.11-11.el7_1 or later
fence-agents-all-4.0.11-11.el7_1 or later
참고 https://access.redhat.com/solutions/1410613
4. 부록4.4. Bug Errata
4.4.1. Fencing with fence_ipmilan fails in RHEL7
74
감사합니다
문의 : support@osci.kr
75
OPEN
SHARE
CONTRIBUTE
ADOPT
REUSE

More Related Content

What's hot

오픈소스로 구축하는 클라우드 이야기
오픈소스로 구축하는 클라우드 이야기오픈소스로 구축하는 클라우드 이야기
오픈소스로 구축하는 클라우드 이야기Nalee Jang
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0sprdd
 
Red Hat OpenStack 17 저자직강+스터디그룹_4주차
Red Hat OpenStack 17 저자직강+스터디그룹_4주차Red Hat OpenStack 17 저자직강+스터디그룹_4주차
Red Hat OpenStack 17 저자직강+스터디그룹_4주차Nalee Jang
 
OpenShift Virtualization- Technical Overview.pdf
OpenShift Virtualization- Technical Overview.pdfOpenShift Virtualization- Technical Overview.pdf
OpenShift Virtualization- Technical Overview.pdfssuser1490e8
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기영우 김
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutronvivekkonnect
 
コンテナ時代のOpenStack
コンテナ時代のOpenStackコンテナ時代のOpenStack
コンテナ時代のOpenStackAkira Yoshiyama
 
DNSキャッシュサーバ チューニングの勘所
DNSキャッシュサーバ チューニングの勘所DNSキャッシュサーバ チューニングの勘所
DNSキャッシュサーバ チューニングの勘所hdais
 
[242]open stack neutron dataplane 구현
[242]open stack neutron   dataplane 구현[242]open stack neutron   dataplane 구현
[242]open stack neutron dataplane 구현NAVER D2
 
NetApp XCP データ移行ツールインストールと設定
NetApp XCP データ移行ツールインストールと設定NetApp XCP データ移行ツールインストールと設定
NetApp XCP データ移行ツールインストールと設定Kan Itani
 
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick GuideJi-Woong Choi
 
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기Ji-Woong Choi
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여Ji-Woong Choi
 
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편Ji-Woong Choi
 
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!株式会社クライム
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDNOpenStack Korea Community
 
Using Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileUsing Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileRainer Gerhards
 
VMware Virtual SAN Presentation
VMware Virtual SAN PresentationVMware Virtual SAN Presentation
VMware Virtual SAN Presentationvirtualsouthwest
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleMihai Criveti
 

What's hot (20)

오픈소스로 구축하는 클라우드 이야기
오픈소스로 구축하는 클라우드 이야기오픈소스로 구축하는 클라우드 이야기
오픈소스로 구축하는 클라우드 이야기
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0오픈소스컨설팅 클러스터제안 V1.0
오픈소스컨설팅 클러스터제안 V1.0
 
Red Hat OpenStack 17 저자직강+스터디그룹_4주차
Red Hat OpenStack 17 저자직강+스터디그룹_4주차Red Hat OpenStack 17 저자직강+스터디그룹_4주차
Red Hat OpenStack 17 저자직강+스터디그룹_4주차
 
OpenShift Virtualization- Technical Overview.pdf
OpenShift Virtualization- Technical Overview.pdfOpenShift Virtualization- Technical Overview.pdf
OpenShift Virtualization- Technical Overview.pdf
 
오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기오픈스택 멀티노드 설치 후기
오픈스택 멀티노드 설치 후기
 
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/NeutronOverview of Distributed Virtual Router (DVR) in Openstack/Neutron
Overview of Distributed Virtual Router (DVR) in Openstack/Neutron
 
コンテナ時代のOpenStack
コンテナ時代のOpenStackコンテナ時代のOpenStack
コンテナ時代のOpenStack
 
DNSキャッシュサーバ チューニングの勘所
DNSキャッシュサーバ チューニングの勘所DNSキャッシュサーバ チューニングの勘所
DNSキャッシュサーバ チューニングの勘所
 
[242]open stack neutron dataplane 구현
[242]open stack neutron   dataplane 구현[242]open stack neutron   dataplane 구현
[242]open stack neutron dataplane 구현
 
NetApp XCP データ移行ツールインストールと設定
NetApp XCP データ移行ツールインストールと設定NetApp XCP データ移行ツールインストールと設定
NetApp XCP データ移行ツールインストールと設定
 
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
[오픈소스컨설팅] Red Hat ReaR (relax and-recover) Quick Guide
 
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
[오픈소스컨설팅] 프로메테우스 모니터링 살펴보고 구성하기
 
[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여[오픈소스컨설팅]오픈스택에 대하여
[오픈소스컨설팅]오픈스택에 대하여
 
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
[오픈소스컨설팅]레드햇계열리눅스7 운영자가이드 - 기초편
 
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!
ファイルサーバを高速バックアップ!Veeam NASバックアップのここがスゴイ!
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 
Using Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfileUsing Wildcards with rsyslog's File Monitor imfile
Using Wildcards with rsyslog's File Monitor imfile
 
VMware Virtual SAN Presentation
VMware Virtual SAN PresentationVMware Virtual SAN Presentation
VMware Virtual SAN Presentation
 
OpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image LifecycleOpenShift Virtualization - VM and OS Image Lifecycle
OpenShift Virtualization - VM and OS Image Lifecycle
 

Viewers also liked

[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem
[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem
[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystemSungjin Kang
 
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)Ubuntu Korea Community
 
유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0sprdd
 
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3Ji-Woong Choi
 
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1Ji-Woong Choi
 
톰캣 운영 노하우
톰캣 운영 노하우톰캣 운영 노하우
톰캣 운영 노하우jieunsys
 
오픈소스 모니터링비교
오픈소스 모니터링비교오픈소스 모니터링비교
오픈소스 모니터링비교sprdd
 
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)Ji-Woong Choi
 
Open source APM Scouter로 모니터링 잘 하기
Open source APM Scouter로 모니터링 잘 하기Open source APM Scouter로 모니터링 잘 하기
Open source APM Scouter로 모니터링 잘 하기GunHee Lee
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버Heungsub Lee
 
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning 클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning Ji-Woong Choi
 
The Future of Everything
The Future of EverythingThe Future of Everything
The Future of EverythingMichael Ducy
 

Viewers also liked (14)

[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem
[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem
[OpenStack Day in Korea] 15분만에 구축하는 오픈스택 기반 크라우드 솔루션: HP CloudSystem
 
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
김성윤 - 우분투로 슈퍼컴 만들기 (2011Y03M26D)
 
유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0유닉스 리눅스 마이그레이션_이호성_v1.0
유닉스 리눅스 마이그레이션_이호성_v1.0
 
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
[오픈소스컨설팅]유닉스의 리눅스 마이그레이션 전략_v3
 
[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1[오픈소스컨설팅]Docker on Kubernetes v1
[오픈소스컨설팅]Docker on Kubernetes v1
 
Docker osc 0508
Docker osc 0508Docker osc 0508
Docker osc 0508
 
톰캣 운영 노하우
톰캣 운영 노하우톰캣 운영 노하우
톰캣 운영 노하우
 
오픈소스 모니터링비교
오픈소스 모니터링비교오픈소스 모니터링비교
오픈소스 모니터링비교
 
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
[오픈소스컨설팅]Scouter 설치 및 사용가이드(JBoss)
 
Open source APM Scouter로 모니터링 잘 하기
Open source APM Scouter로 모니터링 잘 하기Open source APM Scouter로 모니터링 잘 하기
Open source APM Scouter로 모니터링 잘 하기
 
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
[야생의 땅: 듀랑고] 서버 아키텍처 - SPOF 없는 분산 MMORPG 서버
 
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning 클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
클라우드 컴퓨팅 기반 기술과 오픈스택(Kvm) 기반 Provisioning
 
The Future of Everything
The Future of EverythingThe Future of Everything
The Future of Everything
 
sungmin slide
sungmin slidesungmin slide
sungmin slide
 

Similar to [오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0

Redis Overview
Redis OverviewRedis Overview
Redis Overviewkalzas
 
Osc4.x installation v1-upload
Osc4.x installation v1-uploadOsc4.x installation v1-upload
Osc4.x installation v1-uploadDong-Hwa jung
 
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법JC Park
 
OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석Seung-Hoon Baek
 
Solaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloudSolaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloudsuk kim
 
2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)NAIM Networks, Inc.
 
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)Laehyoung Kim
 
Solaris messages v0.2
Solaris messages v0.2Solaris messages v0.2
Solaris messages v0.2Dong-Hwa jung
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestI Goo Lee
 
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arcNAVER D2
 
2node cluster
2node cluster2node cluster
2node clustersprdd
 
2node cluster
2node cluster2node cluster
2node clustersprdd
 
1st SDN Interest Group Seminar - Session1 (121017)
1st SDN Interest Group Seminar - Session1 (121017)1st SDN Interest Group Seminar - Session1 (121017)
1st SDN Interest Group Seminar - Session1 (121017)NAIM Networks, Inc.
 
Mcollective orchestration tool 소개
Mcollective orchestration tool 소개Mcollective orchestration tool 소개
Mcollective orchestration tool 소개태준 문
 
Implementing remote procedure calls rev2
Implementing remote procedure calls rev2Implementing remote procedure calls rev2
Implementing remote procedure calls rev2Sung-jae Park
 
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...OpenStack Korea Community
 
Klug pacemaker the opensource high-availability_1.0_f
Klug pacemaker the opensource high-availability_1.0_fKlug pacemaker the opensource high-availability_1.0_f
Klug pacemaker the opensource high-availability_1.0_f동현 김
 
Zoo keeper 소개
Zoo keeper 소개Zoo keeper 소개
Zoo keeper 소개주표 홍
 

Similar to [오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0 (20)

Redis Overview
Redis OverviewRedis Overview
Redis Overview
 
L4교육자료
L4교육자료L4교육자료
L4교육자료
 
Osc4.x installation v1-upload
Osc4.x installation v1-uploadOsc4.x installation v1-upload
Osc4.x installation v1-upload
 
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
Linux에서 Secondary VNIC와 Secondary Private IP 추가 방법
 
OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석OpenDaylight의 High Availability 기능 분석
OpenDaylight의 High Availability 기능 분석
 
Solaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloudSolaris 11 network virtualization & Server Virtualization for cloud
Solaris 11 network virtualization & Server Virtualization for cloud
 
2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)2nd SDN Interest Group Seminar-Session3 (121218)
2nd SDN Interest Group Seminar-Session3 (121218)
 
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
클라우드 환경을 위한 네트워크 가상화와 NSX(기초편)
 
Solaris messages v0.2
Solaris messages v0.2Solaris messages v0.2
Solaris messages v0.2
 
MySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software TestMySQL/MariaDB Proxy Software Test
MySQL/MariaDB Proxy Software Test
 
Kafka slideshare
Kafka   slideshareKafka   slideshare
Kafka slideshare
 
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
3.[d2 오픈세미나]분산시스템 개발 및 교훈 n base arc
 
2node cluster
2node cluster2node cluster
2node cluster
 
2node cluster
2node cluster2node cluster
2node cluster
 
1st SDN Interest Group Seminar - Session1 (121017)
1st SDN Interest Group Seminar - Session1 (121017)1st SDN Interest Group Seminar - Session1 (121017)
1st SDN Interest Group Seminar - Session1 (121017)
 
Mcollective orchestration tool 소개
Mcollective orchestration tool 소개Mcollective orchestration tool 소개
Mcollective orchestration tool 소개
 
Implementing remote procedure calls rev2
Implementing remote procedure calls rev2Implementing remote procedure calls rev2
Implementing remote procedure calls rev2
 
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
[OpenStack Days Korea 2016] Track2 - How to speed up OpenStack network with P...
 
Klug pacemaker the opensource high-availability_1.0_f
Klug pacemaker the opensource high-availability_1.0_fKlug pacemaker the opensource high-availability_1.0_f
Klug pacemaker the opensource high-availability_1.0_f
 
Zoo keeper 소개
Zoo keeper 소개Zoo keeper 소개
Zoo keeper 소개
 

More from Ji-Woong Choi

[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기Ji-Woong Choi
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020Ji-Woong Choi
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축Ji-Woong Choi
 
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육Ji-Woong Choi
 
[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략Ji-Woong Choi
 
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기Ji-Woong Choi
 
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3Ji-Woong Choi
 
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3Ji-Woong Choi
 
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12Ji-Woong Choi
 
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트Ji-Woong Choi
 
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항Ji-Woong Choi
 
OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기Ji-Woong Choi
 
Docker Setting for Static IP allocation
Docker Setting for Static IP allocationDocker Setting for Static IP allocation
Docker Setting for Static IP allocationJi-Woong Choi
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Ji-Woong Choi
 
[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick Guide[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick GuideJi-Woong Choi
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7Ji-Woong Choi
 
[오픈소스컨설팅 뉴스레터] 2016년 1분기
[오픈소스컨설팅 뉴스레터] 2016년 1분기[오픈소스컨설팅 뉴스레터] 2016년 1분기
[오픈소스컨설팅 뉴스레터] 2016년 1분기Ji-Woong Choi
 
[오픈소스컨설팅] RPM 만들기
[오픈소스컨설팅] RPM 만들기[오픈소스컨설팅] RPM 만들기
[오픈소스컨설팅] RPM 만들기Ji-Woong Choi
 
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1Ji-Woong Choi
 
[오픈소스컨설팅]Atlassian JIRA Deep Dive
[오픈소스컨설팅]Atlassian JIRA Deep Dive[오픈소스컨설팅]Atlassian JIRA Deep Dive
[오픈소스컨설팅]Atlassian JIRA Deep DiveJi-Woong Choi
 

More from Ji-Woong Choi (20)

[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
[오픈소스컨설팅] 오픈소스 기반 솔루션 방향성 잡기
 
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020[오픈소스컨설팅] 스카우터 사용자 가이드 2020
[오픈소스컨설팅] 스카우터 사용자 가이드 2020
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
[오픈소스컨설팅] Ansible을 활용한 운영 자동화 교육
 
[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략[오픈소스컨설팅] 2019년 클라우드 생존전략
[오픈소스컨설팅] 2019년 클라우드 생존전략
 
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
[오픈소스컨설팅] AWS re:Invent 2018 기계학습(ML)부분 후기
 
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
[오픈소스컨설팅]Docker기초 실습 교육 20181113_v3
 
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
[오픈소스컨설팅] 아파치톰캣 운영가이드 v1.3
 
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
[오픈소스컨설팅]ELK기반 장애예방시스템_구성_2016.12
 
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
[오픈소스컨설팅] Docker를 활용한 Gitlab CI/CD 구성 테스트
 
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
[오픈소스컨설팅]클라우드기반U2L마이그레이션 전략 및 고려사항
 
OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기OpenStack Summit 2017 참석후기
OpenStack Summit 2017 참석후기
 
Docker Setting for Static IP allocation
Docker Setting for Static IP allocationDocker Setting for Static IP allocation
Docker Setting for Static IP allocation
 
Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드Scouter와 influx db – grafana 연동 가이드
Scouter와 influx db – grafana 연동 가이드
 
[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick Guide[오픈소스컨설팅]Atlassian JIRA Quick Guide
[오픈소스컨설팅]Atlassian JIRA Quick Guide
 
[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7[오픈소스컨설팅]systemd on RHEL7
[오픈소스컨설팅]systemd on RHEL7
 
[오픈소스컨설팅 뉴스레터] 2016년 1분기
[오픈소스컨설팅 뉴스레터] 2016년 1분기[오픈소스컨설팅 뉴스레터] 2016년 1분기
[오픈소스컨설팅 뉴스레터] 2016년 1분기
 
[오픈소스컨설팅] RPM 만들기
[오픈소스컨설팅] RPM 만들기[오픈소스컨설팅] RPM 만들기
[오픈소스컨설팅] RPM 만들기
 
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
 
[오픈소스컨설팅]Atlassian JIRA Deep Dive
[오픈소스컨설팅]Atlassian JIRA Deep Dive[오픈소스컨설팅]Atlassian JIRA Deep Dive
[오픈소스컨설팅]Atlassian JIRA Deep Dive
 

[오픈소스컨설팅]RHEL7/CentOS7 Pacemaker기반-HA시스템구성-v1.0

  • 1. Copyright 2015 osci.kr. All Rights Reserved / Confidential RHEL/CentOS 7 Pacemaker 기반 High Availability 운영자 가이드 (주)오픈소스컨설팅 2015. 12. 15 문경윤 차장
  • 2. 2 Pacemaker 기반 Linux High Availability OverviewI II III 클러스터 운영 기본 클러스터 운영 실무 IV 부록 Agenda 본 문서는 특정 고객사의 특수한 환경을 고려하여 작성된 내용이 일부 포함된 운영 메뉴얼이므로 Pacemaker 기반 Linux High Availability 입문용으로는 적합하지 않을 수 있습니다. Pacemaker 기반 Linux High Availability를 한 번도 설치 및 구성을 하지 않은 리눅스 관리자라면 설치 문서를 먼저 참고하십시오. RHEL7 및 CentOS 7을 중심으로 레드햇 계열의 리눅스에 적합한 내용으로 작성되었습니다.
  • 3. 3 1. Pacemaker 기반 Linux High Availability Overview 1.1. Pacemaker Overview
  • 4. 4 1.1. Pacemaker Overview 1. Pacemaker 기반 Linux High Availability Overview 1.1.1. Pacemaker Architecture High Level에서 Pacemaker 기반 클러스터는 3개 요소로 구성되어 있습니다. Non-cluster aware components : 이 요소들은 리소스 start, stop, 모니터링 용도의 스크립트 뿐만 아니라 스크립트들이 구현한 다양한 표준들 사이의 차이점을 보완하는 local daemon을 포함합니다. Core cluster infrastructure는 messaging과 membership 기능을 제공합니다. 클러스터 이벤트(노드 leaving과 join)와 리소스 이벤트(장애 모니터링) 뿐만 아니라 관리자의 구성 변경에 대해 프로세스하고 반응하는 중심부. 이 모든 이벤트의 반응에서 Pacemaker는 이상적인 클러스터 상태를 산정하고 최적의 경로를 마련합니다. ▲ Conceptual Stack Overview
  • 5. 5 1.1. Pacemaker Overview 1.1.1. Pacemaker Architecture Corosync가 결합되면 Pacamaker는 클러스터 파일시스템 커뮤니티의 최근의 표준화 작업에 힘입어 널리 알려진 오픈소스 클러스터 파일시스템들을 지원합니다. 이 커뮤니티들은 메시징 기능을 위한 Corosync와, 멤버쉽(노드 up/down)과 fencing 서비스를 위한 Pacemaker를 활용하는 일반적인 분산 lock manager를 활용합니다. ▲ The Pacemaker Stack 1. Pacemaker 기반 Linux High Availability Overview
  • 6. 6 1.1. Pacemaker Overview 1.1.1. Pacemaker Architecture 1. Pacemaker 기반 Linux High Availability Overview
  • 7. 7 1.1. Pacemaker Overview 1.1.1. Pacemaker Architecture Cluster Information Base (CIB) The Pacemaker information daemon으로, DC(Designated Co-ordinator; Pacemaker에 의해 할당된 노드로서, CIB를 통해 클러스터 상태와 액션을 저장하고 분산)로부터 현재의 구성과 상태 정보를 내부적으로 배포하고 동기화하기 위해 XML을 사용합니다. 1. Pacemaker 기반 Linux High Availability Overview
  • 8. 8 1.1. Pacemaker Overview 1.1.1. Pacemaker Architecture Cluster Resource Management Daemon (CRMd) Pacemaker 클러스터 리소스 동작은 이 데몬을 통해 라우트됩니다. CRMd에 의해 관리되는 리소스는 필요할 때 이동되고 인스턴스화되고 바뀌는 클라이언트 시스템에 의해 쿼리될 수 있습니다. 각 클러스터 노드는 또한 CRMd와 리소스 간 인터페이스로써 동작하는 local resource manager daemon(LRMd)을 포함합니다. LRMd는 CRMd에서 agent를 향해 커맨드를 전달합니다. 이 커맨드는 상태 정보를 시작하고 중지하고 릴레이하는 것과 같은 것입니다. 1. Pacemaker 기반 Linux High Availability Overview
  • 9. 9 1.1. Pacemaker Overview 1.1.1. Pacemaker Architecture Shoot the Other Node in the Head (STONITH) 종종 power switch와 함께 연결되는, STONITH는 Pacemaker에서 fence 요청을 처리하고 노드의 전원을 강제로 down시키고 데이터 무결성을 보장하기 위해 클러스터로부터 해당 노드를 remove 처리하는 클러스터 리소스로써 동작합니다. STONITH는 CIB에서 구성되고 일반적인 클러스터 리소스로써 모니터링될 수 있습니다. 1. Pacemaker 기반 Linux High Availability Overview
  • 10. 10 1.2.2. Pacemaker Configuration and Management Tools 1.1. Pacemaker Overview Pacemaker는 클러스터의 배포, 모니터링, 관리를 위해 두 가지의 구성 도구로 특징을 이루고 있습니다. pcs pcs는 Pacemaker의 모든 측면과 Corosync hearbeat daemon을 제어합니다. 커맨드라인 기반 프로그램인 pcs는 아래의 관리 태스크들을 발휘합니다: - Pacemaker/Corosync cluster를 생성하고 구성 - 실행 상태에서 클러스터의 구성을 수정 - 클러스터 시작, 중지, 상태 정보 출력 등을 비롯하여 Pacemaker와 Corosync를 원격으로 구성 1. Pacemaker 기반 Linux High Availability Overview
  • 11. 11 1.2.2. Pacemaker Configuration and Management Tools 1.1. Pacemaker Overview pcs-gui Pacemaker/Corosync 클러스터 생성 및 구성을 위한 그래피컬한 사용자 인터페이스. 커맨드 기반 pcs 유틸리티와 동등한 기능성을 가짐 ▼ RHEL7의 pcs-gui 화면 1. Pacemaker 기반 Linux High Availability Overview
  • 12. 12 2. Cluster 운영 기본 2.1. Topology 2.2. Cluster Infrastructure 점검 2.3. Cluster 시작 및 검증 2.4. The pcs Command Line Interface 기본 2.5. 자주 사용되는 pcs Command
  • 13. 13 2.1. Topology hostname : node1 hostname : node2 2. Cluster 운영 기본 service network heartbeat network fencing device network 111.111.111.10192.168.0.1010.0.0.110 10.0.0.10 111.111.111.20 192.168.0.20 10.0.0.120 10.0.0.20 Storage 1G Ethernet Switch 10G Ethernet Switch San Switch
  • 14. 14 2.2. Cluster Infrastructure 점검 클러스터 서비스를 정상적으로 구동하기 위해서는 클러스터 인프라가 정상적으로 준비되어 있어야 합니다. 아래 요소들을 필히 체크한 뒤 클러스터를 구동해야 합니다. 클러스터 구동 뿐만 아니라 운영 중에도 아래 요소들 중 하나라도 문제가 생기면 노드 장애 시 올바른 failover가 이루어지는 것이 보증되지 않습니다. FQDN or hostname – 클러스터는 노드들을 FQDN or hostname으로 식별합니다. Network – 클러스터 노드 간 통신은 TCP/IP 기반으로 이루어집니다. Shared volume – 모든 클러스터 노드들에 물리적으로 연결되는 볼륨으로, 실시간으로 변경되는 데이터는 이 볼륨에 위치시켜야 합니다. NTP – 클러스터와 같은 멀티 노드 아키텍처에서 노드 간 시각 동기화는 필수적입니다. Firewall – 클러스터 통신에 사용되는 TCP/UDP 포트가 노드 간 open되어 있어야 합니다. STONITH(fencing device) – 클러스터 노드에 장애 발생 시 장애 노드에 의한 shared volume의 data corruption을 방지하기 위해 전원을 차단하는 방법 등으로 장애 노드의 shared volume 액세스를 차단하는 장치입니다. 2. Cluster 운영 기본
  • 15. 15 2.2.1. FQDN or hostname /etc/hosts 구성 및 확인 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 111.111.111.10 node1 111.111.111.30 cluster-svc 111.111.111.20 node2 # HA heartbeat 192.168.0.10 node1-HB 192.168.0.20 node2-HB # HP iLO 10.0.0.10 node1-CO 10.0.0.20 node2-CO 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 16. 16 2.2.2. Network 네트워크 인터페이스 link status 및 ip address 확인 – node1 [root@node1 ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff 3: eno49: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff 4: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:14:03:c1 brd ff:ff:ff:ff:ff:ff 5: ens1f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff 6: eno50: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 5c:b9:01:89:5d:6d brd ff:ff:ff:ff:ff:ff 7: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:14:03:c2 brd ff:ff:ff:ff:ff:ff 8: eno51: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 5c:b9:01:89:5d:6e brd ff:ff:ff:ff:ff:ff 9: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:14:03:c3 brd ff:ff:ff:ff:ff:ff 10: eno52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 5c:b9:01:89:5d:6f brd ff:ff:ff:ff:ff:ff inet 10.0.0.110/24 brd 10.146.31.255 scope global eno52 valid_lft forever preferred_lft forever inet6 fe80::5eb9:1ff:fe89:5d6f/64 scope link valid_lft forever preferred_lft forever 11: ens1f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff 12: ens4f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff 13: ens4f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff 14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff inet 111.111.111.10/24 brd 45.112.1.255 scope global bond0 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:9238/64 scope link valid_lft forever preferred_lft forever 15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff inet 172.16.88.10/24 brd 172.16.88.255 scope global bond1 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:9239/64 scope link valid_lft forever preferred_lft forever 16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff inet 192.168.0.10/24 brd 192.10.5.255 scope global bond2 valid_lft forever preferred_lft forever inet6 fe80::3ea8:2aff:fe14:3c0/64 scope link valid_lft forever preferred_lft forever [root@node1 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 17. 17 2.2.2. Network 네트워크 인터페이스 link status 및 ip address 확인 – node2 [root@node2 ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff 3: eno49: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond2 state UP qlen 1000 link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff 4: ens1f0: <NO-CARRIER,BROADCAST,MULTICAST,SLAVE,UP> mtu 1500 qdisc mq master bond0 state DOWN qlen 1000 link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff 5: eno2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:13:49:35 brd ff:ff:ff:ff:ff:ff 6: eno50: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 5c:b9:01:89:62:8d brd ff:ff:ff:ff:ff:ff 7: eno51: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 5c:b9:01:89:62:8e brd ff:ff:ff:ff:ff:ff 8: eno3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:13:49:36 brd ff:ff:ff:ff:ff:ff 9: eno4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 3c:a8:2a:13:49:37 brd ff:ff:ff:ff:ff:ff 10: eno52: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000 link/ether 5c:b9:01:89:62:8f brd ff:ff:ff:ff:ff:ff inet 10.0.0.120/24 brd 10.146.31.255 scope global eno52 valid_lft forever preferred_lft forever inet6 fe80::5eb9:1ff:fe89:628f/64 scope link valid_lft forever preferred_lft forever 11: ens1f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff 12: ens4f0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP qlen 1000 link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff 13: ens4f1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP qlen 1000 link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff 14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:8a:a0 brd ff:ff:ff:ff:ff:ff inet 111.111.111.20/24 brd 45.112.1.255 scope global bond0 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:8aa0/64 scope link valid_lft forever preferred_lft forever 15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:8a:a1 brd ff:ff:ff:ff:ff:ff inet 172.16.88.20/24 brd 172.16.88.255 scope global bond1 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:8aa1/64 scope link valid_lft forever preferred_lft forever 16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 3c:a8:2a:13:49:34 brd ff:ff:ff:ff:ff:ff inet 192.168.0.20/24 brd 192.10.5.255 scope global bond2 valid_lft forever preferred_lft forever inet6 fe80::3ea8:2aff:fe13:4934/64 scope link valid_lft forever preferred_lft forever [root@node2 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 18. 18 2.2.2. Network routing table 확인 [root@node1 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 111.111.111.1 0.0.0.0 UG 0 0 0 bond0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno52 111.111.111.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0 172.16.88.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1 192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 bond2 [root@node1 ~]# [root@node2 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 111.111.111.1 0.0.0.0 UG 0 0 0 bond0 10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eno52 111.111.111.0 0.0.0.0 255.255.255.0 U 0 0 0 bond0 172.16.88.0 0.0.0.0 255.255.255.0 U 0 0 0 bond1 192.168.0..0 0.0.0.0 255.255.255.0 U 0 0 0 bond2 [root@node2 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 19. 19 2.2.3. Shared volume device-mapper multipath 구성 및 확인 – node1 [root@node1 ~]# multipath -ll 360060e8005bd75000000bd750000005f dm-12 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:8 sdl 8:176 active ready running `- 10:0:0:8 sdw 65:96 active ready running 360060e8005bd75000000bd750000005e dm-11 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:7 sdk 8:160 active ready running `- 10:0:0:7 sdv 65:80 active ready running 360060e8005bd75000000bd750000005d dm-8 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:6 sdj 8:144 active ready running `- 10:0:0:6 sdu 65:64 active ready running 360060e8005bd75000000bd750000005c dm-5 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:5 sdi 8:128 active ready running `- 10:0:0:5 sdt 65:48 active ready running 360060e8005bd75000000bd750000005b dm-2 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:4 sdh 8:112 active ready running `- 10:0:0:4 sds 65:32 active ready running 360060e8005bd75000000bd750000005a dm-10 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:3 sdg 8:96 active ready running `- 10:0:0:3 sdr 65:16 active ready running 360060e8005bd75000000bd7500000059 dm-3 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:2 sdf 8:80 active ready running `- 10:0:0:2 sdq 65:0 active ready running 360060e8005bd75000000bd7500000061 dm-4 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:10 sdn 8:208 active ready running `- 10:0:0:10 sdy 65:128 active ready running 360060e8005bd75000000bd7500000058 dm-9 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:1 sde 8:64 active ready running `- 10:0:0:1 sdp 8:240 active ready running 360060e8005bd75000000bd7500000060 dm-6 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:9 sdm 8:192 active ready running `- 10:0:0:9 sdx 65:112 active ready running 360060e8005bd75000000bd7500000057 dm-7 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:0 sdd 8:48 active ready running `- 10:0:0:0 sdo 8:224 active ready running [root@node1 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 20. 20 2.2.3. Shared volume device-mapper multipath 구성 및 확인 – node2 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본 [root@node2 ~]# multipath -ll 360060e8005bd75000000bd750000005f dm-12 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:8 sdl 8:176 active ready running `- 10:0:0:8 sdw 65:96 active ready running 360060e8005bd75000000bd750000005e dm-11 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:7 sdk 8:160 active ready running `- 10:0:0:7 sdv 65:80 active ready running 360060e8005bd75000000bd750000005d dm-8 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:6 sdj 8:144 active ready running `- 10:0:0:6 sdu 65:64 active ready running 360060e8005bd75000000bd750000005c dm-5 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:5 sdi 8:128 active ready running `- 10:0:0:5 sdt 65:48 active ready running 360060e8005bd75000000bd750000005b dm-2 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:4 sdh 8:112 active ready running `- 10:0:0:4 sds 65:32 active ready running 360060e8005bd75000000bd750000005a dm-10 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:3 sdg 8:96 active ready running `- 10:0:0:3 sdr 65:16 active ready running 360060e8005bd75000000bd7500000059 dm-3 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:2 sdf 8:80 active ready running `- 10:0:0:2 sdq 65:0 active ready running 360060e8005bd75000000bd7500000061 dm-4 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:10 sdn 8:208 active ready running `- 10:0:0:10 sdy 65:128 active ready running 360060e8005bd75000000bd7500000058 dm-9 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:1 sde 8:64 active ready running `- 10:0:0:1 sdp 8:240 active ready running 360060e8005bd75000000bd7500000060 dm-6 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:9 sdm 8:192 active ready running `- 10:0:0:9 sdx 65:112 active ready running 360060e8005bd75000000bd7500000057 dm-7 HITACHI ,OPEN-V size=14G features='0' hwhandler='0' wp=rw `-+- policy='service-time 0' prio=1 status=active |- 6:0:0:0 sdd 8:48 active ready running `- 10:0:0:0 sdo 8:224 active ready running [root@node2 ~]#
  • 21. 21 2.2.3. Shared volume [root@node1 ~]# egrep -v '^$|^#' /etc/multipath.conf defaults { user_friendly_names no find_multipaths yes } devices { device { vendor "HITACHI " product "OPEN-V " path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" hardware_handler "0" failback 15 rr_weight priorities no_path_retry queue } } [root@node1 ~]# [root@node2 ~]# egrep -v '^$|^#' /etc/multipath.conf defaults { user_friendly_names no find_multipaths yes } devices { device { vendor "HITACHI " product "OPEN-V " path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" hardware_handler "0" failback 15 rr_weight priorities no_path_retry queue } } [root@node2 ~]# [root@node1 ~]# systemctl list-unit-files | grep multipathd multipathd.service enabled [root@node1 ~]# [root@node2-HB ~]# systemctl list-unit-files | grep multipathd multipathd.service enabled [root@node2 ~]# device-mapper multipath 구성 및 확인 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 22. 22 2.2.3. Shared volume LVM 확인 [root@node1 ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert home vg00 -wi-ao---- 20.00g root vg00 -wi-ao---- 30.00g swap vg00 -wi-ao---- 16.00g tmp vg00 -wi-ao---- 5.00g var vg00 -wi-ao---- 20.00g var_crash vg00 -wi-ao---- 149.86g data4 vgha01 -wi-a----- 10.00g data2 vgha01 -wi-a----- 10.00g data3 vgha01 -wi-a----- 20.00g data1 vgha01 -wi-a----- 100.00g [root@node1 ~]# [root@node2 ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert home vg00 -wi-ao---- 20.00g root vg00 -wi-ao---- 30.00g swap vg00 -wi-ao---- 16.00g tmp vg00 -wi-ao---- 5.00g var vg00 -wi-ao---- 20.00g var_crash vg00 -wi-ao---- 149.86g data4 vgha01 -wi-a----- 10.00g data2 vgha01 -wi-a----- 10.00g data3 vgha01 -wi-a----- 20.00g data1 vgha01 -wi-a----- 100.00g [root@node2 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본 lvs 커맨드 출력내용 중 클러스터 리소스로 사용되는 논리볼륨의 Attr 필드에 “a(activate)” tag가 존재하는지 확인합니다. 이 tag가 존재하여야 논리볼륨에 액세스 가능합니다.
  • 23. 23 2.2.4. NTP 시각 동기화 상태 확인 [root@node1 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *send.mx.cdnetwo 133.100.8.2 2 u 686 1024 377 4.666 -0.279 1.777 +dadns.cdnetwork 133.100.8.2 2 u 529 1024 377 3.465 0.770 2.449 [root@node1 ~]# [root@node2 ~]# ntpq -p remote refid st t when poll reach delay offset jitter ============================================================================== *send.mx.cdnetwo 133.100.8.2 2 u 686 1024 377 4.666 -0.279 1.777 +dadns.cdnetwork 133.100.8.2 2 u 529 1024 377 3.465 0.770 2.449 [root@node2 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본
  • 24. 24 2.2.5. Firewall 방화벽 비활성화 여부 확인 [root@node1 ~]# 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@node1 ~]# systemctl list-unit-files | grep firewalld firewalld.service disabled [root@node1 ~]# 2.2. Cluster Infrastructure 점검 2. Cluster 운영 기본 [root@node2 ~]# 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@node2 ~]# systemctl list-unit-files | grep firewalld firewalld.service disabled [root@node2 ~]#
  • 25. 25 2.2.6. STONITH(fencing device) node1에서 fence_ipmilan 도구로 fencing device(HP iLO4)에 인증 테스트 2.2. Cluster Infrastructure 점검 [root@node1 ~]# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON [root@node1 ~]# [root@node1 ~]# fence_ipmilan -P -a 10.0.0.20 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.20 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON [root@node1 ~]# hostname : node1 hostname : node2 ipmilan auth requestipmilan auth request 2. Cluster 운영 기본
  • 26. 26 2.2.6. STONITH(fencing device) node2에서 fence_ipmilan 도구로 fencing device(HP iLO4)에 인증 테스트 2.2. Cluster Infrastructure 점검 [root@node2 ~]# fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON [root@node2 ~]# [root@node2 ~]# fence_ipmilan -P -a 10.0.0.20 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.20 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON [root@node2 ~]# hostname : node1 hostname : node2 ipmilan auth requestipmilan auth request 2. Cluster 운영 기본
  • 27. 27 2.3.1. pcsd 서비스 시작 및 검증 [root@node1 ~]# systemctl start pcsd [root@node1 ~]# systemctl status pcsd pcsd.service - PCS GUI and remote configuration interface Loaded: loaded (/usr/lib/systemd/system/pcsd.service; enabled) Active: active (running) since Fri 2015-11-20 23:34:22 KST; 49s ago Main PID: 638 (pcsd) CGroup: /system.slice/pcsd.service ???€638 /bin/sh /usr/lib/pcsd/pcsd start ???€662 /bin/bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb ???€663 /usr/bin/ruby -I/usr/lib/pcsd /usr/lib/pcsd/ssl.rb Nov 20 23:34:22 node2.cluster.com systemd[1]: Started PCS GUI and remote configuration interface. [root@node1 ~]# Pacemaker를 컨트롤하기 위해 사용되는 pcs 커맨드라인 인터페이스를 사용하기 위해서는 클러스터 노드에 pcsd 서비스가 active상태여야 합니다. [root@node1 ~]# systemctl list-unit-files | grep pcsd pcsd.service enabled [root@node1 ~]# 편의를 위해 시스템 시작 시 pcsd를 자동으로 activate하는 설정이 되어 있는지 확인합니다. Pacemaker 패키지 설치 당시 default로 enable 세팅되어 있습니다. 2.3. Cluster 시작 및 검증 2. Cluster 운영 기본
  • 28. 28 pcsd 서비스가 active 상태라면 이제 pcs 커맨드라인 인터페이스를 사용할 수 있습니다. 클러스터 노드가 모두 reboot된 상태에서 Pacemaker 클러스터 구동을 위한 명령어는 아래와 같습니다. 아무 노드에서 1회 실행합니다. 2.3.2. cluster 시작 및 검증 # pcs cluster start --all 특정 클러스터 노드만 reboot된 상태에서 해당 노드를 Pacemaker 클러스터에 join 시키기 위한 명령어는 아래와 같습니다. 아무 노드에서 1회 실행합니다. # pcs cluster start <node> 2.3. Cluster 시작 및 검증 2. Cluster 운영 기본
  • 29. 29 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Online: [ node1-HB node2-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node2-HB node2-CO (stonith:fence_ilo4): Started node2-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# 2.3.3. cluster 및 resource 구동 상태 확인 cluster를 구동하였으면 cluster의 상태를 확인합니다. # pcs status 2. Cluster 운영 기본2.3. Cluster 시작 및 검증 Online: [ node1-HB node2-HB ] 두 노드의 corosync, pacemaker daemon이 모두 active 상태임을 의미하며 이 daemon들이 active되지 않으면 클러스터를 운영할 수 없습니다. PCSD Status: node1-HB: Online node2-HB: Online pcsd daemon이 active 상태임을 의미하며 pcs command-line 인터페이스를 사용 가능합니다. Pacemaker 클러스터를 제어하기 위해 가장 먼저 선행되어야 할 조건입니다.
  • 30. 30 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Online: [ node1-HB node2-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node2-HB node2-CO (stonith:fence_ilo4): Started node2-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# 2.3.3. cluster 및 resource 구동 상태 확인 cluster를 구동하였으면 cluster의 상태를 확인합니다. # pcs status 2. Cluster 운영 기본2.3. Cluster 시작 및 검증 Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled ① : daemon이 현재 active ② : 시스템 시작 시 disabled (# systemctl disable <service name>) ① ②
  • 31. 31 active node에서 shared volume의 마운트 상태 및 VIP(Virtual IP), 어플리케이션 프로세스의 구동 상태를 확인합니다. [root@node1 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg00-root 30G 8.8G 22G 30% / devtmpfs 63G 0 63G 0% /dev tmpfs 63G 39M 63G 1% /dev/shm tmpfs 63G 66M 63G 1% /run tmpfs 63G 0 63G 0% /sys/fs/cgroup (중략) /dev/mapper/vg00-var_crash 150G 33M 150G 1% /var/crash /dev/mapper/vgha01-data1 100G 5.8G 95G 6% /data1 /dev/mapper/vgha01-data2 10G 33M 10G 1% /data2 /dev/mapper/vgha01-data3 20G 33M 20G 1% /data3 /dev/mapper/vgha01-data4 10G 33M 10G 1% /data4 [root@node1 ~]# [root@node1 ~]# ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever (중략) 14: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:92:38 brd ff:ff:ff:ff:ff:ff inet 111.111.111.10/24 brd 45.112.1.255 scope global bond0 valid_lft forever preferred_lft forever inet 111.111.111.30/24 brd 45.112.1.255 scope global secondary bond0 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:9238/64 scope link valid_lft forever preferred_lft forever 15: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 00:11:0a:68:92:39 brd ff:ff:ff:ff:ff:ff inet 172.16.88.71/24 brd 172.16.88.255 scope global bond1 valid_lft forever preferred_lft forever inet6 fe80::211:aff:fe68:9239/64 scope link valid_lft forever preferred_lft forever 16: bond2: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP link/ether 3c:a8:2a:14:03:c0 brd ff:ff:ff:ff:ff:ff inet 192.168.0.10/24 brd 192.10.5.255 scope global bond2 valid_lft forever preferred_lft forever inet6 fe80::3ea8:2aff:fe14:3c0/64 scope link valid_lft forever preferred_lft forever [root@node1 ~]# [root@node1 ~]# ps auxww 2. Cluster 운영 기본2.3. Cluster 시작 및 검증 2.3.3. cluster 및 resource 구동 상태 확인
  • 32. 32 RRP(Redundant Ring Protocol)의 상태를 확인합니다. bond0 인터페이스에 할당된 111.111.111.0/24 네트워크를 Redundant Ring Protocol용 네트워크로 구성하였습니다. # corosync-cfgtool -s 2. Cluster 운영 기본2.3. Cluster 시작 및 검증 2.3.3. cluster 및 resource 구동 상태 확인 [root@node1 ~]# corosync-cfgtool -s Printing ring status. Local node ID 1 RING ID 0 id = 192.168.0.10 status = ring 0 active with no faults RING ID 1 id = 111.111.111.10 status = ring 1 active with no faults [root@node1 ~]# RING ID 0 : heartbeat network 192.168.0.0/24 RING ID 1 : service network 111.111.111.0/24 node1 node2
  • 33. 33 2.4. The pcs Command Line Interface 기본 2.4.1. Syntax pcs 커맨드라인 syntax는 아래와 같습니다. pcs <parameters> pcs 커맨드와 함께 사용되는 parameter는 많은 level을 갖고 있습니다. 아래의 syntax를 적용할 수 있습니다. pcs <parameter1> <parameter2> pcs 커맨드라인 help는 문서화가 잘 되어 있고 매우 유용합니다. depth에 관해서는 모든 level에서 pcs 커맨드 사용에 관한 도움을 받을 수 있습니다. pcs <parameter1> <parameter2> --help 2. Cluster 운영 기본 # pcs resource –h Usage: pcs resource [commands]... Manage pacemaker resources Commands: show [resource id] [--all] Show all currently configured resources or if a resource is specified show the options for the configured resource. If --all is specified resource options will be displayed start <resource id> Start resource specified by resource_id
  • 34. 34 2.4. The pcs Command Line Interface 기본 2.4.2. Parameters pcs 커맨드라인 도구는 아래의 액션들이 이루어지도록 합니다. cluster cluster 파라미터는 클러스터에서 사용을 원하는 노드를 인증하는 것을 허용합니다. 또한 클러스터 timeout, redundant ring protocols, Quorum 옵션 구성을 허용합니다. resource resource 파라미터는 신규 클러스터 리소스를 추가하는 것을 허용합니다. 또한 클러스터 리소스를 클러스터 범위 내에서 enabling, disabling, moving하는 것을 허용합니다. stonith stonith 파라미터는 클러스터에서 사용되기 위한 fencing 장치 구성을 가능하게 하고 fence 장치와 함께 클러스터 노드를 관리합니다. constraints constraints 파라미터는 클러스터 리소스를 그룹화하는 것을 가능하게 합니다; 클러스터 리소스, start와 stop 순서, 선호되는 리소스 위치(노드)를 구성할 수 있습니다. 2. Cluster 운영 기본
  • 35. 35 2.4. The pcs Command Line Interface 기본 2.4.2. Parameters property property 파라미터는 Quorum 손실, STONITH가 없는 등의 특수한 상황에서의 클러스터 동작을 구성하도록 허용합니다. status status 파라미터는 현재의 클러스터와 리소스 상태를 보여 줍니다. config config 파라미터는 사용자 친화적인 형태로 완전한 클러스터 구성을 출력합니다. 2. Cluster 운영 기본
  • 36. 36 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Online: [ node1-HB node2-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node2-HB node2-CO (stonith:fence_ilo4): Started node2-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# 2.5.1. cluster 및 resource 구동 상태 확인 2. Cluster 운영 기본2.5. 자주 사용되는 pcs Command # pcs status
  • 37. 37 2.5.2. cluster 구성 정보 상세 확인 2. Cluster 운영 기본2.5. 자주 사용되는 pcs Command [root@node1 ~]# cat /var/lib/pacemaker/cib/cib.xml <cib crm_feature_set="3.0.10" validate-with="pacemaker-2.3" epoch="212" num_updates="0" admin_epoch="0" cib-last-written="Mon Dec 7 15:43:37 2015" update-origin="node1-HB" update-client="cibadmin" update-user="root" have-quorum="1" dc-uuid="2"> <configuration> <crm_config> <cluster_property_set id="cib-bootstrap-options"> <nvpair id="cib-bootstrap-options-have-watchdog" name="have-watchdog" value="false"/> <nvpair id="cib-bootstrap-options-dc-version" name="dc-version" value="1.1.13-a14efad"/> <nvpair id="cib-bootstrap-options-cluster-infrastructure" name="cluster-infrastructure" value="corosync"/> <nvpair id="cib-bootstrap-options-cluster-name" name="cluster-name" value="cluster"/> <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="true"/> <nvpair id="cib-bootstrap-options-default-resource-stickiness" name="default-resource-stickiness" value="1000"/> </cluster_property_set> </crm_config> <nodes> <node id="1" uname="node1-HB"/> <node id="2" uname="node2-HB"> <instance_attributes id="nodes-2"/> </node> </nodes> <resources> (이하 생략) # cat /var/lib/pacemaker/cib/cib.xml 클러스터 구성 변경 시 /var/lib/pacemaker/cib/cib.xml 파일을 직접 편집하지 마십시오. 오직 pcs 커맨드라인 인터페이스를 통해서 클러스터 구성을 변경해야 합니다.
  • 38. 38 2.5. 자주 사용되는 pcs Command 2.5.3. 모든 resource를 다른 node로 수동 move하기 2. Cluster 운영 기본 # pcs cluster standby <active node> standby mode는 모든 resource를 다른 node로 move하는 데에 사용될 수 있습니다. 현재 모든 resource들이 active 중인 node는 standby mode로 전환 시 모든 resource들이 다른 node로 move되며 standby mode로 전환됩니다. standby mode 상태인 original active node는 unstandby mode로 설정하여 원상 복구합니다. # pcs cluster unstandby <original active node>
  • 39. 39 2.5. 자주 사용되는 pcs Command 2.5.4. 단일 resource를 다른 node로 수동 move하기 2. Cluster 운영 기본 Rgmanager 기반 RHEL6 Cluster와는 달리 Pacemaker 기반 RHEL7 클러스터는 단일 resource를 다른 노드로 move 시 약간의 주의가 필요합니다. pcs의 파라미터 중 resource constraints에 대한 이해가 필요합니다. # pcs resource move <resource id> [destination node] resource move 시엔 주로 location constraints만을 주의하면 됩니다. move 대상으로 resource group 내 아무 resource id를 명시합니다. resource group id를 명시할 수 있는 방법은 제공되지 않습니다. 하나의 resource id만을 명시하여 move하면 resource group의 모든 resource가 move됩니다. location constraints – resource를 실행할 수 있는 node를 결정 order constraints - resource를 실행할 곳에 실행 순서를 결정 colocation constraints – 다른 resource와 연계하여 어디에 위치시킬 것인지 결정 constraints 종류 resource를 move 시 주의사항
  • 40. 40 2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본 resource를 다른 클러스터 노드로 move하면 새로운 location constraints가 해당 resource에 자동 생성되며 이는 이후의 manual move 및 node fail로 인한 failover/failback에 영향을 주므로 삭제할 필요가 있습니다. move 시 destination node 명시 유무에 따라 location constraints score 변화에 차이가 있습니다. ☞ Step 1. move 대상 resource에 “INFINITY”또는 “-INFINITY” score를 갖는 location constraints가 있는지 확인하여 있다면 해당 location constraints 삭제 2.5.4. 단일 resource를 다른 node로 수동 move하기
  • 41. 41 2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본 [root@node1 ~]# pcs resource move data1 node2-HB [root@node1 ~]# pcs constraint --full Location Constraints: Resource: APP_SCRIPT Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB) Resource: VirtualIP Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB) Resource: data1 Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB) Enabled on: node1-HB (score:INFINITY) (role: Started) (id:cli-prefer-data1) Resource: data2 Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB) Resource: data3 Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB) Resource: data4 Enabled on: node1-HB (score:100) (id:location-data4-on-node1-HB) Ordering Constraints: Colocation Constraints: [root@node1 ~]# ▼ 2노드 클러스터에서 destination node를 명시하고 move 시 추가되는 location constraints node1-HB -> node2-HB 로 manual move 후 role:Started가 INFINITY 스코어로 node2-HB 노드에 Enabled 되었다는 의미로 이 constraint를 그대로 두면 다음에 해당 resource를 같은 방법으로 다른 노드에 manual move하기는 자유로우나 resource group 내 다른 resource를 manual move 시 이 constraint의 영향 때문에 manual move가 지속적으로 방지됩니다. resource를 manual move하는 데에 영향을 주는 constraint이므로 삭제를 권장합니다. 2.5.4. 단일 resource를 다른 node로 수동 move하기
  • 42. 42 2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본 [root@node1 ~]# pcs resource move data1 [root@node1 ~]# pcs constraint --full Location Constraints: Resource: APP_SCRIPT Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB) Resource: VirtualIP Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB) Resource: data1 Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB) Disabled on: node1-HB (score:-INFINITY) (role: Started) (id:cli-ban-data1-on-node1-HB) Resource: data2 Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB) Resource: data3 Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB) Resource: data4 Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB) Ordering Constraints: Colocation Constraints: [root@node1 ~]# ▼ 2노드 클러스터에서 destination node를 명시하지 않고 move 시 추가되는 location constraints node1-HB -> node2-HB 로 manual move 후 role:Started가 -INFINITY 스코어로 node1-HB 노드에 Disabled 되었다는 의미로 이 constraint를 그대로 두면 다음에 해당 resource를 같은 방법으로 이전의 active 노드(node1-HB)에 manual move 및 failback이 방지되며 resource group 내 다른 resource를 manual move 시 이 constraint의 score 영향 때문에 manual move가 지속적으로 방지됩니다. resource를 manual move하는 데에 영향을 주는 constraint이므로 삭제를 권장합니다. 2.5.4. 단일 resource를 다른 node로 수동 move하기
  • 43. 43 2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본 [root@node1 ~]# pcs constraint --full Location Constraints: Resource: APP_SCRIPT Enabled on: node1-HB (score:100) (id:location-APP_SCRIPT-on-node1-HB) Resource: VirtualIP Enabled on: node1-HB (score:100) (id:location-VirtualIP-on-node1-HB) Resource: data1 Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB) Disabled on: node1-HB (score:-INFINITY) (role: Started) (id:cli-ban-data1-on-node1-HB) Resource: data2 Enabled on: node1-HB (score:100) (id:location-data2-on-node1-HB) Resource: data3 Enabled on: node1-HB (score:100) (id:location-data3-on-node1-HB) Resource: data4 Enabled on: node1-HB (score:100) (id:location-data1-on-node1-HB) Ordering Constraints: Colocation Constraints: [root@node1 ~]# resource를 manual move하기 전 삭제하고자 하는 location constraints id를 확인합니다. 해당 location constraints id를 삭제합니다. [root@node1 ~]# pcs constraint remove cli-ban-data1-on-node1-HB 이제 resource를 다른 노드로 자유롭게 move할 수 있습니다. 또는 pcs resource clear 커맨드를 사용합니다(권장). [root@node1 ~]# pcs resource clear data1 2.5.4. 단일 resource를 다른 node로 수동 move하기
  • 44. 44 2.5. 자주 사용되는 pcs Command 2. Cluster 운영 기본 ☞ Step 2. 원하는 노드에 resource를 manual move ☞ Step 3. original active node에 resource를 다시 manual move하고 싶다면 해당 resource의 constraint를 확인(1의 과정 반복)하고 clear [root@node1 ~]# pcs resource move <resource id> [destination node] [root@node1 ~]# pcs constraint --full [root@node1 ~]# pcs resource clear <resource id> ☞ Step 4. original active node에 resource를 manual move [root@node1 ~]# pcs resource move <resource id> [destination node] 2.5.4. 단일 resource를 다른 node로 수동 move하기 단일 resource가 아닌 모든 resource를 move 시 pcs cluster standby 커맨드 사용을 권장합니다. pcs resource move 커맨드에 의해 생성된 constraints 제거 시 pcs resource clear 를 사용 권장합니다.
  • 45. 45 3. Cluster 운영 실무 3.1. 모니터링 및 유지보수 3.2. 장애처리
  • 46. 46 3.1.1. 기본 모니터링 3. Cluster 운영 실무3.1. 모니터링 및 유지보수 # pcs status 형식) 목적 RHEL7 클러스터 인프라 구성 상태를 정확히 확인하고 주기적으로 체크해야 할 사항을 리스트 대상 RHEL7 클러스터 인프라 전체 조치 개요 리소스 정보, Stonith 정보 등을 주기적으로 확인 조치 상세 클러스터 정보 확인에는 pcs status 를 이용합니다.
  • 47. 47 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Online: [ node1-HB node2-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node2-HB node2-CO (stonith:fence_ilo4): Started node2-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# 3. Cluster 운영 실무3.1. 모니터링 및 유지보수 3.1.1. 기본 모니터링
  • 48. 48 3.1.2. HA 노드 하드웨어 유지보수 3.1. 모니터링 및 유지보수 3. Cluster 운영 실무 목적 클러스터 노드의 하드웨어 펌웨어나 커널/보안 업데이트 시 필요한 노드 reboot 시 서비스 downtime 최 소화 대상 RHEL7 클러스터의 모든 노드 조치 개요 pcs 커맨드라인의 standby/unstandby mode를 이용 조치 상세 Pacemaker는 중요 클러스터 노드를 standby mode로 전환하는 것을 허용합니다. 클러스터 노드가 standby mode가 되면 그 노드는 클러스터 리소스와 서비스를 더 이상 제공할 수 없습니다. standby mode는 클러스터 노드의 유지보수 동작에 유용합니다. # pcs cluster standby [<node>] | --all 형식) # pcs cluster unstandby [<node>] | --all
  • 49. 49 3.1.2. HA 노드 하드웨어 유지보수 3.1. 모니터링 및 유지보수 3. Cluster 운영 실무 Active node Standby node Active node Standby node Active node Active nodeStandby node Active node Standby node Active node # pcs cluster standby node2-HB # pcs cluster start node2-HB # pcs cluster unstandby node2-HB # pcs cluster standby node1-HB # shutdown -r now # shutdown -r now # pcs cluster start node1-HB standby mode resources movement 범 례
  • 50. 50 3.1.2. HA 노드 하드웨어 유지보수 3.1. 모니터링 및 유지보수 3. Cluster 운영 실무 Active nodeStandby nodeActive node Standby node Active nodeStandby node Active nodeStandby node # pcs cluster standby node2-HB Active node Standby node # pcs cluster unstandby node1-HB # pcs cluster unstandby node2-HB standby mode resources movement 범 례
  • 51. 51 3. Cluster 운영 실무 목적 active node가 fail되어 모든 resource가 original standby node로 failover되어 운영 중인 상태에서 current active node fail 시 resource가 failback되지 않도록 함, original active node로는 오직 manual failback만이 가능하도록 함 대상 failover되었을 때의 original active node에 설정 조치 개요 original standby node에 resource가 failover되어 있는 상태에서 pcs constraint 커맨드로 original active node에 –INFINITY 스코어의 location constraint를 설정합니다. 조치 상세 original standby node에 resource가 failover되어 있는 상태에서 original active node를 클러스터에 re- join 시킨 후 모든 resource에 대해 original active node에 resource move를 방지하는 constraint 설정을 합니다. # pcs constraint location add <id> <resource id> <original active node> -INFINITY 이제 original standby node를 fail시키면 모든 resource는 failback되지 않고 Stopped status를 유지합니 다. fail시킨 original standby node를 클러스터에 re-join시키면 모든 resource가 auto start됩니다. ※ resource-stickiness value가 INFINITY가 아니되, location constraints score보다 높도록 사전 설정되 어 있는 시스템에만 위 조치 방법이 유효합니다. https://access.redhat.com/solutions/739813 # pcs constraint location add <id> <resource id> <original active node> -INFINITY 형식) 3.1. 모니터링 및 유지보수 3.1.3. never fallback 설정 및 운영
  • 52. 52 3.1. 모니터링 및 유지보수 3. Cluster 운영 실무 Active node Standby node Active node # pcs constraint location add location-data1-on-node1-HB data1 node1-HB -INFINITY # pcs constraint location add location-data2-on-node1-HB data2 node1-HB -INFINITY # pcs constraint location add location-data3-on-node1-HB data3 node1-HB -INFINITY # pcs constraint location add location-data4-on-node1-HB data4 node1-HB -INFINITY # pcs constraint location add location-VirtualIP-on-node1-HB VirtualIP node1-HB -INFINITY Active nodeStandby nodeStandby node Stopped # pcs cluster start node1-HB 3.1.3. never fallback 설정 및 운영 standby mode resources movement 범 례 node failure
  • 53. 53 3.1. 모니터링 및 유지보수 3. Cluster 운영 실무 Standby node Stopped # pcs cluster start node2-HB Active nodeStandby node Active nodeStandby node Active nodeStandby node # pcs cluster standby node2-HB Active node Standby node Active node Standby node# pcs cluster unstandby node2-HB # pcs constraint location remove location-data1-on-node1-HB # pcs constraint location remove location-data2-on-node1-HB # pcs constraint location remove location-data3-on-node1-HB # pcs constraint location remove location-data4-on-node1-HB # pcs constraint location remove location-VirtualIP-on-node1-HB 3.1.3. never fallback 설정 및 운영 원복 완료 standby mode resources movement 범 례 node failure
  • 54. 54 3. Cluster 운영 실무3.2. 장애 처리 3.2.1. on-fail=ignore 옵션과 함께 생성한 resource가 fail되었을 시 복구 목적 on-fail=ignore 옵션과 함께 생성한 resource가 fail되었을 시 해당 resource를 복구한 후 클러스터에 올바 르게 enable시키기 대상 RHEL7 클러스터의 모든 resource (파일시스템, VIP, 어플리케이션) 조치 개요 resource 복구 후 crm_resource –C(clear) 커맨드 이용하여 error message를 clear 조치 상세 파일시스템 / VIP / 어플리케이션이 fail되었을 시 해당 resource의 fail을 ignore하도록 설정한 Pacemaker 클러스터에서는 pcs status로 확인 시 “Failed actions:” 섹션에 fail 사유가 출력됩니다. 해 당 resource를 복구한 뒤 crm_resource –C(clear) 커맨드 이용하여 error messages를 clear합니다. 파일시스템 복구 : mount <device name> <mount point> VIP 복구 : ip addr add <ip address/netmask> dev <interface> 어플리케이션(LSB Compliant Script) 복구 : /etc/init.d/<script name> start 이후 아래 커맨드로 error messages를 clear # crm_resource –C # crm_resource –C 형식) # vi /var/lib/pacemaker/cib/cib.xml ※ resource의 on-fail="ignore" 옵션 설정 유무 확인 시 /var/lib/pacemaker/cib/cib.xml 참고
  • 55. 55 3. Cluster 운영 실무 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node2-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Online: [ node1-HB node2-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB (failure ignored) data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node2-HB node2-CO (stonith:fence_ilo4): Started node2-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# 문제 해결 : fail된 파일시스템의 문제를 해결하였으면 정상적으로 mount되어 있는 상태에서 위의 에러메시지를 clear합니다. # crm_resource –C 만약 fail된 파일시스템 resource 문제를 해결하지 않은 상태에서 위 커맨드를 실행하면 해당 resource는 물론 resource group 내 다른 리소스들까지 모두 fail되므로 주의합니다. 3.2. 장애 처리 3.2.1. 리소스가 fail되었을 경우 문제 설명 : “data1_monitor_60000”의 의미는 resource id가 data1인 파일시스템 리소스가 fail(여기서는 강제 umount하여 임의로 fail 유발)되어 나타난 에러메시지로 60000은 “interval 60 seconds(default)”를 의미합니다. “failure ignored”는 “ on-fail=ignore (resource fail이 발생하더라도 failover를 일으키지 않고 무시하도록 하는 설정)”옵션을 주어 생성한 리소스에 실제 fail이 발생했을 경우 나타나는 메시지입니다.
  • 56. 56 3. Cluster 운영 실무3.2. 장애 처리 목적 offline status로 확인되는 노드를 클러스터에 re-join시켜 서비스 고가용성을 확보 대상 RHEL7 클러스터의 모든 노드 조치 개요 클러스터 노드가 fail되어 fencing된 후 pcs status 커맨드로 offline status 확인될 시 해당 노드의 (물리적) 문제를 해결하고 클러스터에 re-join시킨다 조치 상세 resource level의 장애가 아닌 cluster level의 장애가 노드에 발생하면 해당 노드는 STONITH 장치에 의 해 fencing(default: reboot)됩니다. 해당 노드의 (물리적) 문제를 해결한 뒤 클러스터에 re-join시키기 위해 pcs 커맨드라인의 cluster 파라미터를 이용합니다. # pcs cluster start <node> | --all 형식) 3.2.2. offline 상태의 node를 클러스터에 re-join
  • 57. 57 3. Cluster 운영 실무 [root@node1 ~]# pcs status Cluster name: cluster Last updated: Mon Nov 23 16:33:37 2015 Last change: Mon Nov 23 16:25:01 2015 by root via crm_resource on node1-HB Stack: corosync Current DC: node1-HB (version 1.1.13-a14efad) - partition with quorum 2 nodes and 8 resources configured Node node2-HB (2): OFFLINE Online: [ node1-HB ] Full list of resources: Resource Group: clustergroup data1 (ocf::heartbeat:Filesystem): Started node1-HB (failure ignored) data2 (ocf::heartbeat:Filesystem): Started node1-HB data3 (ocf::heartbeat:Filesystem): Started node1-HB data4 (ocf::heartbeat:Filesystem): Started node1-HB VirtualIP (ocf::heartbeat:IPaddr2): Started node1-HB APP_SCRIPT (lsb:APP_SCRIPT.sh): Started node1-HB node1-CO (stonith:fence_ilo4): Started node1-HB node2-CO (stonith:fence_ilo4): Started node1-HB PCSD Status: node1-HB: Online node2-HB: Online Daemon Status: corosync: active/disabled pacemaker: active/disabled pcsd: active/enabled [root@node1 ~]# node2가 어떤 원인으로 인해 fail되어 OFFLINE 상태로 있습니다. 원인 분석 및 조치 후 클러스터 노드에 re-join 시키기 위해서 아래와 같이 조치합니다. # pcs cluster start node2-HB 3.2. 장애 처리 3.2.2. offline 상태의 node를 클러스터에 re-join
  • 58. 58 4. 부록 4.1. rgmanager 클러스터 vs pacemaker 클러스터 4.2. 구축용 커맨드 모음 4.3. 운영용 커맨드 모음 4.4. Bug Errata
  • 59. 59 4.1. rgmanager 클러스터 vs pacemaker 클러스터 4. 부록 Configuration Component rgmanager Pacemaker Cluster configuration file 각 노드의 클러스터 구성 파일은 /etc/cluster/cluster.conf이며 이는 필요 시 직접 편집될 수 있습니다. 다른 방법을 원하면 클러 스터 구성을 정의하기 위해 luci 또는 ccs 인터 페이스를 사용하십시오. Cluster와 Pacemaker 구성 파일은 /etc/corosync/corosync.conf 와 /var/lib/pacemaker/cib/cib.xml 입니다. 이 파일을 직접 편집하지 마십시오; 대신 pcs 또는 pcsd 인 터페이스를 사용하십시오. Network setup 클러스터를 구성하기 전에 IP 주소와 SSH를 구 성하십시오. 클러스터를 구성하기 전에 IP 주소와 SSH를 구성 하십시오. Cluster Configuration Tools luci, ccs 커맨드, cluster.conf 파일 manual 편 집 pcs 또는 pcsd Installation rgmanager 설치(ricci, luci, resource, fencing agents에 의존성을 가짐). 필요 시 lvm2-cluster 와 gfs2-utils 설치 pcs와 fencing agents 설치. 필요 시 lvm2-cluster 와 gfs2-utils 설치 출처 https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/High_Availability_Add-On_Reference/ap-ha-rhel6-rhel7-HAAR.html
  • 60. 60 4. 부록 Configuration Component rgmanager Pacemaker Starting cluster services 아래의 과정대로 클러스터 서비스 시작과 활성 화 1. cman, rgmanager 시작. 필요 시 clvmd와 gfs2 시작합니다. 2. luci 인터페이스 사용 시 ricci 시작하고 luci 시작합니다. 3. chkconfig on 실행하여 각 노드 실행 시에 시 작되도록 합니다. 선택사항으로 cluster service를 시작하고 활성 화를 위해 ccs --start를 실행할 수 있습니다 아래의 과정대로 클러스터 서비스 시작과 활성화 1. 모든 노드에서 systemctl start pcsd.service 실 행한 뒤 각 노드 실행 시에 시작되도록 하기 위해 systemctl enable pcsd.service 실행합니다. 2. corosync와 pacamaker를 시작하기 위해 클러 스터의 한 노드에서 pcs cluster start --all 실행합 니다. Controlling access to configuration tools luci를 위해, root 사용자나 luci 퍼미션을 가진 사용자는 luci에 액세스할 수 있습니다. 모든 액 세스는 노드를 위한 ricci 패스워드를 필요로 합 니다. pcsd gui는 hacluster 사용자의 인증을 요구합니 다. hacluster는 공통 시스템 사용자입니다. root 사용자는 hacluster의 패스워드를 세팅할 수 있습 니다. 4.1. rgmanager 클러스터 vs pacemaker 클러스터
  • 61. 61 4. 부록 Configuration Component rgmanager Pacemaker Cluster creation luci나 ccs 또는 cluster.conf를 직접 수정하는 방법을 써서 클러스터의 이름을 짓고 어떤 노드 를 클러스터에 포함시킬지 정의하십시오. pcs cluster setup 커맨드나 pcsd Web UI를 써서 클러스터의 이름을 짓고 노드를 포함시키십시오. pcs cluster node add 커맨드나 pcsd Web UI를 사용하여 여러분은 존재하는 클러스터에 노드를 추가할 수 있습니다. Propagating cluster configuration to all nodes luci를 써서 cluser 구성 시, propagation은 자동 으로 이루어집니다. ccs를 쓸 시, --sync 옵션을 사용하십시오. 여러분은 또한 cman_tool version –r 커맨드를 사용할 수 있습니다. 클러스터와 Pacemaker 구성 파일인 corosync.conf와 cib.xml의 propagation은 cluster setup 또는 노드나 resource 추가 시 자동으로 이 루어집니다. 4.1. rgmanager 클러스터 vs pacemaker 클러스터
  • 62. 62 [root@node1 ~]# yum install pcs fence-agents-all [root@node2 ~]# yum install pcs fence-agents-all 4.2. 구축용 커맨드 모음 4. 부록 클러스터용 패키지 설치 [root@node1 ~]# firewall-cmd --permanent --add-service=high-availability [root@node1 ~]# firewall-cmd --add-service=high-availability [root@node1 ~]# firerewall-cmd --list-services --zone=public [root@node2 ~]# firewall-cmd --permanent --add-service=high-availability [root@node2 ~]# firewall-cmd --add-service=high-availability [root@node2 ~]# firerewall-cmd --list-services --zone=public firewalld 설정 – firewalld를 사용할 경우 [root@node1 ~]# systemctl stop firewalld ; systemctl firewalld ; systemctl status firewalld [root@node2 ~]# systemctl stop firewalld ; systemctl firewalld ; systemctl status firewalld firewalld 설정 – firewalld를 사용하지 않을 경우 For TCP: Ports 2224, 3121, 21064 For UDP: Ports 5405 For DLM (if using the DLM lock manager with clvm/GFS2): Port 21064
  • 63. 63 4.2. 구축용 커맨드 모음 4. 부록 [root@node1 ~]# passwd hacluster [root@node2 ~]# passwd hacluster hacluster(pcs 관리자 계정) 계정의 패스워드를 모든 노드에 설정 [root@node1 ~]# systemctl start pcsd.service ; systemctl enable pcsd.service [root@node2 ~]# systemctl start pcsd.service ; systemctl enable pcsd.service 모든 노드의 pcsd daemon 시작 및 enable
  • 64. 64 111.111.111.10 node1 111.111.111.30 cluster-svc 111.111.111.20 node2 # HA heartbeat 192.168.0.10 node1-HB 192.168.0.20 node2-HB # HP iLO 10.0.0.10 node1-CO 10.0.0.20 node2-CO 4. 부록 모든 노드에 클러스터용 네트워크 정보를 /etc/hosts에 동일하게 설정 [root@node1 ~]# pcs cluster auth node1-HB node2-HB 클러스터 각 노드의 hacluster 계정 인증 [root@node1 ~]# pcs cluster setup --start --name cluster node1-HB,node1 node2-HB,node2 RRP(Redundant Ring Protocol)를 사용하도록 cluster setup 4.2. 구축용 커맨드 모음
  • 65. 65 4. 부록 STONITH 설정 - HP iLO4를 사용할 경우 [root@node1 ~]# pcs stonith create node1-CO fence_ilo4 ipaddr="10.0.0.10" login="admin" passwd="passwd" pcmk_host_list="node1-CO" action=reboot op monitor interval=30s [root@node1 ~]# pcs stonith create node2-CO fence_ilo4 ipaddr="10.0.0.20" login="admin" passwd="passwd" pcmk_host_list="node2-CO" action=reboot op monitor interval=30s 4.2. 구축용 커맨드 모음 STONITH 설정 - Red Hat Enterprise Virtualization Manger 3.4 Fencing을 사용할 경우 [root@node1 ~]# pcs stonith create rhevfence fence_rhevm pcmk_host_list="node1,node2" pcmk_host_map="node1:osc-RHEL7.1_HA_node1;node2:osc-RHEL7.1_HA_node2" ipaddr=192.168.0.250 login=admin@internal passwd=passwd ssl=1 ssl_insecure=1 action=reboot op monitor interval=30s ※ How to configure stonith agent 'fence_rhevm' in RHEL cluster with pacemaker. https://access.redhat.com/solutions/891523 ※ fence_rhevm fails to fence a node with error "Peer's certificate issuer has been marked as not trusted by the user" or "No route to host" in RHEL 7 https://access.redhat.com/solutions/870603
  • 66. 66 4. 부록 resource 추가 – FileSystem (on-fail=ignore 옵션 추가) [root@node1 ~]# pcs resource create data1 Filesystem device=/dev/vgha01/data1 directory=/data1 fstype=xfs --group clustergroup op monitor on-fail=ignore [root@node1 ~]# pcs resource create data2 Filesystem device=/dev/vgha01/data2 directory=/data2 fstype=xfs --group clustergroup op monitor on-fail=ignore [root@node1 ~]# pcs resource create data3 Filesystem device=/dev/vgha01/data3 directory=/data3 fstype=xfs --group clustergroup op monitor on-fail=ignore [root@node1 ~]# pcs resource create data4 Filesystem device=/dev/vgha01/data4 directory=/data4 fstype=xfs --group clustergroup op monitor on-fail=ignore 4.2. 구축용 커맨드 모음 [root@node1 ~]# pcs resource create VirtualIP IPaddr2 ip=111.111.111.30 cidr_netmask=24 nic=bond0 --group clustergroup op minitor interval=30s resource 추가 – VIP [root@node1 ~]# pcs resource create APP_SCRIPT lsb:APP_SCRIPT.sh --group clustergroup op monitor on-fail=ignore resource 추가 – LSB-compliant custom script (on-fail=ignore 옵션 추가) ※ 스크립트를 /etc/init.d/ 에 위치시킨 뒤 실행해야 한다
  • 67. 67 4. 부록 [root@node1 ~]# pcs stonith update node1-CO delay=5 heartbeat network와 fence network가 분리된 환경에서 Fence Races 또는 Fence Death 예방하기 위해 Delaying Fencing 적용 4.2. 구축용 커맨드 모음 ※ Delaying Fencing in a Two Node Cluster to Prevent Fence Races or "Fence Death" Scenarios https://access.redhat.com/solutions/54829 [root@node1 ~]# pcs property set default-resource-stickiness=1000 [root@node1 ~]# pcs constraint location add location-data1-on-node1-HB data1 node1-HB 100 [root@node1 ~]# pcs constraint location add location-data2-on-node1-HB data2 node1-HB 100 [root@node1 ~]# pcs constraint location add location-data3-on-node1-HB data3 node1-HB 100 [root@node1 ~]# pcs constraint location add location-data4-on-node1-HB data4 node1-HB 100 [root@node1 ~]# pcs constraint location add location-VirtualIP-on-node1-HB VirtualIP node1-HB 100 [root@node1 ~]# pcs constraint location add location-APP_SCRIPT-on-node1-HB APP_SCRIPT node1-HB 100 auto failback 방지 설정(location constraints 설정) ※ 'pcs resource move' does not have any effect when using resource-stickiness=infinity on a resource or resource group with pacemaker in RHEL 6 or 7 https://access.redhat.com/solutions/739813
  • 68. 68 4. 부록 # pcs status 클러스터 동작 상태 확인 4.3. 운영용 커맨드 모음 # cat /var/lib/pacemaker/cib/cib.xml 클러스터 구성 정보 확인 # pcs cluster standby <current active node> resource를 move하기 # pcs cluster unstandby <current standby node> # pcs cluster start <current offline node> | --all offline 상태의 노드를 cluster에 re-join
  • 69. 69 4. 부록 # pcs constraint --full resource constraints 정보 확인 4.3. 운영용 커맨드 모음 # pcs constraint –full # pcs constraint remove <id> resource constraints 중 원하는 constraints 삭제 # systemctl start pcsd pcsd 서비스 시작 ※ constraints 정보는 임의로 변경하지 마십시오. 필요 시 전문가의 가이드를 받거나 constraints에 대해 충분히 이해한 뒤에 적용하십시오. # pcs resource update <resource id> <options> resource 옵션 변경
  • 70. 70 4. 부록4.4. Bug Errata 증상 RHEL 7.1 High Availability Add On의 default 패키지 설치된 환경에서 fencing 실패 # fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L ADMINISTRATOR chassis power status 1 Error in open session response message : no matching cipher suite Error: Unable to establish IPMI v2 / RMCP+ session Unable to get Chassis Power Status Failed: Unable to obtain correct plug status or plug is not available 환경 하드웨어 : HP ProLiant DL380 Gen9 운영체제 및 패키지: Red Hat Enterprise Linux 7.1 with the High Availability Add On or before fence-agents-ipmilan-4.0.11-10.el7.x86_64 or before 원인 RHEL 7 Update 1에서, ipmitools가 새로운 기본 cipher를 사용하도록 업데이트되었습니다. 업데이트된 이번 cipher는 특정 하드웨어와 호환되지 않을 수 있어 fence_ipmilan은 관리자나 사용자가 cipher 값을 지정하여 ipmitools을 사용하는 방법을 더 이상 필요로 하지 않습니다. bug fix 전 cipher의 default 값은 0이며 fix 후 cipher의 default 값이 3으로 변경되었습니다. 4.4.1. Fencing with fence_ipmilan fails in RHEL7
  • 71. 71 진단 1) BEFORE fix - fence_ipmilan default cipher was set to 0 # rpm -q fence-agents-ipmilan fence-agents-ipmilan-4.0.11-10.el7.x86_64 # fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L ADMINISTRATOR chassis power status 1 Error in open session response message : no matching cipher suite Error: Unable to establish IPMI v2 / RMCP+ session Unable to get Chassis Power Status Failed: Unable to obtain correct plug status or plug is not available 4. 부록4.4. Bug Errata 4.4.1. Fencing with fence_ipmilan fails in RHEL7
  • 72. 72 진단 2) AFTER fix - default cipher not set, ipmitool default version used (-C 3) # rpm -q fence-agents-ipmilan fence-agents-ipmilan-4.0.11-11.el7_1.x86_64 # fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON # fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd -C 0 Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 0 -p 623 -L ADMINISTRATOR chassis power status 1 Error in open session response message : no matching cipher suite Error: Unable to establish IPMI v2 / RMCP+ session Unable to get Chassis Power Status Failed: Unable to obtain correct plug status or plug is not available # fence_ipmilan -P -a 10.0.0.10 -o status -v -l admin -p passwd -C 3 Executing: /usr/bin/ipmitool -I lanplus -H 10.0.0.10 -U admin -P passwd -C 3 -p 623 -L ADMINISTRATOR chassis power status 0 Chassis Power is on Status: ON 4. 부록4.4. Bug Errata 4.4.1. Fencing with fence_ipmilan fails in RHEL7
  • 73. 73 조치 아래의 패키지들로 업데이트(서로 의존성 가짐) fence-agents-ipmilan-4.0.11-11.el7_1 or later fence-agents-common-4.0.11-11.el7_1 or later fence-agents-scsi-4.0.11-11.el7_1 or later fence-agents-all-4.0.11-11.el7_1 or later 참고 https://access.redhat.com/solutions/1410613 4. 부록4.4. Bug Errata 4.4.1. Fencing with fence_ipmilan fails in RHEL7