게시물 42건
   
[RHEL7.6] RHCS 구축 - VIP, LVM, HTTPD [ pacemaker ]
글쓴이 : theko 날짜 : 2019-08-05 (월) 15:37 조회 : 18
1. pcsd daemon 설정 및 구동

echo rplinux | passwd --stdin hacluster
systemctl start pcsd.service
systemctl enable pcsd.service

2. Cluster node 설정 및 Corosync 구동
pcs cluster auth rhcs7-01 rhcs7-02 -u hacluster -p rplinux
pcs cluster setup --start --name node rhcs7-01 rhcs7-02 --token 15000 --join 100
pcs cluster start --all


3. Cluster 정책 설정

pcs property set stonith-enabled=false
pcs resource defaults resource-stickiness=1000   
pcs property set maintenance-mode=true
pcs resource defaults migration-threshold=1

4. HA-LVM 사전 작업 // 1.2번서버 모두 작업
1) lvmconf --enable-halvm  --services --startstopservices
--------------------------------------------
명렁어 결과

/usr/bin/systemctl disable lvm2-lvmetad.service
/usr/bin/systemctl stop lvm2-lvmetad.service
/usr/bin/systemctl disable lvm2-lvmetad.socket
/usr/bin/systemctl stop lvm2-lvmetad.socket

/etc/lvm/lvm.conf
use_lvmetad = 1 → 0 변경
-------------------------------------------


2) vi /etc/lvm.conf  
수정사항
※ Local VG만 volume_list 에 기입한다. shared vg는 추가하지 않음. Local vg 없는 경우에는 공백으로 처리

#volume_list = [ "vg1", "vg2/lvol1", "@tag1", "@*" ]

volume_list = [ "LocalVG"] or volume_list = [ ]

3) dracut -f -v

5. Resource 추가
# pcs resource create vip ocf:heartbeat:IPaddr2 ip=10.65.10.113 cidr_netmask=24 nic=ens3 op monitor interval=30s timeout=45s
# pcs resource create vg_data LVM volgrpname=vg_data volume_group_check_only=True exclusive=true  op monitor interval=30 timeout=60 on-fail=fence
# pcs resource create fs-httpd ocf:heartbeat:Filesystem device=/dev/vg_data/lv_data directory=/data fstype=xfs  op monitor interval=45 timeout=60 OCF_CHECK_LEVEL=20
# pcs resource group add svc_httpd  vip vg_data fs-httpd

# pcs resource create httpd ocf:heartbeat:apache configfile="/etc/httpd/conf/httpd.conf" --group svc_httpd op monitor interval=30s



6. Node 우선 순위 제한 설정
# pcs constraint  location svc_httpd prefers rhcs7-01=1000
# pcs constraint  location svc_httpd prefers rhcs7-02=500

7. Fence Device 설정
pcs stonith create ipmi1 fence_ipmilan  pcmk_host_list="rhcs7-01" ipaddr=10.65.10.110 delay=15 ipport="7000"login=admin passwd=rplinux lanplus=on auth=password op monitor interval=1800s

pcs stonith create ipmi2 fence_ipmilan  pcmk_host_list="rhcs7-02" ipaddr=10.65.10.110 ipport="7000" login=admin passwd=rplinux lanplus=on auth=password op monitor interval=1800s

pcs stonith create fence_kdump fence_kdump pcmk_reboot_action="off" pcmk_host_list="rhcs7-01;rhcs7-02" timeout="30" pcmk_off_retries=1

=============================================================
//Fence 설명
# fence_ipmilan --help
-u, --ipport=[port]            TCP/UDP port to use (default 623)
//ILO 및 idrac 등은 기본적으로 623포트사용

// VBMC 구축시 포트를 7000으로 설정했음
fence_ipmilan  -A password -P -a 10.65.10.100 -u 7000 -l admin -p rplinux -o status
=============================================================


8. Fence Kdump 설정
vi /etc/kdump.conf
fence_kdump_nodes (상대편node Heartbeat IP)
fence_kdump_args -p 7410 -i 1

systemctl  restart kdump.service

9. Fence 우선순위 지정 
# pcs stonith level add 1 rhcs7-01 fence_kdump
# pcs stonith level add 1 rhcs7-02 fence_kdump

# pcs stonith level add 2 rhcs7-01 ipmi1
# pcs stonith level add 2 rhcs7-02 ipmi2

10. Fence agent Rule 지정
# pcs constraint location ipmi1 avoids rhcs7-01
# pcs constraint location ipmi2 avoids rhcs7-02

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

miwit.com sir.co.kr DNS Powered by DNSEver.com DNS Powered by DNSEver.com