°Ô½Ã¹° 51°Ç
   
KVM±â¹Ý fence ¼³Á¤Çϱâ
±Û¾´ÀÌ : theko ³¯Â¥ : 2018-05-06 (ÀÏ) 22:47 Á¶È¸ : 2567
È£½ºÆ® ¼­¹ö RHEL7
VM 2´ë  RHEL6



Host_Server

# yum install fence-virt fence-virtd fence-virtd-libvirt fence-virtd-multicast fence-virtd-serial

# mkdir -p /etc/cluster


- Å°¸¦ ¸¸µå´Â°Å´Ù
# dd if=/dev/urandom of=/etc/cluster/fence_xvm.key bs=4k count=1

- ¸¸µçÅ°¸¦ ¹èÆ÷
# scp /etc/cluster/fence_xvm.key root@vm-server01:/etc/cluster/fence_xvm.key
# scp /etc/cluster/fence_xvm.key root@vm-server02:/etc/cluster/fence_xvm.key




- Host OS¿¡¼­ Ææ½Ì µ¥¸óÀ» ±¸¼ºÇϵµ·Ï ÇÑ´Ù.

# fence_virtd -c

---------------------------------------------------------------
[host_server]# cat /etc/fence_virt.conf
fence_virtd {
        module_path = "/usr/lib64/fence-virt";
        listener = "multicast";
        backend = "libvirt";
}

listeners {
        multicast {
                family = "ipv4";
                address = "225.0.0.12";
                port = "1229";
                interface = "virbr1";       //Åë½ÅÇÒ device º¸Åë Heartbeat
                key_file = "/etc/cluster/fence_xvm.key";
        }

}

---------------------------------------------------------------

# service fence_virtd start
# chkconfig fence_virtd on





Guest OS ¼³Á¤

# yum install fence-virt  //µ¥¸óÀº ½ÇÇà ½ÃÅ°Áö¸»¾Æ¾ßÇÔ


TEST¹æ¹ý

fence_xvm -a 225.0.0.12 -k /etc/cluster/fence_xvm-host2.key -H guest2 -o status
fence_xvm -o reboot -a 225.0.0.12 -k /etc/cluster/fence_xvm_host1.key -H guest1 

ÀÌ¿Í °°ÀÌ ÇÏ¸é µÇ´Âµ¥   -H µÚ¿¡ ºÙÀº È£½ºÆ®´Â, È£½ºÆ® ¼­¹ö¿¡¼­ ¾Æ·¡¿Í °°ÀÌ °Ë»öÇؼ­³ª¿Â¸íÀÌ´Ù.

[host_server]# virsh list 
 Id Name                 State 
---------------------------------- 
 1  guest1               running 



or

[host_server]# fence_xvm -o list




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

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