°Ô½Ã¹° 51°Ç
   
[RHEL7.6] RHCS ±¸Ãà - VIP, LVM, HTTPD [ pacemaker ]
±Û¾´ÀÌ : theko ³¯Â¥ : 2019-08-05 (¿ù) 15:37 Á¶È¸ : 3402
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 »ý¼º ÀÛ¾÷
- ¸®¼Ò½º »ý¼º¿¡´Â OCFS¿Í LSB µÎ°¡Áö ¹æ¹ýÀÌ ÀÖ´Ù. 

LSB´Â /etc/init.d ¹Ø¿¡ ÆÄÀÏ·Î »ç¿ëÇÒ¶§, ±×¿Ü´Â OCFS¶ó°í º¸¸é µÈ´Ù.

==OCFS
# 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 create httpd ocf:heartbeat:apache configfile="/etc/httpd/conf/httpd.conf" --group svc_httpd op monitor interval=30s

==LSB
# pcs resource create mysql lsb:mysqld
// lsb ´ÙÀ½¿¡ ºÙ´Â ¹®ÀÚ¿­Àº /etc/init.d/¹Ø¿¡ÀÖ´Â ÆÄÀϸí


# pcs resource group add svc_httpd  vip vg_data fs-httpd
//¸®¼Ò½ºµéÀ» group ¿¡ ³Ö´Â ÀÛ¾÷




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
ex)  fence_kdump_nodes 10.10.10.111

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