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 ...
随机推荐
- 2014 Super Training #2 F The Bridges of Kolsberg --DP
原题:UVA 1172 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_ ...
- nginx 一二事(3) - 反向代理以及负载均衡
先来说说正向代理 就是普通的代理,记得高中年代偷跑去网吧是要办卡的 题外话: 就是这货...相信很多80同龄人都有吧... 回到正题,那正向代理就不让你直接访问网络,而需要登录一下网吧的某个系统 ...
- Java虚拟机详解02----JVM内存结构
主要内容如下: JVM启动流程 JVM基本结构 内存模型 编译和解释运行的概念 一.JVM启动流程: JVM启动时,是由java命令/javaw命令来启动的. 二.JVM基本结构: JVM基本结构图: ...
- [cb]Unity 项目架构
一.技能机制 二.游戏工程 三.客户端架构
- [知乎] 刚开始学习 iOS 开发有什么书推荐呢?
http://www.zhihu.com/question/19649679 我来说说我学习的过程:(无耻的使用一个回答 回答了很多问题.^^) 第一步,精读 Stephen G. Kochan 的& ...
- JsonHelper
.net下的json序列化在以前没有Newtonsoft.Json崭露头角之前采用System.Web.Script.Serialization命名空间下的JavaScriptSerializer对象 ...
- ubuntu 查看软件包版本以及软件包的源码
aptitude show xxx sudo apt-cache show autoconf setattr, getattr, setattr http://ju.outofmemory.cn/e ...
- [TCPIP]代理arp
一 理论概述 \ 二 实验 实验一:代理arp在nat中的作用(实验发现一下是错的) 实验二.代理arp pc访问服务器想让走路由器(写32bit静态路由),右边的R arp server的时 ...
- 思科简单教程CCNA
这是CCNA的内容,从PC配置交换机(或者路由器),这里呢我们使用的软件叫pack 这是ciso开发的一款工具,能生动形象的模拟现实生活中组网技术的过程,下面我大概讲一下流程,想更多的了解我会录制一些 ...
- Vim中split的使用方法
Vim中split的使用方法 一.作用 用split可以显示两个不同的文件:或者同时显示一个文件的两个不同地方:又或者并排比较两个文件.这一切都可以通过分割窗口实现.如下图,左边的两个窗口是mytoo ...