![]() |
Creating a Hot Spare Server for the Cobalt Raq550Brought to you by Internet Workflow Systems, LLC |
WARNING: Be sure to apply all updates prior to beginning this procedure. In particular, both machines must have all patches so that they match. UNMATCHED SYSTEMS MAY NOT HAVE STABLE RESULTS!
This process allows you to check out a set of scripts from our CVS repository and then run the setup program. This is the easiest way to accomplish a Hot Spare Server; however, there are a few reasons why you would NOT want to do this.
su - root/root directorypwdcvs -d :pserver:anonymous@cvs.internetworkflow.com:/usr/cvsroot loginanoncvscvs -d :pserver:anonymous@cvs.internetworkflow.com:/usr/cvsroot checkout Raq550/HotSparesetup script for the primary server./Raq550/HotSpare/setup primarysetup script for the failover server./Raq550/HotSpare/setup failoverThis process walks you through the manual creation of a Raq550 Hot Spare system. This procedure assumes some knowledge of how to get around in linux as copying, moving and editing files is required. If you don't know how to do this stuff, you had better just stick with the automated version above.
Basically, this installs the rsync service so that the failover machine can synchronize with it. Other than that, the primary machine is left untouched so as to be as unintrusive as possible.
/etc/inetd.confrsync stream tcp nowait root /usr/bin/rsync rsync -daemon
/etc/rsyncd.conf#/etc/rsyncd.conf
max connections = 5
log file = /var/log/rsync.log
timeout = 300
strict modes = false
[home]
comment = Home Directory
path = /home
read only = yes
list = yes
uid = root
gid = root
hosts allow = {IPADDR}
hosts deny = *
[etc]
comment = Configuration Directory
path = /etc
read only = yes
list = yes
uid = root
gid = root
hosts allow = {IPADDR}
hosts deny = *
[var]
comment = Var Directory
path = /var
read only = yes
list = yes
uid = root
gid = root
hosts allow = {IPADDR}
hosts deny = *
[usr]
comment = User Directory
path = /usr
read only = yes
list = yes
uid = root
gid = root
hosts allow = {IPADDR}
hosts deny = *
inet service/etc/rc.d/init.d/inet restart/etc/rc.d/rc.sysctl just before the exit 0 command:# we want to set the max number of file handles to 32K if [ -e /proc/sys/fs/file-max ]; then echo 32768 > /proc/sys/fs/file-max fi exit 0
/bin/synchronize.sh#!/bin/bash
echo "Starting Synchronization `date`"
echo "Synchronizing Home Directory"
rsync -aHlpogDtvz --delete rsync://root@{IPADDR}/home /home
echo "Synchronizing usr Directory"
rsync -aHlpogDtvz --delete rsync://root@{IPADDR}/usr /usr
echo "Synchronizing etc Directory"
rsync -aHlpogDtvz --delete rsync://root@{IPADDR}/etc /etc.backup
echo "Synchronizing var Directory"
rsync -aHlpogDtvz --delete --exclude=log rsync://root@{IPADDR}/var /var
echo "Synchronization Complete `date`"
/etc directory to be /etc.origmv -f /etc /etc.orig
/etc directoryln -s /etc.orig /etc
/etc.backup directorymkdir /etc.backup
/bin/failover#!/bin/bash rm /etc ln -s /etc.backup /etc reboot
/etc/logrotate.d/rsync/var/log/rsync.log {
notifempty
weekly
rotate 3
missingok
compress
}
/etc/cron.hourly/synchronizenohup synchronize.sh >>/var/log/rsync.log 2>&1 &
chmod 755 /bin/failover
chmod 755 /bin/synchronize.sh
chmod 755 /etc/cron.hourly/synchronize