Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

NOTE: CentOS Enterprise Linux is built from the Red Hat Enterprise Linux source code. Other than logo and name changes CentOS Enterprise Linux is compatible with the equivalent Red Hat version. This document applies equally to both Red Hat and CentOS Enterprise Linux.

10.7. Synchronizing Configuration Files

After configuring the primary LVS router, there are several configuration files that must be copied to the backup LVS router before you start the cluster.

These files include:

  • /etc/sysconfig/ha/lvs.cf — the configuration file for the LVS routers.

  • /etc/sysctl — the configuration file that, among other things, turns on packet forwarding in the kernel.

  • /etc/sysconfig/iptables — If you are using firewall marks, you should synchronize one of these files based on which network packet filter you are using.

Important Important
 

The /etc/sysctl.conf and /etc/sysconfig/iptables files do not change when you configure the cluster using the Piranha Configuration Tool.

10.7.1. Synchronizing lvs.cf

Anytime the LVS configuration file, /etc/sysconfig/ha/lvs.cf, is created or updated, you must copy it to the backup LVS router node.

Warning Warning
 

Both the active and backup LVS router nodes must have identical lvs.cf files. Mismatched LVS configuration files between the LVS router nodes can prevent failover.

The best way to do this is to use the scp command.

Important Important
 

To use scp the sshd must be running on the backup router, see Section 8.1 Configuring Services on the LVS Routers for details on how to properly configure the necessary services on the LVS routers.

Issue the following command as the root user from the primary LVS router to sync the lvs.cf files between the router nodes:

scp /etc/sysconfig/ha/lvs.cf n.n.n.n:/etc/sysconfig/ha/lvs.cf

In the above command, replace n.n.n.n with the real IP address of the backup LVS router.

10.7.2. Synchronizing sysctl

The sysctl file is only modified once in most situations. This file is read at boot time and tells the kernel to turn on packet forwarding.

Important Important
 

If you are not sure whether or not packet forwarding is enabled in the kernel, see Section 8.5 Turning on Packet Forwarding for instructions on how to check and, if necessary, enable this key functionality.

10.7.3. Synchronizing Network Packet Filtering Rules

If you are using iptables, you will need to synchronize the appropriate configuration file on the backup LVS router.

If you alter the any network packet filter rules, enter the following command as root from the primary LVS router:

scp /etc/sysconfig/iptables n.n.n.n:/etc/sysconfig/

In the above command, replace n.n.n.n with the real IP address of the backup LVS router.

Next either open an ssh session to the backup router or log into the machine as root and type the following command:

/sbin/service iptables restart

Once you have copied these files over to the backup router and started the appropriate services (see Section 8.1 Configuring Services on the LVS Routers for more on this topic) you are ready to start the cluster.

 
 
  Published under the terms of the GNU General Public License Design by Interspire