Fence 设备
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
#
Fence 设备的更多相关文章
- RHCS高可用集群配置(luci+ricci+fence)
一.什么是RHCS RHCS是Red Hat Cluster Suite的缩写,也就是红帽集群套件,RHCS是一个能够提供高可用性.高可靠性.负载均衡.存储共享且经济廉价的集群工具集合,它将集群 ...
- DRBD分布式块设备复制
一. DRBD介绍 1.1.数据镜像软件DRBD介绍分布式块设备复制(Distributed Relicated Block Deivce,DRBD),是一种基于软件.基于网络的块复制存储解决方案,主 ...
- VMware下CentOS6.8配置GFS文件系统
1.GFS介绍 GFS简要说明,它有两种: 1. Google文件系统:GFS是GOOGLE实现的是一个可扩展的分布式文件系统,用于大型的.分布式的.对大量数据进行访问的应用.它运行于廉价的普通硬件上 ...
- Linux 集群
html,body { } .CodeMirror { height: auto } .CodeMirror-scroll { } .CodeMirror-lines { padding: 4px 0 ...
- RedHat 6.7 Enterprise x64环境下使用RHCS部署Oracle 11g R2双机双实例HA
环境 软硬件环境 硬件环境: 浪潮英信服务器NF570M3两台,华为OceanStor 18500存储一台,以太网交换机两台,光纤交换机两台. 软件环境: 操作系统:Redhat Enterpris ...
- RedHat 6.7 Enterprise x64环境下使用RHCS部署Oracle 11g R2双机HA
环境 软硬件环境 硬件环境: 浪潮英信服务器NF570M3两台,华为OceanStor 18500存储一台,以太网交换机两台,光纤交换机两台. 软件环境: 操作系统:Redhat Enterprise ...
- RHCS
简介 Red Hat Cluster Suite :红帽子集群套件 高可用性.高可靠性.负载均衡.存储共享 高可用集群是 RHCS 的核心功能.当应用程序出现故障,或者系统硬件. 网络出现故障时,应用 ...
- 转:Linux集群-----HA浅谈
通过特殊的软件将若干服务器连接在一起并提供故障切换功能的实体我们称之为高可用集群.可用性是指系统的uptime,在7x24x365的工作环境中,99%的可用性指在一年中可以有87小时36分钟的DOWN ...
- Rhel6-集群管理(luci&&ricci)配置文档
理论基础: User → HA → Lb → web → sql → 分布式filesystem ->磁盘I/O 用户 高可用 负载均衡 应用 数据库 mf ...
随机推荐
- UVALive 6093 Emergency Room --优先队列实现的模拟
题意:给n个医生,这些医生有一个上班时间,然后给一些病人,病人有一个到达的时间,以及一些诊断,诊断有property(优先级)和duration(诊断时间)这两个属性,每个病人可能要诊断多次,最后问每 ...
- 2014 Super Training #6 A Alice and Bob --SG函数
原题: ZOJ 3666 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3666 博弈问题. 题意:给你1~N个位置,N是最 ...
- [cb] Assetbundle打包(一)
一.简介 Unity的Assetbundle是Unity Pro提供的功能. 理解:Asset 资源,资产:Bundle :包,一批,捆:字面上的意思,就是把资源打包. 在项目中怎么使用Assetbu ...
- js原生捕鱼达人(三)--完结
先给分享下我写完的效果,github有点卡,我没有压缩代码,不过效果可以看到 https://jasonwang911.github.io/ 转载请注明'转载于Jason齐齐的博客http://www ...
- Redis word bak
@font-face { font-family: "Arial"; }@font-face { font-family: "Courier New"; }@f ...
- mybatis-config.xml详解
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE configuration PUBLIC ...
- 04SpringMvc_映射器_BeanNameUrlHanderMapping
这篇文章我们讲的是映射器,映射器的作用是什么样的请求交给Action,如果我们没有在xml配置文件中进行配置,默认的就是BeanNameUrlHanderMapping. 我们讲一个案例增加用户的案例 ...
- Windows Phone 简介
中文官网 https://dev.windowsphone.com/zh-cn Windows Phone SDK 7.1 http://www.microsoft.com/zh-cn/downloa ...
- Gitub
1.下载地址(注册:jackchn,jackchn@foxmail.com) http://windows.github.com/ 2.使用 github for Windows使用介绍 搭建一个免费 ...
- Google play billing(Google play 内支付)
准备工作 1. 通过Android SDK Manager下载extras中的Google Play services和Google Play Billing Library两个包. 2. 把下载的. ...