HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Making a mirror server (http://www.howtoforge.com/forums/showthread.php?t=59197)

djmostek 22nd October 2012 20:02

Making a mirror server
 
Welcome ;) I have made one machine runnig with The Perfect Setup with Ubuntu 12.04 and ISPConfig3 which supports my main portal. As my portal has recently developed (over 600 users online in peak time) my one machine (Quad 9550, 4GB RAM) is not working properly in peak times. I have one spare machine (with same parameters) and I would like to mirror primary machine in order to make better permormance for my portal. And now how am I supposed to do it? I must install spare copy of Perfect setup on new machine and what then? Is there any manual for this?

till 23rd October 2012 08:24

Did you take a look at ispconfig.org were all installation manuals are listed? There is a section for muliserver tutorials and there you find the cluster guide ;)

http://www.howtoforge.com/installing...th-ispconfig-3

djmostek 23rd October 2012 10:21

Thank you Till! As always useful replay from you! :)

But I have one more question: in this tut there's said that two servers must be configured with the basic setup (only 1-8steps) - and there is a problem as my primary machine is running for few months and is fully configured - only the secondary machine will be setuped with the basci setup. Will it cause any problems during and after the installation?

djmostek 28th October 2012 01:12

Till can U give me some feedback one more time? Im doing my cluster with tutorial (http://www.howtoforge.com/installing...th-ispconfig-3) and i am on the step when i am supposed to add in /etc/mysql/my.cnf
Code:

[mysqld]
server-id = 1
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 1
 
master-host = 192.168.0.106
master-user = slaveuser
master-password = slave_user_password
master-connect-retry = 60 
 
expire_logs_days        = 10
max_binlog_size        = 500M

and after adding it and then after running commands
Code:

scp -pr /var/lib/mysql/* root@server2.example.tld:/var/lib/mysql/
 scp -pr /etc/mysql/debian.cnf root@server2.example.tld:/etc/mysql/debian.cnf

I cannot start my mysql server.
So summarising: after stopping mysql service and editing /etc/mysql/my.cnf there is no way to restart MySQL again.

Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!

till 28th October 2012 18:29

The mysql server on the master or the slave and which error messages do you get in the syslog?

A mirror setup were one server is in production is possible, but its not easy and may cause problems as the configuration exists already on one server and e.g. the system users and groups and also the records for the mirror database are missing on the second server.

djmostek 28th October 2012 19:56

The mysql server on both master and slave server act as I described it above (do not start/restart after adding those commands from tut to [mysqld] section).

Output of syslog:
Code:

Oct 28 19:52:41 hasty kernel: init: mysql main process (4303) terminated with status 7
Oct 28 19:52:41 hasty kernel: init: mysql main process ended, respawning
Oct 28 19:52:41 hasty kernel: init: mysql post-start process (4304) terminated with status 1
Oct 28 19:52:43 hasty kernel: init: mysql main process (4353) terminated with status 7
Oct 28 19:52:43 hasty kernel: init: mysql main process ended, respawning
Oct 28 19:52:43 hasty kernel: init: mysql post-start process (4354) terminated with status 1
Oct 28 19:52:45 hasty kernel: init: mysql main process (4403) terminated with status 7
Oct 28 19:52:45 hasty kernel: init: mysql respawning too fast, stopped
Oct 28 19:53:01 hasty CRON[4647]: (root) CMD (/usr/local/rtm/bin/rtm 46 > /dev/null 2> /dev/null)


djmostek 29th October 2012 21:52

Maybe this is the problem of mysql version. That in 5.5 in comparison to 5.1 "master" options are disabled? or am I wrong?

till 30th October 2012 08:22

The resaon for the problem might be the different mysql versions, the setup assumes a identical setup on both servers. I havent tested if mirroring between different mysl versions works.

djmostek 30th October 2012 09:37

But on both: primary and slave server the mysql is in 5.5 version. But only after adding this to my.cnf [code [mysqld]
server-id = 1
replicate-same-server-id = 0
auto-increment-increment = 2
auto-increment-offset = 1

master-host = xxxxxxxxxxx
master-user = slaveuser
master-password = slave_user_password
master-connect-retry = 60

expire_logs_days = 10
max_binlog_size = 500M [/code]
The server do not start. When I erase this the server works properly.

falko 1st November 2012 08:05

I guess you need to use the

Code:

CHANGE MASTER TO
statement (see http://www.howtoforge.com/how-to-set...ubuntu-9.10-p2 ) instead of setting the master values in my.cnf.


All times are GMT +2. The time now is 01:04.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.