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