°Ô½Ã¹° 52°Ç
 
RHEL8.4 pacemaker ¼³Ä¡ ¹× ¸í·É¾îµî Á¤¸®
±Û¾´ÀÌ : theko ³¯Â¥ : 2026-06-19 (±Ý) 15:28 Á¶È¸ : 22
> create repository
[high-availability]
name = High Availability
baseurl==file:///home/rhel8/
enabled=1
gpgkey=0


> ȯ°æÁ¤º¸ RHEL8.4
node1.example.com
192.168.122.201
192.168.50.201

node2.example.com
192.168.122.202
192.168.50.202

- ¹æÈ­º® ÁßÁö
[root@node01 ~]# systemctl stop firewalld.service
[root@node02 ~]# systemctl stop firewalld.service


-  /etc/hosts ¼³Á¤ (both)
[root@node01 ~]# vi /etc/hosts

192.168.122.201 node1
192.168.122.202 node2

192.168.50.201  nodehb1
192.168.50.202  nodehb2


[root@node02 ~]# vi /etc/hosts

192.168.122.201 node1
192.168.122.202 node2

192.168.50.201  nodehb1
192.168.50.202  nodehb2


-------subscription µî·Ï---------------Optional--------------------------------------------------------------------------
# subscription-manager register --auto-attach
# subscription-manager repos --disable=*
# subscription-manager repos --enable=rhel-8-for-x86_64-highavailability-rpms
# subscription-manager repos --enable=rhel-8-for-x86_64-baseos-rpms
# subscription-manager repos --enable=rhel-8-for-x86_64-appstream-rpms
------------------------------------------------------------------------------------------------
*Âü°í https://access.redhat.com/documentation/ko-kr/red_hat_enterprise_linux/8/html/deploying_red_hat_enterprise_linux_8_on_public_cloud_platforms/azure-install-red-hat-ha-packages-and-agents_configuring-rhel-high-availability-on-azure


1.  pacemaker install(both)
# yum install pcs pacemaker fence-agents-all


2. pcs start : (both)
# systemctl start pcsd
# systemctl enable pcsd

