°Ô½Ã¹° 51°Ç
   
[RHCS7] PaceMaker ¼³Ä¡
±Û¾´ÀÌ : ÃÖÀå¼· ³¯Â¥ : 2017-04-21 (±Ý) 10:20 Á¶È¸ : 6601
  • Ŭ·¯½ºÅÍ ±¸¼º ³ëµå Á¤º¸

      Public Hostname   Private Hostname   IP Á¤º¸
    100-HA 100-HA.cs 192.168.1.100
    101-HA101-HA.cs 192.168.1.101
    250-SR 250-SR.cs 192.168.1.250

  1. Ŭ·¯½ºÅÍ ÆÐÅ°Áö ¼³Ä¡Çϱâ

    a. Ŭ·¯½ºÅÍ °¢°¢ÀÇ ³ëµå¿¡ Red Hat HA ÆÐÅ°Áö¸¦ ¼³Ä¡ÇÏ°í ¸ðµç Æ潺 ¿¡ÀÌÀüÆ®¸¦ ¼³Ä¡ÇÔ.
    # yum install -y pcs fence-agents-all

    b. ¹æÈ­º®À» »ç¿ë ÁßÀ̶ó¸é ¹æÈ­º®¿¡ HA Æ÷Æ®¸¦ Ãß°¡ÇÏ¿© È°¼ºÈ­
    # firewall-cmd --permanent --add-service=high-availability
    success
    # firewall-cmd --reload
    success

    Âü°í »çÇ×
    fence_xvm À» »ç¿ëÇϱâ À§Çؼ­´Â 1229/tcp Æ÷Æ®¸¦ Ãß°¡·Î ¿ÀÇÂÇØ¾ß ÇÑ´Ù.

    c. pcs ¸¦ ( pacemaker/corosync configuration system) »ç¿ëÇÏ¿© Ŭ·¯½ºÅ͸¦ ¼³Á¤ÇÏ°í ³ëµå °£ÀÇ Åë½ÅÀ» À§ÇØ »ç¿ëÀÚ °èÁ¤¿¡ ´ëÇÑ ¾ÏÈ£¸¦ ÁöÁ¤ÇÔ

    # passwd hacluster
    Changing password for user hacluster.
    New password:
    BAD PASSWORD: The password is shorter than 8 characters
    Retype new password:
    passwd: all authentication tokens updated successfully.

    d. °¢ ³ëµå¿¡¼­ Ŭ·¯½ºÅÍ°¡ ½ÇÇàµÇ±â Àü¿¡ ¹Ýµå½Ã pcsd µ¥¸óÀÌ µ¿À۵ǰí È°¼ºÈ­ µÇ¾î¾ß ÇÔ.
    # systemctl enable pcsd
    Created symlink from /etc/systemd/system/multi-user.target.wants/pcsd.service to /usr/lib/systemd/system/pcsd.service.
    [root@100-HA ~]# systemctl start pcsd

    e. »ç¿ëÀÚ°¡ pcs ¸¦ ½ÇÇà ÇÒ ³ëµå¿¡¼­ hacluster °èÁ¤À¸·Î °¢ ³ëµå¿¡ ´ëÇÑ ÀÎÁõÀ» ÁøÇà ÇØ¾ß ÇÔ
    # pcs cluster auth 100-HA.cs 101-HA.cs
    Username: hacluster
    Password:
    100-HA.cs: Authorized
    101-HA.cs: Authorized

  2. Ŭ·¯½ºÅÍ »ý¼ºÇϱâ

    a. ¾Æ¹« ³ëµå¿¡¼­ ´ÙÀ½ÀÇ ¸í·ÉÀ» ½ÇÇàÇÏ¿© 100-HA, 101-HA, 102-HA ³ëµå·Î ±¸¼ºµÈ Ŭ·¯½ºÅÍ my_cluster ¸¦ »ý¼ºÇϸç, ÀÌ ¸í·ÉÀº Ŭ·¯½ºÅÍ ¸ðµÎÀÇ ³ëµå¿¡¼­ Ŭ·¯½ºÅÍ ¼­ºñ½º¸¦ ½ÃÀÛÇÏ°Ô µÇ´Â --start ¿É¼ÇÀ» Æ÷ÇÔÇÑ´Ù.
    # pcs cluster setup --start --name my_cluster 100-HA.cs 101-HA.cs
    Destroying cluster on nodes: 100-HA.cs, 101-HA.cs...
    101-HA.cs: Stopping Cluster (pacemaker)...
    100-HA.cs: Stopping Cluster (pacemaker)...
    101-HA.cs: Successfully destroyed cluster
    100-HA.cs: Successfully destroyed cluster

    Sending cluster config files to the nodes...
    100-HA.cs: Succeeded
    101-HA.cs: Succeeded

    Starting cluster on nodes: 100-HA.cs, 101-HA.cs, 102-HA.cs...
    100-HA.cs: Starting Cluster...
    101-HA.cs: Starting Cluster...

    Synchronizing pcsd certificates on nodes 100-HA.cs, 101-HA.cs, 102-HA.cs...
    100-HA.cs: Success
    101-HA.cs: Success

    Restarting pcsd on the nodes in order to reload the certificates...
    100-HA.cs: Success
    101-HA.cs: Success

    b. ³ëµå°¡ ºÎÆõǾúÀ» ¶§ Ŭ·¯½ºÅÍÀÇ °¢ ³ëµå¿¡¼­ Ŭ·¯½ºÅÍ ¼­ºñ½º°¡ ½ÇÇàµÇµµ·Ï È°¼ºÈ­µÇ°Ô ÁøÇà
    # pcs cluster enable --all
    100-HA.cs: Cluster Enabled
    101-HA.cs: Cluster Enabled

  3. Fence Device (Â÷´Ü ÀåÄ¡) ¼³Á¤

    - PaceMaker ¿¡¼­ Áö¿øÇÏ´Â Fecne Á¾·ù´Â ´ÙÀ½°ú °°À¸¸ç ÀÌ ¹®¼­¿¡¼­´Â Fence_XVM À¸·Î ±¸¼ºÀ» ÁøÇàÇÔ
    fence_apc - Fence agent for APC over telnet/ssh
    fence_apc_snmp - Fence agent for APC, Tripplite PDU over SNMP
    fence_bladecenter - Fence agent for IBM BladeCenter
    fence_brocade - Fence agent for HP Brocade over telnet/ssh
    fence_cisco_mds - Fence agent for Cisco MDS
    fence_cisco_ucs - Fence agent for Cisco UCS
    fence_compute - Fence agent for the automatic resurrection of OpenStack compute instances
    fence_drac5 - Fence agent for Dell DRAC CMC/5
    fence_eaton_snmp - Fence agent for Eaton over SNMP
    fence_emerson - Fence agent for Emerson over SNMP
    fence_eps - Fence agent for ePowerSwitch
    fence_hpblade - Fence agent for HP BladeSystem
    fence_ibmblade - Fence agent for IBM BladeCenter over SNMP
    fence_idrac - Fence agent for IPMI
    fence_ifmib - Fence agent for IF MIB
    fence_ilo - Fence agent for HP iLO
    fence_ilo2 - Fence agent for HP iLO
    fence_ilo3 - Fence agent for IPMI
    fence_ilo3_ssh - Fence agent for HP iLO over SSH
    fence_ilo4 - Fence agent for IPMI
    fence_ilo4_ssh - Fence agent for HP iLO over SSH
    fence_ilo_moonshot - Fence agent for HP Moonshot iLO
    fence_ilo_mp - Fence agent for HP iLO MP
    fence_ilo_ssh - Fence agent for HP iLO over SSH
    fence_imm - Fence agent for IPMI
    fence_intelmodular - Fence agent for Intel Modular
    fence_ipdu - Fence agent for iPDU over SNMP
    fence_ipmilan - Fence agent for IPMI
    fence_kdump - Fence agent for use with kdump
    fence_mpath - Fence agent for multipath persistent reservation
    fence_rhevm - Fence agent for RHEV-M REST API
    fence_rsa - Fence agent for IBM RSA
    fence_rsb - I/O Fencing agent for Fujitsu-Siemens RSB
    fence_scsi - Fence agent for SCSI persistent reservation
    fence_virt - Fence agent for virtual machines
    fence_vmware_soap - Fence agent for VMWare over SOAP API
    fence_wti - Fence agent for WTI
    fence_xvm - Fence agent for virtual machines

    a. pcs stonith create ¸í·ÉÀ» »ç¿ëÇؼ­ Fence ÀåÄ¡¸¦ stonith ¸®¼Ò½º·Î µî·ÏÇϸç, stonith °¡ µ¿ÀÛÇÒ ¶§¿¡ È£½ºÆ® Á¤º¸¿Í ³ëµå Á¤º¸°¡ µ¿ÀÏÇϵµ·Ï ¸ÅÇνÃÄѼ­ µî·ÏÀ» ÁøÇà ÇÔ

    Âü°í »çÇ×
    Fence_xvm ¿¡ ´ëÇÑ »çÀü¿¡ ÇÊ¿äÇÑ »çÇ×Àº ´ÙÀ½ ¸µÅ©¸¦ ÂüÁ¶
    http://wiki.clusterlabs.org/wiki/Guest_Fencing

    #pcs stonith create fence_100-HA fence_xvm port="100-HA-CentOS7" pcmk_host_list="100-HA.cs"
    #pcs stonith create fence_101-HA fence_xvm port="101-HA-CentOS7" pcmk_host_list="101-HA.cs"

    ±âÁ¸ÀÇ STONITH ÀåÄ¡ÀÇ ¸Å°³ º¯¼ö¸¦ È®ÀÎÇÏ´Â ´ÙÀ½ ¸í·É¾î·Î °¡´É ÇÔ
    # pcs stonith show fence_100-HA
    Resource: fence_100-HA (class=stonith type=fence_xvm)
    Attributes: port=100-HA-CentOS7 pcmk_host_list=100-HA.cs
    Operations: monitor interval=60s (fence_100-HA-monitor-interval-60s)

  4. Ŭ·¯½ºÅÍ »óÅ ȮÀÎ

    ´ÙÀ½ ¸í·É¾î¸¦ »ç¿ëÇÏ¿© Ŭ·¯½ºÅÍ »óÅ¿¡ ´ëÇÑ È®ÀÎÀÌ °¡´É ÇÔ
    # pcs status
    Cluster name: my_cluster
    Stack: corosync
    Current DC: 100-HA.cs (version 1.1.15-11.el7_3.4-e174ec8) - partition with quorum
    Last updated: Mon Apr 3 02:32:07 2017 Last change: Mon Apr 3 02:32:01 2017 by root via crm_node on 100-HA.cs

    2 nodes and 2 resources configured

    Online: [ 100-HA.cs 101-HA.cs ]

    Full list of resources:

    fence_100-HA (stonith:fence_xvm): Started 100-HA.cs
    fence_101-HA (stonith:fence_xvm): Started 101-HA.cs

    Daemon Status:
    corosync: active/enabled
    pacemaker: active/enabled
    pcsd: active/enabled

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

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