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

Re: [Linux-cluster] how to mount a gfs2 volume on all our real webservers in /var/www/html

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/)

Alex wrote:
Hello all,

I have 3 real http servers running on centos-5.2 (rs1=, rs2=, rs3= 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:

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=, 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"/>
                <clusternode name="" nodeid="1" votes="1">
                <clusternode name="" nodeid="2" votes="1">
        <cman expected_votes="1" two_node="1"/>
<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"/>
                <service autostart="1" exclusive="0" name="http_service">
                        <script ref="httpd_script"/>
                <service autostart="1" exclusive="0" name="docroot_mount">
                        <clusterfs fstype="gfs2" ref="docroot_gfs_mp"/>
[root rs2 ~]#


Linux-cluster mailing list
Linux-cluster redhat com

技术部  张会光
MSN:tony guang msn com

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