This is an old revision of the document!
This chapter describes the installation and configuration of the Script-CLuster.
Es wird das Paket u2webtools zum Betrieb des SCript-CLusters vorausgesetzt.
Die Datei rpm-Datei des SCript-CLusters auf den Zielrechner kopieren.
# rpm --install sccl-1.3-2.i586.rpm
There is no installable package for HP-UX, you must use a tar-ed version.
# cd / # /usr/local/bin/tar xvzf /var/Software/sccl-HP-UX.1.2-4.tgz /usr/local/bin/tar: Record size = 16 blocks clusterlocks etc/ etc/unix2web/ etc/unix2web/sccl.conf etc/sccl/ ... usr/local/sccl/sccl_start_node usr/local/sccl/sccl_test_res var/ var/clusterlocks/
The configuration of the whole cluster is found in three ascii files
All files are located in
cd /etc/sccl/
This file is source'd, so be careful when editing.
Die Clusterpakete werden in der Datei, die durch PAKETE in der /etc/sccl/sccl.conf angegeben ist, definiert. Als Standard ist /etc/sccl/packages.conf festgelegt. Sie beinhaltet eine Tabelle mit allen Paketen des Clusters und die Clusterknoten, auf denen sie gestartet werden dürfen.
# vi /etc/sccl/packages.conf package1 clnode1 clnode2 package2 - clnode2 clnode1 package3 - clnode2 clnode1
Jede Zeile hat die Form:
<package> { - | <stdnode> } [<altnode1> <altnode2> ...]
Das Clusterpaket <package> wird automatisch beim Start des Clusters auf seinem Standard-Clusterknoten <stdnode> gestartet und darf auf allen <altnodeX> laufen. Ein '-' anstelle von <stdnode> verhindert das automatische Starten des Clusterpakets beim Starten des Clusters oder des Clusterknotens.
The resources are configured in the file indicated by the (showing the default entry):
RESOURCES=/etc/sccl/resources.conf
entry in the /etc/sccl/sccl.conf
.
The RESOURCES file contains all definitions of the resources belonging to the cluster packages.
It may also contain resource definitions belonging to sub-packages which are not listed
as packages in the PACKAGES file but only used in the RESOURCES file. Sub-packages are used to
bundle resources under one definition, which is useful if several packages make use of that sub-package.
Sub-packages cannot be started stand-alone and they do not appear as package in the output of the
sccl_show_cluster
command and their status cannot be determined.
The resource definition must be in one line! The general syntax of a resource definition:
<package> <description_no_spaces> [MULTI] <resource> <resource> ...
When the package ist “started”, all resources are activated or started in the sequence the resources are given in the resource definition line (from left to right/forward).
When the package ist “stopped”, all resources are deactivated or stopped in the sequence the resources are given in the resource definition line (from right to left/backwards).
<package> | The name of a cluster package. |
<description_no_spaces> | Long description of the package, may not contain spaces, use underscore instead. |
MULTI | The cluster package may be simultaneously active on more than one cluster node. |
<resource> | A specification of a resource (described later) |
Link to examples
ip address
definition |
IP:{<interface>|AUTO}:<ip_address>:<netmask>[:ROUTE] |
---|---|
action when “start” |
startup an ip address on the given <interface> or if AUTO is set,
find depending on the ip-address and netmask a matching interface. |
action when “stop” | The optional ROUTE is removed and the ip-address is removed from the used interface. |
examples |
IP:eth0:10.1.17.103:255.255.255.0 , IP:AUTO:10.1.12.122:255.255.255.0 |
Start only, if a specific process is running.
definition |
PROC:<expression>[:WAIT] |
---|---|
action when “start” |
It is checked, whether one or more specific processes are running.
The used command is ps -efa | grep <expression> . |
action when “stop” | none |
example |
PROC:java:WAIT |
Start only if specific processes are not running.
definition |
!PROC:<expression> |
---|---|
action when “start” |
It is checked, whether one or more certain processes are not running.
The used command is ps -efa | grep <expression> . |
action when “stop” | none |
example |
!PROC:backup |
A raw partition.
definition |
RAW:<partition> |
---|---|
action when “start” | The unlocked RAW-partition is marked locked within the cluster. |
action when “stop” | The locked RAW-partition is marked unlocked within the cluster. |
examples |
RAW:/dev/raw1 |
Mount a file system.
definition |
FS:<file_system>[:FSCK] |
---|---|
action when “start” | The file system is mounted (mount). It only can be mounted on one cluster node at a time. The <file_system> must be present in the /etc/fstab. The optional FSCK will perform a file system check before mounting it. |
action when “stop” | The file system is unmounted (umount). |
examples |
FS:/u01/data |
Mount a file system group.
This resource type is rarely used as it needs a file system group definition
based on specific remarks in the /etc/fstab
file.
definition |
FSG:<file_system_group>[:FSCK] |
---|---|
action when “start” | All file systems belonging to the <file_system_group> are mounted (mount). They only can be mounted on one cluster node at a time. The <file_system_group> must be defined in the /etc/fstab. The optional FSCK will perform a file system check before mounting any file system. |
action when “stop” | All file systems of the <file_system_group> are unmounted (umount). |
example |
FSG:allsan |
Mount an NFS file system.
definition |
NFS:<nfs_file_system> |
---|---|
action when “start” | The NFS file system is mounted (mount). It can be mounted on more than one cluster node at a time. The <nfs_file_system> must be present in the /etc/fstab. |
action when “stop” | The NFS file system is unmounted (umount). |
example |
NFS:/backup/central |
Mount a group of NFS file systems.
This resource type is rarely used as it needs a file system group definition based on specific remarks in the /etc/fstab
file.
definition |
NFSG:<nfs_file_system_group> |
---|---|
action when “start” | All NFS file systems of the file system group are mounted (mount). They can be mounted on more than one cluster node at a time. The <nfs_file_system_group> must be defined in the /etc/fstab. |
action when “stop” | All NFS file system of the <nfs_file_system_group> are unmounted (umount). |
example |
NFSG:allsapfs |
The sub-package (resource) will be started when needed by the first package and it is stopped when the last package, that the sub-package is used by, is stopped.
definition |
RS:<subpackage> |
action when “start” | All resources of the sub-packages are activated (left to right/forward). |
action when “stop” | All resources of the sub-packages are deactivated (right to left/backwards). |
examples |
RS:kerberos |
Execute a script to start or stop the package.
definition |
PRG[:<path>] |
action when “start” |
By default, when no <path> is given, the script /etc/sccl/scripts/<package>_startstop is executed.
If a <path> is given, then that script is executed.
If the <path> only contains a base file name (no slashes), the script /etc/sccl/scripts/<path> is executed.
All scripts are executed with parameter “start”. |
action when “stop” | The appropriate script is executed with parameter “stop”. |
examples |
PRG , PRG:/u01/scripts/kerberos.sh , PRG:webserver.sh |
A specific cluster packages must be active in the cluster.
on which cluster node?
definition |
CPKG:<other_package>[:WAIT[:<minutes>] |
action when “start” | Only if the cluster package <other_package> is started on any node in the cluster then this package is started. If WAIT is specified, this package waits for a default time of 5 minutes or for the optional <minutes>. |
action when “stop” | none |
example |
CPKG:database:WAIT |
definition |
CPKG:<other_package>[:START] |
action when “start” | If the cluster package <other_package> is not active on any node in the cluster then the <other_package> is started. |
action when “stop” | none |
example |
CPKG:appserver:START |
definition |
CPKG:<other_package>[:WAITSTART[:<minutes>] |
action when “start” | If the cluster package <other_package> is not active on any node in the cluster then wait for 5 or <minutes> minutes. If <other_package> is then still not active start it. |
action when “stop” | none |
example |
CPKG:appserver:WAITSTART:10 |