----------------optional----------------------------------------------------------------------------------------------
firewalld µ¥¸óÀ» ½ÇÇàÇÏ´Â °æ¿ì Red Hat High Availability Add-On¿¡ ÇÊ¿äÇÑ Æ÷Æ®¸¦ Ȱ¼ºÈ­ÇÕ´Ï´Ù.
# firewall-cmd --permanent --add-service=high-availability
(# firewall-cmd --add-service=high-availability)
# firewall-cmd --reload
---------------------------------------------------------------------------------------------------

3. hacluster  ÆÐ½º¿öµå º¯°æ(both)
# echo redhat | passwd --stdin hacluster

4. Cluster node ¼³Á¤ ¹× Corosync ±¸µ¿
[root@node01 ~]#pcs host auth nodehb1 nodehb2 -u hacluster -p redhat

5. cluster »ý¼º ¹× ½ÃÀÛ
[root@node01 ~]# pcs cluster setup --start my_cluster nodehb1 nodehb2 totem token=10000 join=100
                                                                                             _ _ _ _ _ _ _ _ _ __ _ _ _ __ __ _ _
Or
(pcs cluster config update transport knet_pmtud_interval=35 totem token=10000 join=100)

[root@node01 ~]# pcs cluster start --all

- ³ëµå°¡ ºÎÆÃµÉ ¶§ Ŭ·¯½ºÅÍÀÇ °¢ ³ëµå¿¡¼­ Ŭ·¯½ºÅÍ ¼­ºñ½º¸¦ ½ÇÇàÇϵµ·Ï Ŭ·¯½ºÅÍ ¼­ºñ½º¸¦ Ȱ
¼ºÈ­ÇÕ´Ï´Ù
# pcs cluster enable --all


6. Cluster ±âº» ¼³Á¤  

> ¸®¼Ò½º µî·Ï ½Ã fence device ÀÛµ¿ ¹æÁö
# pcs property set stonith-enabled=false 

# pcs property set stonith-enabled=true

- Àå¾Ö ó¸® ÈÄ ¸®¼Ò½º À̵¿ ¹æÁö ¼³Á¤
# pcs resource defaults update resource-stickiness=1000

- Quorum ¼³Á¤ 
# pcs property set no-quorum-policy=stop

Äõ·³ »ç¿ë½Ã¿¡´Â suicide
# pcs property set no-quorum-policy=suicide


----------------------------------------------
・ignore : ¹«½Ã(¸ðµç ³ëµå°¡ Äõ·³À» °¡Áö°íÀÖ´Â °ÍÀ¸·Î¼­ ¸®¼Ò½º°ü¸®¸¦ ÇϱâÇØ, ºÐ´ÜµÈ ¸ðµç ³ëµå¿¡¼­ ¼­ºñ½º¸¦ °¡µ¿ÇÑ´Ù.)
・freeze : ¾Æ¹«°Íµµ ÇÏÁö¾ÊÀ½
・stop : Ŭ·¯½ºÅÍÀÇ ºÐ´Ü¿¡ ¿µÇâÀ» ¹Þ´Â ¸ðµç ¸®¼Ò½º¸¦ Á¤Áö
・suicide : Ŭ·¯½ºÅÍÀÇ ºÐ´Ü¿¡ ¿µÇâÀ» ¹Þ´Â ¸ðµç ³ëµå¸¦ Ææ½Ì
------------------------------------------------






- ¸®¼Ò½º¸¦ »ý¼ºÇÒ ¶§ ÇØ´ç ¸®¼Ò½º¿¡ ´ëÇÑ migration-threshold ¿É¼ÇÀ» ¼³Á¤ÇÏ¿© Á¤ÀÇµÈ ½ÇÆÐ Ƚ¼ö ÈÄ¿¡
  »õ ³ëµå·Î À̵¿Çϵµ·Ï ¸®¼Ò½º¸¦ ±¸¼ºÇÒ ¼ö ÀÖ½À´Ï´Ù
# pcs resource defaults update migration-threshold=1

- Ŭ·¯½ºÅ͸¦ À¯Áö °ü¸® ¸ðµå·Î ÀüȯÇÏ·Á¸é ´ÙÀ½ ¸í·ÉÀ» »ç¿ëÇÏ¿© maintenance-mode Ŭ·¯½ºÅÍ ¼Ó¼ºÀ»
true ·Î ¼³Á¤ÇÕ´Ï´Ù 
# pcs property set maintenance-mode=true
( À§ ¸í·É¾î¸¦ ÇÏ¸é ¸ðµÎ unmanaged·Î º¯ÇÏ°Ô µÊ. ¼­ºñ½º ½ÃÀÛÀ̾ȉÎ...±×·³ 
# pcs property unset maintenance-mode ¸í·É¾î·Î ÇØ¼Ò)

- ¼ÂÆÃ È®ÀÎ
# pcs property show 


--------LVM »ý¼º½Ã Âü°í------------------
>  lvm.conf ¼³Á¤  
# vim /etc/lvm/lvm.conf
system_id_source = "uname"

# lvm systemid
  system ID: z1.example.com
# uname -n
  z1.example.com
---------------------------------------------

7. HALVM »ý¼º ¶Ç´Â HALVM ¼³Á¤

# pvcreate /dev/sda1
# vgcreate --setautoactivation n vg_cluster /dev/sda1     <<<< RHEL8.5 ÀÌ»ó °¡´É (lvm2-2.03.12-1.el8 later)
(or # vgcreate my_vg /dev/sdb1   << RHEL8.4 ÀÌÇÏ )

*»ý¼º ÁßÀÎ LVM º¼·ý¿¡
±âÁ¸ º¼·ý ±×·ìÀ» »ç¿ëÇÏ´Â °æ¿ì º¼·ý ±×·ì¿¡ 

# vgchange --setautoactivation n my_vg

¸í·ÉÀ» »ç¿ëÇÏ¿© ÀÌ Ç÷¡±×¸¦ Àç¼³Á¤ÇÒ ¼ö ÀÖ½À´Ï´Ù.

# vgs -o+systemid
# lvcreate -l 100%FREE -n lv_cluster vg_cluster
# lvs
# mkfs.xfs /dev/vg_cluster/lv_cluster

> Ȱ¼ºÈ­ »óÅ ȮÀÎ
#lvs -o +autoactivation




8. Resource µî·Ï ¹× È®ÀÎ

-¸®¼Ò½º µî·Ï ¹× È®ÀÎ
# pcs resource

> VIP
# pcs resource create vip ocf:heartbeat:IPaddr2 ip=192.168.122.210 cidr_netmask=24 nic=enp1s0 op monitor interval=30s timeout=45s
# pcs resource create vip IPaddr2 ip=192.168.122.210 cidr_netmask=24 --group svc_httpd

>LVM µî·Ï
# pcs resource create vg_cluster LVM-activate vgname=vg_cluster vg_access_mode=system_id --group svc_httpd

´Ù¸¥¿¹½Ã)
pcs resource create halvm ocf:heartbeat:LVM-activate vgname=vg00 activation_mode=exclusive vg_access_mode=system_id op monitor interval=60 timeout=120 on-fail=fence --group=svc

> Filesystem 
# pcs resource create fs-httpd ocf:heartbeat:Filesystem device=/dev/vg_cluster/lv_cluster directory=/httpd fstype=xfs  op monitor interval=45 timeout=60 OCF_CHECK_LEVEL=20 --group svc_httpd

> APP µî·Ï
. OCF Çü½Ä
# pcs resource create httpd ocf:heartbeat:apache configfile="/etc/httpd/conf/httpd.conf" --group svc_httpd op monitor interval=30s

. LSB Çü½Ä
# pcs resource create LSB_APP lsb:chrony op monitor interval=30s --group svc_httpd



------------DB µî·Ï ¿¹½Ã ------------------------------------------------
- ½ÇÇà APP ½ºÅ©¸³Æ® µî·Ï½Ã 
ex) 
# pcs resource create mariadb ocf:heartbeat:mysql binary="/usr/bin/mysqld_safe" socket="/data/mariadb/mysql.sock" config="/etc/my.cnf" datadir="/data/mariadb" op start timeout=60s op stop timeout=60s op monitor interval=20 timeout=30

µî·ÏÇÒ Pacemaker ¸®¼Ò½º À̸§ : mariadb
MariaDB ¼ÒÄÏ À§Ä¡ : /data/mariadb/mysql.sock
MariaDB µð·ºÅ丮 À§Ä¡ : /data/mariadb
--------------------------------------------------------------------------


> resource ±×·ìÈ­
# pcs resource group add svc_httpd vip vg_sh fs-httpd


9. Node ¿ì¼± ¼øÀ§ Á¦ÇÑ ¼³Á¤
# pcs constraint  location svc_httpd prefers nodehb1=1000
# pcs constraint  location svc_httpd prefers nodehb2=500
------------»ç¿ë¹ý----------------------------------------------------------------------
# pcs constraint
 .score È®ÀÎ

# pcs constraint show --full
Location Constraints:
Ordering Constraints:
  Resource Sets:
    set ClusterIP ClusterIP1 ClusterIP2 (id:pcs_rsc_set) (id:pcs_rsc_order)
    set ClusterIP1 ClusterIP2 ClusterIP (id:pcs_rsc_set-1) (id:pcs_rsc_order-1)

# pcs constraint remove pcs_rsc_order
# pcs constraint remove pcs_rsc_order-1
----------------------------------------------------------------------------------------

10. Fence Device ¼³Á¤


  10.1) Fence Device ¼³Á¤(vbmc ¼³Á¤½Ã)

- Connetc test
fence_ipmilan  -A password -P -a 192.168.122.1 -u 7000 -l ipmiadmin -p redhat -o status

# 1¹ø ³ëµå
pcs stonith create ipmi1 fence_ipmilan  pcmk_host_list="RHEL84-ex436-node1" ip=192.168.122.1 delay=15 ipport="7000" username=ipmiadmin password=redhat lanplus=on auth=password op monitor interval=1800s 
# 2¹ø ³ëµå 
pcs stonith create ipmi2 fence_ipmilan  pcmk_host_list="RHEL84-ex436-node2" ip=192.168.122.1 ipport="7001" username=ipmiadmin password=redhat lanplus=on auth=password op monitor interval=1800s 


   10.2) Configure device in stonith-ng (SCSI fence)

> ¿©·¯ ÀåÄ¡¸¦ ÁöÁ¤ÇÒ ¶§ ½°Ç¥·Î ±¸ºÐ ,ÇϽʽÿÀ
# pcs stonith create scsi fence_scsi pcmk_host_list="node1.example.com node2.example.com" pcmk_reboot_action="off" devices="/dev/mapper/mpathb,/dev/mapper/mpathc" meta provides="unfencing" --force

ex) 
pcs stonith create scsi fence_scsi pcmk_host_list="RHEL84-ex436-node1 RHEL84-ex436-node2" pcmk_reboot_action="off" devices="/dev/sdb" meta provides="unfencing" --force

