1. 准备
Centos 6.4系统,1个管理节点,关闭NetworkManager,iptabels
IP地址规划:
2个Node(双网卡)
Node1: service: Eth0:192.168.10.10 Node2: Eth0:192.168.10.11 Heartbeat: Eth1:192.168.20.10 Eth1:192.168.20.11 Storage: Eth2:192.168.30.10 Eth2:192.168.30.11
VIP:192.168.10.20
Staorage:192.168.10.250
主机名:Node1:node1.tior.com Node2:node2.tior.com iscsi:luci.tior.com
2. 配置
1).更改主机名/etc/sysconfig/network Node1:hostname=node1.tior.com Node2:hostname=node2.tior.com Iscsi:hostname=luci.tior.com
配置/etc/host/文件,并每台节点和管理主机添加如下:
另外两台不做截图。 重启使配置生效。
3. 安装启动管理luci群集
Centos可能安装失败,yum问题,256报错。 #yum –y install luci
#yum –y install ricci
安装成功,启动luci服务。
4.在两台节点服务器上安装ricci(可能需要配置yum源)两台配置相同。通常有两种HA:cman+corosync cman+pacemaker 这里演示第一种。
1) #Yum –y install ricci cman corosync gfs2 rgmanager 2) #Service ricci start 3) #Chkconfig ricci on
5,连接https://192.168.10.250:8084
登陆界面: luci服务器的管理员用户和密码连接
跳出警告信息(可自译,不赘述) 跳过就可以。
进入HA界面
6.创建cluster
注意:如果出现下列问题: 1.
确保ricci正常启动,如果启动正常,查看是不是iptables的设置问题,可以直接把iptables关掉通常你的Linux重启后iptables是自动开启的,你需要检查你的iptables。 2.
请更改你的ricci密码: #Passwd ricci 基本解决 3.提示node1不是集群节点
一般都是因为cman 和 rgmanager没有起来导致的,启动cman和rgmanager刷新下。 4.启动cman的时候报错
一般是因为NetworkManager在启动的原因,把NetworkManager关掉即可,并设置成开机关闭。