Results 1 to 8 of 8
Thread: HA Cluster
|
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
-
03-01-2010 #1
HA Cluster
I have this pictire: Cluster consists of 2 nodes. Machines have different hardware (1- and 2- core processors) and kernels are 32- and 64-bit. Before building real cluster test model on Virtualbox was built - everything was fine. When I have set up a cluster on physical machines I've got some bugs. That's what I did:
1. Connection, the synchronization of the two nodes - OK
2. Making 1-st node master - ok
3. Creating nodes on both file systems and mount points - ok
4. Mounting the first node file system - OK
5. Testing replication nodes - OK
6. Starting heartbeat on both nodes - OK
7. Starting httpd on 1-st node - OK (but a virtual host cannot be pinged and is not working as it should. Ifconfig in new device eth1: 0 is not displayed)
And 2 following problems:
1. When both nodes are running Apache (httpd) is not runnnng as it was before.
2. when you restart the 1-th node: 2-nd cleanly takes all the processes and is pinged perfectly. On 1-st node startup the 2-nd cleanly gives all the rights to the 1st and becomes slave. But the first node is loaded as slave for some strange reason and does not become master. So I got slave / slave nodes.
-
03-02-2010 #2
Are you saying apache is not started automatically during reboot or
starting apache gives error ?
Have you used any clustering software to achieve this?First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
-
03-02-2010 #3
1. Apache is started finely, without any errors. So I think the problem is not there
2. I use heartbeat+drbd to build a cluster. Cluster will use metadata resource to share httpd server data
To be more accurate, I can set up everyting manually, and everything is working fine. After I reboot the primary node it comes back to primary state BUT it doesn't mount metadata resource automatically and that's why httpd data becomes unavailable. I need a solution to automount drbd metadata resource automatically after reboot.
-
03-02-2010 #4
What you mean by "Apache is not runnnng as it was before." - Do you have any performance related issues now?
I haven't used drbd . I found this link :
RND GROUP LIMITED How to configure autofs to mount a DRBD mount with High Availability (HA)
If above link didn't solve your query , then try dropping a mail to drdb user list .First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
-
03-02-2010 #5
It is the default that you have to manually reset the heartbeat to the primary node after it fails over to the secondary. To override this you need to set auto-failback to "yes" but it is not recommended.
Can you post your heartbeat conf file? (/etc/ha.d/ha.cf (?))
Apologies, my knowledge of this is novice and a little rusty.
-
03-02-2010 #6
Lakshmipathi
I haven't used drbd . I found this link :
RND GROUP LIMITED How to configure autofs to mount a DRBD mount with High Availability (HA)
ironduke
logfacility local0
deadtime 5
initdead 120
bcast eth1
auto_failback on
respawn hacluster /usr/lib64/heartbeat/ipfail
use_logd yes
conn_logd_time 25
debugfile /var/log/ha-debug.log
logfile /var/log/ha.log
node node1.akme
node node2.akme
-
03-02-2010 #7
I hope ironduke will answer for you
. Okay . Disclourse first :
I'm currently work with a cluster open source file system glusterfs (http://gluster.com/community/documen...rFS_User_Guide) .Now may be if you haven't tried - you can try it with virtual machines and see whether that suits you, because I have seen HA with RAID 1 , works fine with glusterfs.
First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-----
FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org
-
03-03-2010 #8
Below is a rough and ready guide (on a rough and ready version of red hat which must surely have moved on since) for checking the HA operation in the application which I have used most commonly. In the end our software engineer built his own linux flavour in-house to make it easier to configure. Some of it might not make sense to your installation. Much of it (eg the ethernet bonding bit) can be done just using the network config for your build.
I hope it is helpful.
Original documents based on http://www.linux-ha.org
Conventions
Insert your own IP addresses
Hostname Address Description
linux-ha1 172.23.7.51 primary server
linux-ha2 172.23.7.52 secondary server
ping 172.23.7.1 Ping address, a highly reliable network device that is accessible to both primary and secondary server
virtual 172.23.7.50 The virtual address that is shared by the primary and secondary servers during failover
ETHERNET BONDING
This is an optional step that creates a single bonded network connection from the two Ethernet ports on the server. Having two network controllers connecting the server to the core switch creates a redundant network link removing it a single point of failure in the system.
Configuring HA
* Review /etc/ha.d/ha.cf
bcast bond0
node linux-ha1
node linux-ha2
ping 172.23.7.1
* Review /etc/ha.d/haresources
linux-ha1 172.23.7.50 IPsrcaddr::172.23.7.50 route httpd
*
o Note: The first entry is the hostname of the preferred (primary) server on both servers being configured, I.E. The file should be identical on both servers.
o Note: The remaining entries are the services to start on failover, order is important.
* Fix permissions on /etc/ha.d/authkeys
chmod 600 /etc/ha.d/authkeys
* Review /etc/ha.d/resource.d/route
VIRT="172.23.7.50"
SUBNET="172.23.7.0"
NETMASK="255.255.255.0"
MASK="24"
GWAY="172.23.7.1"
DESC="virtual route"
* o Note: This script supports only bond0 bonded Ethernet and requires further configuration to support Ethernet devices that are not bonded.
High Availability Check
* Manually stop/start the HA process to confirm that it is installed correctly:
/etc/init.d/mon stop
/etc/init.d/mon start
/etc/init.d/heartbeat stop
/etc/init.d/heartbeat start
* Use ifconfig to interogate the network settings on the primary and secondary server
o Both servers should have a bond0 (eth0) entry, with the appropriate ip address for the server (172.23.7.51/172.23.7.52)
o One server should have a bond0:0 (or eth0:0) entry, with the virtual ip address (172.23.7.50).
* Use service heartbeat stop to stop the heartbeat service on the server with the bond0:0 entry.
o The server with heartbeat stopped will release its bond0:0 entry
o The other server should gain a bond0:0 entry
* At any time, the only server running the application (eg httpd) will be the one with the bond0:0 entry
# ps aux | grep httpd
o Ignore the line containing grep.