RHCS中必须有Fence设备,在设备为知故障发生时,Fence负责让占有浮动资源的设备与集群断开。

REDHAT的fence device有两种,

内部fence设备:

IBM RSAII卡,HP的iLO卡,Dell的DRAC,还有IPMI的设备;

外部fence 设备:

UPS,SAN SWITCH,NETWORK SWITCH等。

对于外部fence 设备,可以做拔电源的测试,因为备机可以接受到fence device返回的信号,备机可以正常接管服务,

对于内部fence 设备,不能做拔电源的测试,因为主机断电后,备机接受不到主板芯片做为fence device返备的信号,就不能接管服务,clustat会看到资源的属主是unknow,查看日志会看到持续报fence failed的信息。

软fence配置

CentOS与Redhat使用KVM虚拟机做RHCS时可以通过做软fence来实现fence功能。

配置如下:

1、在真机上运行fence服务
yum list | grep --color fence
yum -y install fence-virtd fence-virtd-libvirt fence-virtd-mult

2 、创建密码文件,并密码文件scp给 web1 web2 台服务器,

宿主计算机上做:

[root@localhost ~]# mkdir /etc/cluster
[root@localhost ~]# dd if=/dev/urandom of=/etc/cluster/fence_xvm.key bs=4K count=1
1+0 records in
1+0 records out
4096 bytes (4.1 kB) copied, 0.000848692 s, 4.8 MB/s
[root@localhost ~]# ll /etc/cluster/
total 4
-rw-r--r-- 1 root root 4096 Mar 24 16:58 fence_xvm.key
[root@localhost ~]#
[root@localhost ~]# scp /etc/cluster/fence_xvm.key root@10.37.129.5:/etc/cluster/

/etc/cluster/
3、宿主机配置fencefence_virtd -c

红色为手动,其他为enter

[root@localhost ~]# fence_virtd -c######
Module search path [/usr/lib64/fence-virt]: Available backends:
libvirt 0.1 Listener modules are responsible for accepting requests
from fencing clients. Listener module [multicast]:
No listener module named multicast found!
Use this value anyway [y/N]? y##### The multicast listener module is designed for use environments
where the guests and hosts may communicate over a network using
multicast. The multicast address is the address that a client will use to
send fencing requests to fence_virtd. Multicast IP Address [225.0.0.12]: Using ipv4 as family. Multicast IP Port [1229]: Setting a preferred interface causes fence_virtd to listen only
on that interface. Normally, it listens on the default network
interface. In environments where the virtual machines are
using the host machine as a gateway, this *must* be set
(typically to virbr0).
Set to 'none' for no interface. Interface [none]: private##### The key file is the shared key information which is used to
authenticate fencing requests. The contents of this file must
be distributed to each physical host and virtual machine within
a cluster. Key File [/etc/cluster/fence_xvm.key]: Backend modules are responsible for routing requests to
the appropriate hypervisor or management layer. Backend module [checkpoint]: libvirt##### The libvirt backend module is designed for single desktops or
servers. Do not use in environments where virtual machines
may be migrated between hosts. Libvirt URI [qemu:///system]: Configuration complete. === Begin Configuration ===
backends {
libvirt {
uri = "qemu:///system";
} } listeners {
multicast {
interface = "private";
port = "1229";
family = "ipv4";
address = "225.0.0.12";
key_file = "/etc/cluster/fence_xvm.key";
} } fence_virtd {
module_path = "/usr/lib64/fence-virt";
backend = "libvirt";
listener = "multicast";
}
=== End Configuration ===
Replace /etc/fence_virt.conf with the above [y/N]? y
[root@localhost ~]#

4、启动fence服务并开机运行

/etc/init.d/fence_virtd start
chkconfig fence_virtd on

#luci添加软fence


#

Fence 设备的更多相关文章

  1. RHCS高可用集群配置(luci+ricci+fence)

    一.什么是RHCS    RHCS是Red Hat Cluster Suite的缩写,也就是红帽集群套件,RHCS是一个能够提供高可用性.高可靠性.负载均衡.存储共享且经济廉价的集群工具集合,它将集群 ...

  2. DRBD分布式块设备复制

    一. DRBD介绍 1.1.数据镜像软件DRBD介绍分布式块设备复制(Distributed Relicated Block Deivce,DRBD),是一种基于软件.基于网络的块复制存储解决方案,主 ...

  3. VMware下CentOS6.8配置GFS文件系统

    1.GFS介绍 GFS简要说明,它有两种: 1. Google文件系统:GFS是GOOGLE实现的是一个可扩展的分布式文件系统,用于大型的.分布式的.对大量数据进行访问的应用.它运行于廉价的普通硬件上 ...

  4. Linux 集群

    html,body { } .CodeMirror { height: auto } .CodeMirror-scroll { } .CodeMirror-lines { padding: 4px 0 ...

  5. RedHat 6.7 Enterprise x64环境下使用RHCS部署Oracle 11g R2双机双实例HA

     环境 软硬件环境 硬件环境: 浪潮英信服务器NF570M3两台,华为OceanStor 18500存储一台,以太网交换机两台,光纤交换机两台. 软件环境: 操作系统:Redhat Enterpris ...

  6. RedHat 6.7 Enterprise x64环境下使用RHCS部署Oracle 11g R2双机HA

    环境 软硬件环境 硬件环境: 浪潮英信服务器NF570M3两台,华为OceanStor 18500存储一台,以太网交换机两台,光纤交换机两台. 软件环境: 操作系统:Redhat Enterprise ...

  7. RHCS

    简介 Red Hat Cluster Suite :红帽子集群套件 高可用性.高可靠性.负载均衡.存储共享 高可用集群是 RHCS 的核心功能.当应用程序出现故障,或者系统硬件. 网络出现故障时,应用 ...

  8. 转:Linux集群-----HA浅谈

    通过特殊的软件将若干服务器连接在一起并提供故障切换功能的实体我们称之为高可用集群.可用性是指系统的uptime,在7x24x365的工作环境中,99%的可用性指在一年中可以有87小时36分钟的DOWN ...

  9. Rhel6-集群管理(luci&&ricci)配置文档

    理论基础: User → HA →     Lb    → web → sql → 分布式filesystem ->磁盘I/O 用户   高可用 负载均衡    应用   数据库      mf ...

随机推荐

  1. JavaWeb学习之Servlet(一)----MyEclipse及Tomcat的配置

    [声明] 欢迎转载,但请保留文章原始出处→_→ 文章来源:http://www.cnblogs.com/smyhvae/p/4134921.html [开发环境] 物理机版本:Win 7旗舰版(64位 ...

  2. 查看mysqll账号信息

    也可以删除,和操作其他普通表一样

  3. Nginx采用https加密访问后出现的问题

    线上的一个网站运行了一段时间,应领导要求,将其访问方式更改为https加密方式.更改为https后,网站访问正常,但网站注册功能不能正常使用了! 经过排查,是nginx配置里结合php部分漏洞了一个参 ...

  4. js判断滚动条到底部

    判断滚动条到底部,需要用到DOM的三个属性值,即scrollTop.clientHeight.scrollHeight. scrollTop为滚动条在Y轴上的滚动距离. clientHeight为内容 ...

  5. css3d

    立方体:http://sandbox.runjs.cn/show/1h6zvghj 原理分析:(左负右正) x:与屏幕水平:(在屏幕上) y:与屏幕水平方向垂直(在屏幕上) z:垂直于屏幕(在屏幕外) ...

  6. window.lacation.replace

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8&quo ...

  7. center

    center标签对其包围的文本进行水平居中处理

  8. poj 1163 The Triangle

    The Triangle Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 43809   Accepted: 26430 De ...

  9. 你会在C#的类库中添加web service引用吗?

    本文并不是什么高深的文章,只是VS2008应用中的一小部分,但小部分你不一定会,要不你试试: 本人对于分布式开发应用的并不多,这次正好有一个项目要应用web service,我的开发环境是vs2008 ...

  10. 分享JS代码(转)

    var imgUrl = 'http://xxx/share_ico.png'; // 分享后展示的一张图片 var lineLink = 'http://xxx'; // 点击分享后跳转的页面地址 ...