one ldirector LVS-DR

Osvaldo Alvarez Pozo nebano at gmail.com
Tue May 15 18:36:18 BST 2007


hi
I have a problémé undesrtanding what I shuld do
I have a working mysql cluster a manager 192.168.0.3 and two nodes
192.168.0.4, 192.168.0.5  I wonder if I can do load balancer using mon
manager as a load balancer? the how to I have found use two load
balancer and heartbeat. I thing it is posible to make the load
balancer without using heartbeat. but I do not know how to it. any way

-In de manager server  have done :

modprobe ip_vs_dh
modprobe ip_vs_ftp
modprobe ip_vs
modprobe ip_vs_lblc
modprobe ip_vs_lblcr
-modprobe ip_vs_lc
modprobe ip_vs_nq
modprobe ip_vs_rr
modprobe ip_vs_sed
modprobe ip_vs_sh
modprobe ip_vs_wlc
modprobe ip_vs_wrr

apt-get install heartbeat-2 ldirectord-2 libdbd-mysql-perl

#>vi /etc/sysctl.conf

# Enables packet forwarding
net.ipv4.ip_forward = 1

#>sysctl -p

#>vi /etc/ha.d/ldirectord.cf

# Global Directives
checktimeout=10
checkinterval=2
autoreload=no
logfile="local0"
quiescent=yes

virtual = 192.168.0.105:3306
        service = mysql
        real = 192.168.0.101:3306 gate
        real = 192.168.0.102:3306 gate
        checktype = negotiate
        login = "ldirector"
        passwd = "ldirectorpassword"
        database = "ldirectordb"
        request = "SELECT * FROM connectioncheck"
        scheduler = wrr


- in my node 192.168.0.4 i did
mysql -u root -p
GRANT ALL ON ldirectordb.* TO 'ldirector'@'%' IDENTIFIED BY 'ldirectorpassword';
FLUSH PRIVILEGES;
CREATE DATABASE ldirectordb;
USE ldirectordb;
CREATE TABLE connectioncheck (i INT) ENGINE=NDBCLUSTER;
INSERT INTO connectioncheck () VALUES (1);
quit;

- in my node 192.168.0.5 i did

mysql -u root -p
GRANT ALL ON ldirectordb.* TO 'ldirector'@'%' IDENTIFIED BY 'ldirectorpassword';
FLUSH PRIVILEGES;
CREATE DATABASE ldirectordb
quit;

-in the two nodes(192.168.0.4,192.168.0.5)
apt-get install iproute

vi /etc/sysctl.conf

net.ipv4.conf.all.arp_ignore = 1
net.ipv4.conf.eth0.arp_ignore = 1
net.ipv4.conf.all.arp_announce = 2
net.ipv4.conf.eth0.arp_announce = 2

sysctl -p

Add this section for the virtual IP address to /etc/network/interfaces:


vi /etc/network/interfaces

auto lo:0
iface lo:0 inet static
  address 192.168.0.105
  netmask 255.255.255.255
  pre-up sysctl -p > /dev/null

ifup lo:0

in the manager
/etc/init.d/ldirectord restart

I did that following a howto on
http://www.howtoforge.com/loadbalanced_mysql_cluster_debian

but I know I do things wrong .
Any help please?
Thanks
Inle

Search lvs-users Archives
Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort

More information about the lvs-users mailing list