The cluster of Unix systems, once again, consists of two computers: MAPLE (IP address 123.25.10.1) and BEECH (IP address 123.25.10.2).
In this example, however, there is to be a fail-safe openFT instance available on each of the two computers. For this purpose, the computers are superimposed (MAPLE by CL_MAPLE (IP address 123.25.10.10) and BEECH by CL_BEECH (IP address 123.25.10.20). If the computer MAPLE fails, then CL_MAPLE is switched over to the computer BEECH. If the computer BEECH fails, then CL_BEECH is switched over to the computer MAPLE.
Configure the cluster so that a disk is always available for each computer, for example: /sha_MAPLE and /sha_BEECH.
Required steps for the computer MAPLE
Configure a standard instance as shown in example 1.
Mount the disk /sha_MAPLE and /sha_BEECH on MAPLE.
Create and check the instances MAPLE and BEECH:
ftcrei MAPLE /sha_MAPLE/oFT -addr=CL_MAPLE.FOREST.NET ftcrei BEECH /sha_BEECH/oFT -addr=CL_BEECH.FOREST.NET ftshwi @a -l Instance Address Directory -------- ---------- -------------------- maple CL_MAPLE.FOREST.NET /sha_MEAPLE/oFT beech CL_BEECH.FOREST.NET /sha_BEECH/oFT std MAPLE /var/openFT/std
Deactivate the instances
MAPLE and BEECH:
ftdeli MAPLE
ftdeli BEECH
Required steps on the computer BEECH
Configure a standard instance as shown in example 1.
Next, make a shell script for controlling openFT on the computers MAPLE and BEECH that handles the events start, stop, and check. Both scripts must be available on both computers. When RMS is used, the shell script might look like the example below (in the script for BEECH, the name MAPLE must be substituted with BEECH in the following):
PAR=$1 BIN=/opt/bin; export BIN INST=MAPLE OPENFTINSTANCE=$INST; export OPENFTINSTANCE case $PAR in start) OPENFTINSTANCE=std; export OPENFTINSTANCE $BIN/ftcrei $INST /sha_MAPLE/oFT case $? in 0|5) continue;; *) exit 1;; esac OPENFTINSTANCE=$INST; export OPENFTINSTANCE $BIN/ftstart 2>/dev/null case $? in 0|180) exit 0;; *) exit 1;; esac;;
stop) $BIN/ftstop 2>/dev/null case $? in 0|181) exit 0;; *) exit 1;; esac OPENFTINSTANCE=std; export OPENFTINSTANCE $BIN/ftdeli $INST case $? in 0)exit 0;; 1)exit 1;; esac;; check) VALUE=`$BIN/ftshwo -csv|fgrep FtStarted \ |sed s/";"/" "/g` set $VALUE i=1 FTROW=1 while [ "$1" != "FtStarted" ] do shift FTROW=`expr $FTROW + 1` done FTSTART=`$BIN/ftshwo -csv|fgrep -v FtStarted \ |cut -f$FTROW -d\;` if [ $FTSTART = '*NO' ] then # openFT server not active exit 1 else # openFT server active exit 0 fi;; esac
Working with the individual instances
When everything is finished, there is a standard instance on both the MAPLE and BEECH computers which is not fail-safe. By making a selection on the openFT Explorer, or by executing the command ftseti std, you will be working with the respective standard instance. You can make use of all the openFT functions in the standard instances (e.g. set up admissions profiles, view log records, etc.). The standard instances on MAPLE and BEECH can be addressed normally from external systems using the addresses of these computers (123.25.10.1 or 123.25.10.2).
The openFT instances MAPLE and BEECH are available on the computer, on which the corresponding disk is currently mounted. They can be used, as usual, via the openFT Explorer or the command interface.
In order to transfer files to these instances, the IP addresses of CL_MAPLE.FOREST.NET or CL_BEECH.FOREST.NET (123.25.10.10 or 123.25.10.20) can be addressed.