This is an old revision of the document!
This chapter describes all possible resource entries.
All packages defined in the packages.conf must have a matching resource (package name = resource name).
But not every resource must be a package, a resource can be used by other resources (as sub-resources).
You can e.g. group resources as one resource and use that in several package resources.
final translations
A specific cluster packages must be active in the cluster to continue to process the resource definition.
definition |
CPKG:<other_package>[:WAIT[:<m>] |
---|---|
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 <m> or 5 minutes. |
action when “stop” | none |
examples |
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 on the first cluster node defined for <other_package> in the PACKAGES file. |
action when “stop” | none |
examples |
CPKG:appserver:START |
definition |
CPKG:<other_package>[:WAITSTART[:<m>] |
---|---|
action when “start” | If the cluster package <other_package> is not active on any node in the cluster then wait for <m> or 5 minutes. if it is still not active after that delay, start <other_package> on the first cluster node defined for it in the PACKAGES file. |
action when “stop” | none |
examples |
CPKG:appserver:WAITSTART:10 |
To start this resource, a specific package must not be active in the cluster.
definition |
!CPKG:<other_package>[:STOP] |
---|---|
action when “start” | If package <other_package> is active on any cluster node, then this package is not started. If STOP is specified, the <other_package> is stopped and this package is started (the processing of the resource definition is continued). |
action when “stop” | none |
example |
!CPKG:disturber:STOP |
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 |
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 |
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 |
To start this package, another specific package must be active on the current cluster node.
definition |
PKG:<other_package>[:WAIT[:<m>]] |
---|---|
action when “start” | Start the package only if the <other_package> is active on the current cluster node. If WAIT is specified, wait for <m> or 5 minutes for the <other_package> to become active. |
action when “stop” | none |
example |
PKG:apache2 , PKG:apache2:WAIT:3 |
Another package must not be active on the same cluster node.
definition |
!PKG:<other_package>[:{STOP|SWITCH}] |
---|---|
action when “start” | The <other_package> must not be active on this cluster node. If STOP or SWITCH is given, stop the <other_package> on this cluster node. |
action when “stop” | If SWITCH is given, restart the <other_package>. |
example |
!PKG:disturber:STOP , !PKG:alternative:SWITCH |
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 |
Start this resource 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 this resource 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 |
Create a routing entry.
definition |
RO:<destination_ip>:<netmask>[:<via_ip_of_if>] |
---|---|
action when “start” | A routing entry into the local net is created with net mask <netmask> to the <destination_ip>. The optional <via_ip_of_if> is used to derive the correct network interface. If not set, the physical interface eth0 is used. |
action when “stop” | The routing entry is removed. |
example |
RO:10.1.11.222:255.255.255.0:10.1.11.200 |
The resource will be started when needed by the first package and it is stopped when the last package, that the resource is used by, is stopped.
definition |
RS:<subpackage> |
---|---|
action when “start” | The resource definition is processed (left to right/forward). |
action when “stop” | The resource definition is processed (right to left/backwards). |
example |
RS:kerberos |
Stop and start other packages in the cluster.
definition |
RST:<other_package1>[,<other_package2>]…[:CLUSTER] |
---|---|
action when “start” | Start or restart the <other_packageX> on the current cluster node. If CLUSTER is given start or restart the <other_packageX> on all cluster nodes. |
action when “stop” | Stop the <other_packageX> |
example |
…PRG:db_startstop SETSTATE RST:appserver:CLUSTER |
SETSTATE is needed to indicate that the current package is active, although the following resources are not yet processed. That prevents a deadlock situation that the other_package waits indefinetely for the current package to become active.
needs verification
Stop another package in the cluster.
definition |
!SCPKG:<other_package>[:WAIT|STOP] |
|
---|---|---|
action when “start” | none | |
action when “stop” |
! example |
|
needs functional test if still necessary.
definition |
SETSTATE |
---|---|
action when “start” | Set the state of the current package to active, following RST entries can then be processed correctly. |
action when “stop” | none |
example |
SETSTATE |
Start a sub-package.
definition |
SPKG:<sub_package>:<node> |
---|---|
action when “start” | Start the <sub_package> on <node>. |
action when “stop” | none |
example |
SPKG:apache:webhost1 |
needs translation
Like TST.
definition |
STST:<secs>:<num>[:<pfad>] |
---|---|
action when “start” | Wie TST, nur das Paket wird auf dem gleichen Knoten neu gestartet. Wenn <num> angegeben, dann wird maximal <num> mal neu gestartet. |
action when “stop” | The test script is stopped. |
example |
|
needs translation
Testskript zum automatischen Switch angeben
definition |
TST:<secs>[:<path>] |
|
---|---|---|
action when “start” |
Es wird auf dem nächsten erlaubten Knoten ein Testskriptgestaertet. Dieses Skript ruft alle <secs> Sekunden dasProgramm <path> auf, das die Verfügbarkeit der Ressource prüft. Wenn das Skript einen Fehlerwert liefert, dann wird vom Test-Knoten versucht, das Paket zu stoppen und anschließend wiederzu starten. Der Test-Knoten ist der nächste erlaubte Knoten aus der packages.conf. Wenn das Paket auf dem letzten Knoten ausder packages.conf gestartet wird, dann wird kein Testskript
gestartet. ! action when “stop” |
The test script is stopped. |
example |
TST:60:/usr/local/sccl/test_apache |
Activate a volume group. (HP-UX only)
definition |
VG:<vg> |
---|---|
action when “start” | Volume group <vg> is activated. |
action when “stop” | Volume group <vg> is deactivated. |
example |
VG:vgdatabase |