FAQ / RSF-1 QuickStart Guide

 

1 RSF-1 Quick Start Guide

 

1.1 Introduction

 

This RSF-1 Quick Start Guide is designed to help install and configure RSF-1 on a

simple 2-node asymmetric cluster without direct-attached shared-SCSI storage.

In addition, this guide assumes both nodes are connected to the same logical network

via a physical network adapter installed on each node, and have a null-modem RS-232

cable connected to a serial port.

Finally, ensure remote shell

login and copy files between both nodes. For the purposes of this guide, we shall

assume the node names

associated virtual (floating) hostname

RSF-1 comprises 2 packages:

rsh and remote copy rcp are configured and enabled tonodea and nodeb and RSF-1 service name test with thetest-vip (IP address 10.0.10.10).

HACbase

Common High-Availability.Com scripts and functions.

HACrsf

RSF-1 High-Availability Clustering software.

1.2 Installing RSF-1 (to be performed on both nodes)

 

Install the RSF-1

prompts) with the following commands:

HACbase and HACrsf packages as root (answering �yes� to all

# cd /<install_dir>

 

S

SSO OOL LLA AAR RRI IIS SS # pkgadd �d HACbase-solaris-5.6-sparc.<version>.<date>.pkg

S

SSO OOL LLA AAR RRI IIS SS # pkgadd -d HACrsf-1-solaris-5.6-sparc.<version>.<date>.pkg

L

LLI IIN NNU UUX XX # rpm �i HACbase-Linux-2-i386.<version>.<date>.rpm

L

LLI IIN NNU UUX XX # rpm -i HACrsf-1-Linux-2-i386.<version>.<date>.rpm

H

HP PP- --U UUX XX # swinstall -s HACbase-HPUX-11.0-PARisc.<version>.<date>.depot \*

H

HP PP- --U UUX XX # swinstall -s HACrsf-1-HPUX-11.0-PARisc.<version>.<date>.depot \*

Note: In addition to installing the RSF-1 packages, start, stop and init scripts are

created automatically in the relevant

network services file updated with the RSF-1 required ports.

/etc/rc*.d directories for your platform and the

1.3 Update Paths

 

1.3.1 Bourne shell

${HOME}/.profile file and add /opt/HAC/bin:/opt/HAC/RSF-1/bin to the

PATH

Re-execute root�s

environment variables with the following command:

and /opt/HAC/man to the MANPATH environment variables.${HOME}/.profile file to inherit the new PATH and MANPATH

# . ${HOME}/.profile

Edit root�s ~/.login file and add

 

1.3.2 C shell

/opt/HAC/bin:/opt/HAC/RSF-1/bin to the PATH and

/opt/HAC/man

Re-execute root�s ~/.login file to inherit the new PATH and MANPATH environment

variables with the following command:

to the MANPATH environment variables.

RSF-1 Quick Start Guide

 

Page 8 of 13

Revision 1.4

# source ~/.login

 

1.4 Licensing RSF-1 (to be performed on both nodes)

 

1 Record the node�s unique hostid prior to obtaining RSF-1 licences from your High-

Availability.Com authorised reseller with the following command:

 

# hac_hostid

 

2 Licence RSF-1 on the node and create the default

(answering

_rsfadmin user accountyes to all prompts) with the following command:

# rsf_install

 

3 Verify RSF-1 has been licensed correctly with the following command:

 

# rsfmon �v

 

Note, if the RSF-1 licence is invalid, a message similar to the following will be

displayed on standard output:

 

This copy of rsfmon is not licensed.

 

If this is the case then please contact High-Availability.Com for a valid licence.

 

1.5 Configuring RSF-1

 

RSF-1 uses some operating specific device files for network and serial access. For the

purpose of this document Solaris devices are used in examples; please substitute

device paths specific to the operating system RSF-1 is being installed on as follows:

 

Network devices

 

S

SSO OOL LLA AAR RRI IIS SS le0

L

LLI IIN NNU UUX XX eth0

H

HP PP- --U UUX XX lan0

Serial devices

 

S

SSO OOL LLA AAR RRI IIS SS /dev/cua/[a|b]

L

LLI IIN NNU UUX XX /dev/tty[a|b]

H

HP PP- -- U UUX XX /dev/tty[0|1]p0

Note, perform the following on the first node (nodea) initially.

1 Copy the example configuration file with the following commands:

 

# cd /opt/HAC/RSF-1/etc

# cp config.default config

 

2 Edit the configuration file and add to the

at the bottom so that the configuration file matches the one in Table 1

(remembering to substitute operating specific devices); use the following

command to edit:

global, machines and services sections

# vi config

 

RSF-1 Quick Start Guide

 

Revision 1.4

 

Table 1 Example configuration file

Page 9 of 13

#######################################################

# Optional global defaults & definitions come first.

#######################################################

REALTIME 10

POLL_TIME 2

#######################################################

# End of global section, start of machines section.

#######################################################

MACHINE nodea

NET nodeb

SERIAL nodeb /dev/cua/b

MACHINE nodeb

NET nodea

SERIAL nodea /dev/cua/b

#######################################################

# End of machines section, start of service section.

 

#######################################################

 

SERVICE test test-vip “RSF-1 Test Service”

INITIMEOUT 180

RUNTIMEOUT 10

IPDEVICE “le0:1″

SERVER nodea

SERVER nodeb

 

3 Create service script directory as follows:

3.1 Create a pseudo runtime configuration subdirectory for the RSF-1 test service

with the following commands:

 

# mkdir /opt/HAC/RSF-1/etc/rc.test.d

 

3.2 Copy the RSF-1 example announce scripts into the test service�s

rc.test.d

subdirectory with the following commands:

 

# cd /opt/HAC/RSF-1/etc/service/scripts

# cp *announce /opt/HAC/RSF-1/etc/rc.test.d

 

3.3 Automatically generate the RSF-1 test service�s symbolic

following command:

K kill scripts with the

# rsfklink test

 

4 Create a tar file of the RSF-1 config file and test service�s

with the following commands:

rc.test.d subdirectory

# cd /opt/HAC/RSF-1/etc

# tar �cvf test.tar config rc.test.d

 

5 Remote copy the

command:

test.tar file to the second node (nodeb) with the following

# rcp test.tar nodeb:/opt/HAC/RSF-1/etc

 

6 On the second node extract the RSF-1 config file and test service�s

rc.test.d

subdirectory from the

test.tar file from nodea with the following commands:

# cd /opt/HAC/RSF-1/etc

# tar �xvfp test.tar

 

RSF-1 Quick Start Guide

 

Page 10 of 13

Revision 1.4

1.6 Post Installation (to be performed on both nodes)

 

Edit the

hostname test-vip with the following command:

/etc/hosts file and add an entry for the test service�s virtual (floating)

# vi /etc/hosts

 

and add the following two lines:

 

# RSF-1 controlled virtual hostnames

10.0.10.10 test-vip

 

S

serial heartbeat) with the following command:

SSO OOL LLA AAR RRI IIS SS Disable any login service configured on serial port b (so as not to affect the RSF-1

# pmadm -p zsmon -s ttyb �d

 

1.7 Starting RSF-1 (to be performed on both nodes)

 

1 Start RSF-1 monitoring with the following command:

 

# rsfctl start

 

If the RSF-1 configuration is valid, a message similar to the following will be

displayed on standard output:

 

RSF-W0006: warning, can’t open /opt/HAC/RSF-1/etc/nodea.test:

No such file or directory

 

This is normal operation as it is the first time RSF-1 has been started and so no

lock state file exists for the test service.

If this warning message is not displayed, check the RSF-1 log file

configuration errors (and correct as appropriate) with the following command:

rsfmon.log for

# more /opt/HAC/RSF-1/log/rsfmon.log

 

2 Verify RSF-1 is running correctly and network and serial heartbeats are being

received with the following command:

 

# rsfstat

 

Any mis-configuration of the network or serial heartbeats will be displayed in

output similar to the following:

 

Heartbeats:

0 net nodea -> nodeb (nodeb): Up

1 serial nodea -> nodeb (/dev/cua/b): Unavailable

2 net nodeb -> nodea (nodea): Up

3 serial nodeb -> nodea (/dev/cua/b): Unavailable

 

1.8 Testing RSF-1 (to be performed on both nodes)

 

1.8.1 Start services on nodea

rsfmon.log in the background with the following command:

# tail �40f /opt/HAC/RSF-1/log/rsfmon.log &

 

2 Start services on nodea initially. Using the RSF-1 command-line interface

(

rsfcli), start the test service running with the following command:

# rsfcli �i=0 start test

 

If the test service starts correctly, messages from the RSF-1 log file

rsfmon.log

similar to the following will be displayed on standard output:

 

[...17:43:10] User _rsfadmin setting service test on nodea to automatic

 

RSF-1 Quick Start Guide

 

Revision 1.4

Page 11 of 13

[...17:43:12] Instance priority change nodea.test: 0 -> 1

[...17:46:05] NOTICE: Service test not running, start in 10 seconds

[...17:46:15] Time to start test

[...17:46:15] Running start scripts for nodea.test, pid = 1122

[...17:46:15] NOTICE: Service test is now starting on nodea (was stopped)

[...17:46:15] Setting netmask of le0:1 to 255.255.255.0

[...17:46:16] [test rsfexec] Running S01announce start 1

[...17:46:17] Service test is now starting on nodea

[...17:46:18] [test S01announce] Starting service – attempt 1

[...17:46:18] [test rsfexec] Running S99announce start 1

[...17:46:19] [test S99announce] Service start-up completed

[...17:46:19] Script child 1122 exited with code 0

[...17:46:19] Service test start scripts succeeded (pid 1122 exit 0)

[...17:46:19] NOTICE: Service test is now running on nodea (was starting)

3

hostname has been configured correctly on physical network adapter

following command:

Perform a network interface listing and verify the test-vip virtual (floating)le0 with the

# ifconfig �a

 

this should produce output similar to:

 

le0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500

inet 10.0.10.101 netmask ffffff00 broadcast 10.0.10.255

 

1.8.2 Fail over services to nodeb

rsfcli, move the test service

# rsfcli �i=0 �h nodea �t nodeb move test

 

Note: The test service will shutdown on nodea, once shutdown is complete RSF-1

will start the test service running on nodeb. If the test service starts correctly on

nodeb, messages from the RSF-1 log file

will be displayed on standard output.

2 Finally, perform a network interface listing and verify the test-vip virtual (floating)

hostname has been configured correctly on physical network adapter

following command:

rsfmon.log similar to those in step 1.8.1le0 with the

# ifconfig �a

 

this should produce output similar to:

 

le0:1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500

inet 10.0.10.101 netmask ffffff00 broadcast 10.0.10.255

 

1.9 Conclusion

 

RSF-1 has now been successfully installed and configured on both nodes and an

asymmetric

You should now refer to the RSF-1 administrators� guide for further information on

configuring and using RSF-1

test service created and manually failed over between nodea and nodeb.

RSF-1 Quick Reference

 

Page 12 of 13

Revision 1.4

2 RSF-1 Quick Reference

 

2.1 Introduction

 

This chapter summarises the most important RSF-1 commands and highlights the

location of relevant files.

 

2.2 Useful commands

 

Some useful RSF-1 commands are:

 

rsfstat

services, etc.

displays the status of the cluster, including running

rsfcli

Some sample

 

Command Description

RSF-1�s command-line interface.rsfcli commands are (the �i=0 switch turns off authentication):

rsfcli �v list

Shows the status of the cluster.

rsfcli �i=0 stop

current node.

Stops the specified service on the

rsfcli �i=0 �h start

 

 

Starts the specified service on the node

specified with the host switch (if not

running elsewhere.)

 

rsfcli �i=0 manual

the current node.

Sets the specified service to manual on

rsfcli �i=0 �h auto

 

 

Sets the specified service to automatic

on the node specified with the host

switch (will start if not running

elsewhere.)

 

rsfcli �i=0 �h -t

<target_node> move

 

Moves the specified service to the target

node specified with the target switch

from the node specified with the host

switch.

 

rsfcli vname -f

on the current node (useful for

determining which services are running

on the current node.)

Shows the virtual hostnames configured

rsfcli

syntax of all the arguments available.

The main

following pairs only:

With no arguments prints out thersfctl command is designed to be used with its 4 possible arguments in the

rsfctl start / rsfctl stop

 

Starts RSF-1 and all services set to automatic which are currently not running on the

other node; Stops RSF-1 and all services currently running on the node.

 

RSF-1 Quick Reference

 

Revision 1.4

Page 13 of 13

rsfctl restart / rsfctl kill

 

Restarts RSF-1 and assumes last know state of the services by parsing their lock state

files (

while leaving services currently running on the node.

NB. It�s important to run these commands in a timely fashion on both nodes in the

cluster � otherwise failover may occur. To safeguard against this, it�s normally a good

idea to change all switchover modes to manual before running the

/opt/HAC/RSF-1/etc/.); Kills RSF-1 monitoringrsfctl stop/kill

commands.

 

2.3 The RSF-1 log file

 

The RSF-1 log file

start-up and shutdown events on the current node. On reboot (or restart of RSF-1) the

current log file is rotated (default 9 times). To change the number of log files saved,

edit the

as appropriate.

/opt/HAC/RSF-1/log/rsfmon.log provides a record of all servicersflogrotate script located in the /opt/HAC/RSF-1/bin directory and amend

2.4 Starting the RSF-1 GUI

 

When using the RSF-1 GUI (

contact for the initial cluster connect in the [

Cluster]

rsfgui) to administer the cluster, specify the node toConnect To:] field of the [Connect todialog box. When asked for authentication, you can use either the default

_rsfadmin

username / password combination.

2.5 Setting RSF-1 passwords

 

Additional RSF-1 users can be created using the

rsfpasswd command, for example

rsfpasswd �a

for the new user. The old RSF-1 password file

renamed to

adding new users.

- you�ll then be prompted to enter and verify a password/opt/HAC/RSF-1/etc/passwd will bepasswd.old. Remember to repeat the procedure on the other node when

2.6 The RSF-1 processes

 

The main RSF-1 monitoring daemon is called

see the main daemon (spawned by

configured heartbeat type � as opposed to heartbeat instance. Under normal

operation, you should see 3

network monitor process and the disk monitor process.

rsfmon. If you do a process listing, you�llinit) creates one child process per everyrsfmon process running – the main monitor process, the

1 On nodeb using the RSF-1 command-line interface

from nodea to nodeb with the following command:

 

1 Tail the RSF-1 log file

 

Edit root�s

 

Posted in: Installation