Re: how to mount a gfs2 volume on all our real webservers in /var/www/html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a typical LVS model.
Do not add your httpd script and mount script into source in your cluster.conf
What you should do is :
1.add your node into cluster.conf (I dont confirm whether should add fence device)
2.config your lvs.cf (in /etc/sysconfig/ha/)
3.test.

Alex wrote:
Hello all,

I have 3 real http servers running on centos-5.2 (rs1=192.168.113.3, rs2=192.168.113.4, rs3=192.168.113.5) on which i want to mount some gfs2 volumes (mylv1 as /var/www/html and mylv2 as /var/www/cgi-bin).

In my present setup, rs1 is still missing (will be added later).

Using conga, i configured rs2 and rs3 to be part of "httpcluster".

On all real webservers, mylv1 and mylv2 volumes are accessible:

[root@rs2 ~]# lvscan
  ACTIVE            '/dev/myvg2/mylv2' [48.63 GB] inherit
  ACTIVE            '/dev/myvg1/mylv1' [48.63 GB] inherit
[root@rs2 ~]#

[root@rs3 ~]# lvscan
  ACTIVE            '/dev/myvg2/mylv2' [48.63 GB] inherit
  ACTIVE            '/dev/myvg1/mylv1' [48.63 GB] inherit
[root@rs3 ~]#

Using Conga and this howto, I added:
http://www.redhat.com/docs/manuals/enterprise/RHEL-5-manual/en-US/RHEL510/Cluster_Administration/s1-apache-inshttpd-CA.html

2 resources:
- httpd_script (type script, full_path_to_script=/etc/rc.d/init.d/httpd)
- docroot_gfs_mp (type gfs, mount_point=/var/www/html, device=/dev/myvg1/mylv1)

2 services:
- http_service (which is linked to http_script resource and is responsible to startup httpd servers aon all our nodes) - docroot_mount (which is linked to docroot_gfs_mp and is responsible to mount mylv1 on all our webservers in /var/www/html)

The main problem is that: httpd service is started only on one node (now on rs2=192.168.113.4), and mylv1 is mounted in /var/www/html on the same node. If this node become unusable (is rebooted), httpd service is started on rs3, and mylv1 is mounted there.

What should be changed in my cluster.conf file, in order to have all httpd servers started by "httpcluster" and mylv1 to be mounted in /var/www/html on all our webservers?

Here comes my present cluster.conf file:

[root@rs2 ~]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster alias="httpcluster" config_version="12" name="httpcluster">
<fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="192.168.113.5" nodeid="1" votes="1">
                        <fence/>
                </clusternode>
                <clusternode name="192.168.113.4" nodeid="2" votes="1">
                        <fence/>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices/>
        <rm>
                <failoverdomains/>
                <resources>
<script file="/etc/rc.d/init.d/httpd" name="httpd_script"/> <clusterfs device="/dev/myvg1/mylv1" force_unmount="0" fsid="35790" fstype="gfs2" mountpoint="/var/www/html" name="docroot_gfs_mp" self_fence="0"/>
                </resources>
                <service autostart="1" exclusive="0" name="http_service">
                        <script ref="httpd_script"/>
                </service>
                <service autostart="1" exclusive="0" name="docroot_mount">
                        <clusterfs fstype="gfs2" ref="docroot_gfs_mp"/>
                </service>
        </rm>
</cluster>
[root@rs2 ~]#

Regards,
Alx

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster




--
北京澳凯富汇科技发展有限公司
地址:北京中关村南大街2号数码大厦A座1216-1217
电话:010-51727211
传真:010-51727212
技术部  张会光
RHCE(红帽认证工程师)
RHCI(红帽认证讲师)
TEL:010-51727211-8030
Mobile:13260408461
MSN:tony.guang@xxxxxxx

--
Linux-cluster mailing list
Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux