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

Alex linux at vfemail.net
Thu Jul 31 08:43:22 UTC 2008

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 at rs2 ~]# lvscan
  ACTIVE            '/dev/myvg2/mylv2' [48.63 GB] inherit
  ACTIVE            '/dev/myvg1/mylv1' [48.63 GB] inherit
[root at rs2 ~]#

[root at rs3 ~]# lvscan
  ACTIVE            '/dev/myvg2/mylv2' [48.63 GB] inherit
  ACTIVE            '/dev/myvg1/mylv1' [48.63 GB] inherit
[root at 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, 

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 at 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" 
                <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" 
                        <clusterfs device="/dev/myvg1/mylv1" force_unmount="0" 
fsid="35790" fstype="gfs2" mountpoint="/var/www/html" name="docroot_gfs_mp" 
                <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 at rs2 ~]#


More information about the Linux-cluster mailing list