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. ZOJ 3157 Weapon --计算几何+树状数组

    题意:给一些直线,问这些直线在直线x=L,x=R之间有多少个交点. 讲解见此文:http://blog.sina.com.cn/s/blog_778e7c6e0100q64a.html 首先将直线分别 ...

  2. C++ 基础笔记(一)

    解释型和编译型 解释型: 边解释边执行,翻译成机器代码后就执行. 编译型: 整篇代码编译成机器码后,保存在可执行文件中,然后启动该程序文件,运行获得结果. Hello World #include & ...

  3. 搭建WP8开发环境

    开发环境 VS2012旗舰版 遇到的问题 安装WP SDK8.0出错提示: 根据当前系统时钟或签名文件中的时间戳验证时要求的证书不在有效期内 解决办法 方法一:把操作系统的时间日期调整到系统的安装日期 ...

  4. VC2010中去掉红绝下划线

    1. 在VC2010 的tools/中找到editior. 已经找到c/c++->advanced->IntelliSense->Disable IntelliSence->T ...

  5. canvas仿屏幕保护运动线条

    canvas是H5中及其重要的一个新标签,它得出现不仅让前端做图形图表功能变得异常强大,还用极强的性能丰富前端渲染页面的能力. Life is not a problem to be solved, ...

  6. 一篇文章告诉你为何GitHub估值能达20亿美元

    软件开发平台GitHub今日宣布,已获得硅谷多家知名风投2.5亿美元融资,这也让其融资总额达到了3.5亿美元,此轮融资对GitHub的估值约为20亿美元. GitHub有何特别之处? GitHub创立 ...

  7. StackBlur.js

    StackBlur.js 是 Mario Klingemann 创建的一个快速的.接近高斯模糊的效果库. 更多信息: http://incubator.quasimondo.com/processin ...

  8. IPAdr.exe注册机[PY]

    算法还原: a =raw_input('enter the string: \n') num =len(a) All_c=0 for i in range(0,num,1): b =ord(a[i]) ...

  9. Asp.net设计模式笔记之一:理解设计模式

    GOF设计模式著作中的23种设计模式可以分成三组:创建型(Creational),结构型(Structural),行为型(Behavioral).下面来做详细的剖析. 创建型 创建型模式处理对象构造和 ...

  10. Github克隆别人的库

    一. 首先在网站上进入别人的库(通过别人提供的链接或者自己在页面上查询),然后在右下方选择SSH,将链接复制下来. 二. 在你的电脑上新建一个与人家库名相同的文件夹,然后在文件夹上右击,在弹出菜单上选 ...