> not used HALVM
# pcs stonith create scsi fence_scsi pcmk_host_list="node1.example.com node2.example.com" pcmk_reboot_action="off" meta provides="unfencing" --force

> Used HALVM
# pcs stonith create scsi fence_scsi pcmk_host_list="RHEL84-ex436-node1 RHEL84-ex436-node2" pcmk_reboot_action="off" devices="/dev/mapper/mpathb,/dev/mapper/mpathc" meta provides="unfencing" --force


>update ·Î ÀÌ¹Ì »ý¼ºµÈ ¸ñ·ÏÀ» º¯°æÇÒ ¼öµµ ÀÖ½À´Ï´Ù.
# pcs stonith update scsi devices="/dev/mapper/mpathb,/dev/mapper/mpathc"

> È®Àιæ¹ý
# sg_persist -n -i -r -d /dev/mapper/mpathb
  PR generation=0xa0, Reservation follows:
    Key=0xf1070001
    scope: LU_SCOPE,  type: Write Exclusive, registrants only
# sg_persist -n -i -k -d /dev/mapper/mpathb
  PR generation=0xa0, 8 registered reservation keys follow:
    0xf1070002
    0xf1070002
    0xf1070001
    0xf1070001
    0xf1070001
    0xf1070001
    0xf1070002
    0xf1070002



> scsi °¡ Á¤»óÀûÀ¸·Î ÀÛµ¿ ¾ÈµÉ¶§ 
# pcs stonith update scsi pcmk_monitor_action="metadata"

https://access.redhat.com/solutions/1421063



   10.3) Power fence 
# pcs stonith create ipmi1 fence_ipmilan pcmk_host_list="UKISS_DB1.cs" ipaddr="UKISS_DB1.ipmi" login="admin" passwd="rplinux)(87" lanplus=on auth=password delay=15 power_wait=20 op monitor interval=60s timeout=120s

# pcs stonith create ipmi2 fence_ipmilan pcmk_host_list="UKISS_DB2.cs" ipaddr="UKISS_DB2.ipmi" login="admin" passwd="rplinux)(87" lanplus=on auth=password power_wait=20 op monitor interval=60s timeout=120s


    10.4) Kdump ¼³Á¤
# pcs stonith create fence_kdump fence_kdump pcmk_reboot_action="off" pcmk_host_list="RHEL84-ex436-node1;RHEL84-ex436-node2" timeout="30" pcmk_off_retries=1

# touch /etc/kdump.conf
# systemctl restart kdump



-------Fence »ý¼º½Ã Âü°í-------------------------------------------------------------
# pcs stonith list [filter]
#pcs stonith describe [stonith_agent]

# pcs stonith fence node_name

# pcs stonith fence RHEL84-ex436-node2
OR
# fence_ipmilan -a ipaddress -l username -p password -o status
  ex) # fence_ipmilan -A password -P -a 192.168.12.39 -l USERID -p PASSW0RD -o status 

# fence_ipmilan -a ipaddress -l username -p password -o reboot
# fence_ipmilan -a ipaddress -l username -p password -o status -D /tmp/$(hostname)-fence_agent.debug

#fence_ipmilan -A password -P -a 192.168.122.1 -l ipmiadmin -p redhat -o reboot --ipport=7001

ex)
pcs stonith create ipmi1 fence_ipmilan pcmk_host_list="thekoerdb.cs" ipaddr=thekoerdb.ipmi login=thekoerpdb passwd='thekoerpdb!2' lanplus=on auth=password delay=15 power_wait=20 op monitor interval=60s timeout=120s

