RHCS创建高可用性群集Apache服务器
–>
系统版本:RHEL5.4
关闭SELinux,配置yum仓库,并配置各个服务器的环境
192.168.2.30 target.a.com 目标服务器
192.168.2.10 node1.a.com 节点1
192.168.2.20 node2.a.com 节点2
1> target server的配置
[[email protected] ~]# vim /etc/sysconfig/network
HOSTNAME=target.a.com
[[email protected] ~]# hostname target.a.com
[[email protected] ~]# vim /etc/hosts
[[email protected] ~]# yum install -y iscsi-initiator-utils ricci httpd
[[email protected] ~]# vim /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2011-10.com.a.node1
[[email protected] ~]# service iscsi start
[[email protected] ~]# chkconfig iscsi on
[[email protected] ~]# iscsiadm –mode discovery –type sendtargets –portal 192.168.2.30
[[email protected] ~]# iscsiadm –mode node –targetname iqn.2011-10.com.a.target:disk –portal 192.168.2.30 –login
[[email protected] ~]# echo“iscsiadm –mode discovery –type sendtargets –portal 192.168.2.30” >> /etc/rc.d/rc.local
[[email protected] ~]# echo “iscsiadm –mode node –targetname
iqn.2011-10.com.a.target:disk –portal 192.168.2.30 –login” >> /etc/rc.d/rc.local
[[email protected] ~]# service ricci start
[[email protected] ~]# chkconfig ricci on
3> initiator2的配置
[[email protected] ~]# vim /etc/sysconfig/network
HOSTNAME=node2.a.com
[[email protected] ~]# hostname node2.a.com
[[email protected] ~]# vim /etc/hosts
可以看到两个节点都成功接入target server,接下来开始做群集文件系统
1> 登录luci管理页,https://192.168.2.30:8084
在节点上创建群集文件系统GFS
[[email protected] ~]# mkdir /mnt/1
[[email protected] ~]# fdisk /dev/sdb
[[email protected] ~]# partprobe /dev/sdb //在两个initiator上都做该步骤
[[email protected] ~]# pvcreate /dev/sdb1
[[email protected] ~]# vgcreate vg01 /dev/sdb1
[[email protected] ~]# vgdisplay
[[email protected] ~]# service clvmd restart
[[email protected] ~]# lvcreate -L 3000M -n lv01 vg01
[[email protected] ~]# lvscan
[[email protected] ~]# lvdisplay
[[email protected] ~]# gfs_mkfs -p lock_dlm -t mycluster:lv01 -j 4 /dev/vg01/lv01
[[email protected] ~]# mount /dev/vg01/lv01 /mnt/1
在两个initiator上做完群集文件系统后,接着做以下步骤.
3> 点击“Submit”,点击“Fence”,创建Fence
在节点上添加fence
6> 创建Resources,点击“Add a Resource”
IP资源
服务脚本资源
节点1上监控日志
转载于:https://blog.51cto.com/oraclong/699882
本文来源 互联网收集,文章内容系作者个人观点,不代表 本站 对观点赞同或支持。如需转载,请注明文章来源,如您发现有涉嫌抄袭侵权的内容,请联系本站核实处理。