pcs stonith create ipmi2 fence_ipmilan pcmk_host_list="thekoera1.cs" ipaddr=thekoera1.ipmi login=thekoerpap1  passwd='thekoerpap1@' lanplus=on auth=password power_wait=20 op monitor interval=60s timeout=120s

    ¡Ü Fence device µî·Ï
# pcs stonith create prd_fence fence_ilo5 pcmk_host_list=sjoneprd-hb ipaddr=10.10.10.10 login=admin passwd=password  pcmk_reboot_action=reboot pcmk_monitor_timeout=60s
----------------------------------------------------------------------------------------

È®ÀÎÀÛ¾÷
# lsinitrd /boot/initramfs-$(uname -r)kdump.img | egrep "fence|hosts"


11. Fence ¿ì¼±¼øÀ§ ÁöÁ¤ 
# pcs stonith level add 1 nodehb1 fence_kdump
# pcs stonith level add 1 nodehb2 fence_kdump


 pcs stonith level add 2 nodehb1 ipmi1
 pcs stonith level add 2 nodehb2  ipmi2


12. Fence agent Rule ÁöÁ¤
# pcs constraint location ipmi1 avoids nodehb1
# pcs constraint location ipmi2 avoids nodehb2


----- optional --------------------------
# firewall-cmd --add-port=7410/udp
# firewall-cmd --add-port=7410/udp --permanent
-----------------------------------------


> Test ½Ã³ª¸®¿À

1. filesystem umount
2. service stop 
    . ¼­ºñ½º ÄÉÀ̺í Àýü
    . Heartbeat ÄÉÀ̺í Àýü
3. vip stop
    . ip addr2 
      # ip addr delete 192.168.0.100 dev bond0
4. 



########[¸í·É¾î]###############

# pcs resource move  GROUP_SERVICE  node01
. GROUP_SERVICE ¸¦  node1·Î ¼­ºñ½º Àýü
# pcs property

# pcs resource config svc_httpd

- ¼­ºñ½º°¡ ½ÃÀÛµÇ¾î ´Ù½Ã ½ÇÇàµÇ¸é ½ÇÆÐÇÑ ¸®¼Ò½ºÀÇ ½ÇÆÐ »óŸ¦ »èÁ¦ÇÒ ¼ö ÀÖÀ¸¸ç Ŭ·¯½ºÅÍ »óÅÂ
¸¦ º¼ ¶§ ½ÇÆÐÇÑ ÀÛ¾÷ ¾Ë¸²ÀÌ ´õ ÀÌ»ó Ç¥½ÃµÇÁö ¾Ê½À´Ï´Ù.

# pcs resource cleanup svc_httpd


- ¼­ºñ½º°¡ ½ÇÇà ÁßÀÎ ³ëµå¸¦ ´ë±â ¸ðµå·Î ¼³Á¤ÇÕ´Ï´Ù. Ææ½ÌÀ» ºñȰ¼ºÈ­ÇßÀ¸¹Ç·Î Ŭ·¯½ºÅͰ¡
ÀÌ·¯ÇÑ »óȲ¿¡¼­ º¹±¸ÇÏ´Â µ¥ Ææ½ÌÀÌ ÇÊ¿äÇϹǷΠ³ëµå ¼öÁØ ¿À·ù¸¦ È¿À²ÀûÀ¸·Î ½Ã¹Ä·¹À̼ÇÇÒ
¼ö ¾ø½À´Ï´Ù(¿¹: Àü¿ø ÄÉÀÌºí °¡Á®¿À±â).

# pcs node standby z1.example.com


- Ŭ·¯½ºÅÍ ¼­ºñ½º¸¦ ù ¹øÂ° ³ëµå·Î º¹¿øÇÏ·Á¸é ³ëµå¸¦ standby ¸ðµå¿¡¼­ ÀüȯÇÕ´Ï´Ù. ÀÌ °æ¿ì ÇØ
´ç ³ëµå·Î ´Ù½Ã ¼­ºñ½º¸¦ À̵¿ÇÒ ÇÊ¿ä´Â ¾ø½À´Ï´Ù.

# pcs node unstandby z1.example.com

pcs cluster cib filename ¸í·ÉÀ» »ç¿ëÇÏ¿© ÁöÁ¤µÈ ÆÄÀÏ¿¡ ¿ø½Ã Ŭ·¯½ºÅÍ ±¸¼ºÀ» ÀúÀåÇÒ ¼ö ÀÖ½À´Ï´Ù. ÀÌÀü
¿¡ Ŭ·¯½ºÅ͸¦ ±¸¼ºÇϰí Ȱ¼º CIB°¡ ÀÖ´Â °æ¿ì ´ÙÀ½ ¸í·ÉÀ» »ç¿ëÇÏ¿© ¿ø½Ã xml ÆÄÀÏÀ» ÀúÀåÇÕ´Ï´Ù.
#pcs cluster cib filename

# pcs status
# pcs status resources
# pcs cluster status
# pcs config

# pcs cluster corosync

# pcs resource defaults



>> issue : unmanaged
# pcs property unset maintenance-mode
https://access.redhat.com/solutions/1473623

# pcs property list --all | grep maintenance-mode
# pcs cluster cib | grep maintenance-mode



>>> OCF Resource Agents are found in /usr/lib/ocf/resource.d/$PROVIDER


vbmc add RHEL84-ex436-node1 --port 7000 --username ipmiadmin --password redhat --libvirt-uri=qemu+ssh://root@RHEL84-ex436-node1/system
vbmc add RHEL84-ex436-node2 --port 7002 --username ipmiadmin --password redhat --libvirt-uri=qemu+ssh://root@RHEL84-ex436-node2/system

# vbmc start RHEL84-ex436-node1
# vbmc start RHEL84-ex436-node2

fence_ipmilan -A password -P -a 192.168.122.1 -l ipmiadmin -p redhat -o status --ipport=7000
fence_ipmilan -A password -P -a 192.168.122.1 -l ipmiadmin -p redhat -o status --ipport=7001


fence_ipmilan -A password -P -a 192.168.122.1 -l ipmiadmin -p redhat -o reboot --ipport=7001



> ¸®¼Ò½º ¼ø¼­ ¹Ù²Ù±â
# pcs resource group add   group-name  resource-id  [--before  resource-id  | --after  resource-id ] 
 . https://access.redhat.com/solutions/2883801


no-quorum-policy ¼³Á¤ º¯°æ
no-quorum-policy¸¦ ignore·Î ¼³Á¤Çϸé, Ŭ·¯½ºÅÍ´Â Äõ·³ ¾øÀ̵µ ÀÚ¿øÀ» ½ÃÀÛÇÒ ¼ö ÀÖ½À´Ï´Ù
pcs property set no-quorum-policy=ignore  ·Î Äõ·³ ¾øÀ̵µ Ŭ·¯½ºÅ͸¦ ½ÃÀÛÇϵµ·Ï ¼³Á¤ÇÕ´Ï´Ù.

ex)
# pcs resource group add svc_httpd  vip --after vg_cluster
 . vg_cluster ÀÌÈÄ¿¡ vip ¼ø¼­·Î ±âµ¿

# pcs resource group add svc_httpd  vip --before vg_cluster
 . vg_cluster ÀÌÀü¿¡ vip°¡ ¸ÕÀú ±âµ¿ ¼ø¼­



> º¼·ýÀÌ ¸¸µé¾îÁö°í ³ª¼­ ÃßÈÄ¿¡ HA º¼·ýÀ¸·Î ÀνÄ
vgchange --setautoactivation n <VGÀ̸§>

> È®ÀÎ
vgs -o +autoactivation











>>>>>>>>Áú¹®

* Clone Set: bond0-monitor-clone [bond0-monitor]:
    * Started: [ UKISS_DB1.cs UKISS_DB2.cs ]

# pcs resource create bond0-monitor ocf:heartbeat:ethmonitor interface=bond0 clone
# pcs constraint location UKISS_SVC rule score=-INFINITY ethmonitor-bond0 ne 1
# pcs resource meta bond0-monitor-clone orderd=true


# pcs stonith create scsi fence_scsi pcmk_host_list="node1.example.com node2.example.com" pcmk_reboot_action="off" devices="/dev/mapper/mpathb,/dev/mapper/mpathc" meta provides="unfencing" --force

# pcs stonith update scsi devices="/dev/mapper/mpathb,/dev/mapper/mpathc"

>> exfat »ç¿ë½Ã ÇÊ¿ä
# yum install -y exfat-utils fuse fuse-exfat



nodehb1:RHEL84~
pcmk_host_list
https://access.redhat.com/solutions/2619961



============ LSB ¿¹½Ã ========================
[root@node01 init.d]# cat chrony

#!/bin/bash

case $1 in
    start)
        echo "################ Start #################"
        su - root -c "systemctl start chronyd"
        ;;
    stop)
        echo "################ Stop #################"
        su - root -c "systemctl stop chronyd"
        ;;
    status)
 if [ ` ps -ef | grep chronyd | grep -v grep | wc -l `  -eq 1  ];then
                exit 0
        else
                exit 3
 fi
        ;;

*)
echo "plz check" ;;
esac
==========================================

 RHEL8.6  ISCSI »ý¼º 

> targetcli ¼³Ä¡
# yum install targetcli

> target µ¥¸ó enable ÈÄ È°¼ºÈ­
# systemctl enable --now target
Created symlink from /etc/systemd/system/multiuser.target.wants/target.service to /usr/lib/systemd/system/target.service.

> target µ¥¸ó »óÅ ȮÀÎ
# systemctl status target

> targetcli ÁøÀÔ
[root@lilo-san ~]# targetcli

> /backstores/block create LUN1 /dev/vdb1





[client]
 yum install iscsi-initiator-utils


# systemctl enable --now iscsi iscsid


set attribute authentication=0


 iscsiadm -m discovery -t st -p 192.168.122.203



 >constraint Á¦°Å 

# pcs constraint list --full
Warning: This command is deprecated and will be removed. Please use 'pcs constraint config' instead.
Location Constraints:
  Resource: svc_httpd
    Enabled on:
      Node: rhcs01 (score:1000) (id:location-svc_httpd-rhcs01-1000)
      Node: rhcs02 (score:500) (id:location-svc_httpd-rhcs02-500)
      Node: rhcs02 (score:INFINITY) (role:Started) (id:cli-prefer-svc_httpd)


score º¸±â
# crm_simulate -Ls 


[root@rh8-nd1 ~]# vgs -ao+systemid
 VG     #PV #LV #SN Attr   VSize   VFree System ID
 rhel     1   2   0 wz--n- <11.00g    0           
 testvg   2   1   0 wz--n-  <1.20g    0  rh8-nd1     <<===---- System ID is now updated to passive node


[root@rh8-nd1 ~]# vgchange -ay testvg
 1 logical volume(s) in volume group "testvg" now active

https://access.redhat.com/solutions/3819022



pcs stonith create scsi fence_scsi pcmk_host_list="RHEL84-ex436-node1 RHEL84-ex436-node2" pcmk_reboot_action="off" devices="/dev/disk/by-id/wwn-0x6001405e0c76df330334e2db582c7403" meta provides="unfencing" --force



/var/log/cluster/corosync.log
/var/log/pcsd/pcsd.log
/var/log/pacemaker/pacemaker.log

/var/log/messages


- ¸¸¾à ½ÃÀÛ»Ó¸¸ ¾Æ´Ï¶ó Á¾·á ½Ã¿¡µµ µ¿ÀÏÇÑ ¼ø¼­°¡ Àû¿ëµÇ±æ ¿øÇÑ´Ù¸é, **symmetrical=true**·Î ¼³Á¤ÇÕ´Ï´Ù.
pcs constraint order start resource_A then resource_B kind=Mandatory symmetrical=true

- Pacemaker Ŭ·¯½ºÅÍ¿¡¼­ **colocation (À§Ä¡ Á¦¾à)**Àº µÎ ¸®¼Ò½º°¡ °°Àº ³ëµå¿¡ ÇÔ²² ½ÇÇàµÇµµ·Ï °­Á¦ÇÏ´Â ±ÔÄ¢ÀÔ´Ï´Ù. pcs constraint colocation remove ¸í·É¾î´Â ±âÁ¸¿¡ ¼³Á¤µÈ colocation Á¦¾à Á¶°ÇÀ» Á¦°ÅÇÒ ¶§ »ç¿ëµË´Ï´Ù.
pcs constraint colocation remove <source_resource> <target_resource>

À̸§ ÆÐ½º¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
 

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