IBM Books

Administration Guide


Group Services components

The Group Services subsystem consists of the following components:

Group Services daemon
The central component of the Group Services subsystem.

Group Services API (GSAPI)
The application programming interface that GS clients use to obtain the services of the Group Services subsystem.

Port numbers
TCP/IP port numbers that the Group Services subsystem uses for communications. The Group Services subsystem also uses Unix domain sockets.

Control script
A shell script that is used to add, start, stop, and delete the Group Services subsystem, which operates under control of the System Resource Controller (SRC) component of AIX.

Files and directories
Various files and directories that are used by the Group Services subsystem to maintain run-time data.

The sections that follow contain more details about each of these components.

The Group Services daemon (hagsd)

The Group Services daemon is contained in the executable file /usr/sbin/rsct/bin/hagsd. This daemon runs on each node of a system partition and on the control workstation. If there is more than one system partition, then multiple daemons run on the control workstation, one per system partition.

Note that the operational domain of the Group Services subsystem on an SP system is a system partition. The control workstation is considered to be part of each domain. Unless otherwise stated, a reference to the Group Services subsystem is a reference to the Group Services subsystem in a single system partition.

A GS client communicates with a Group Services daemon that is running on the same node as the GS client. A GS client communicates with the Group Services daemon, through the GSAPI software, using a Unix domain socket. Before a GS client registers with Group Services, it must set the HA_DOMAIN_NAME environment variable to the name of the system partition in which it is executing. Note that for previous releases of Group Services, the GS clients needed to set the variable HA_SYSPAR_NAME. For PSSP 3.1, you can set either variable but to support compatibility of older clients, all new GS clients should use the variable HA_DOMAIN_NAME because the variable HA_SYSPAR_NAME might eventually be unsupported.

The Group Services API (GSAPI)

The Group Services Application Programming Interface (GSAPI) is a shared library that a GS client uses to obtain the services of the Group Services subsystem. This shared library is supplied in two versions: one for non-thread-safe programs and one for thread-safe programs. These libraries are referenced by the following path names:

These path names are actually symbolic links to the files /usr/sbin/rsct/lib/libha_gs.a and /usr/sbin/rsctl/lib/libha_gs_r.a, respectively. The symbolic links are placed in /usr/lib for ease of use. For serviceability, the actual libraries are placed in the /usr/sbin/rsct/lib directory. These libraries are supplied as shared libraries, also for serviceability.

For details on the GSAPI software, see Group Services Programming Guide and Reference.

To allow non-root users to use Group Services:

  1. Create a group named hagsuser.
  2. Add the desired user IDs to the hagsuser group.
  3. Stop and restart hags (if it was running before you created the hagsuser group).

Users in the created hagsuser group can use Group Services (libha_gs).

Port numbers and sockets

The Group Services subsystem uses several types of communications:

Intra-domain port numbers

For communication between Group Services daemons

within an operational domain, the Group Services subsystem uses a single UDP port number. This port number is recorded in the Syspar_ports SDR class. The class contains two attributes: subsystem and port. The Syspar_ports class object with a subsystem attribute value of hags contains the port number for the Group Services subsystem. Note that the Syspar_ports class is a partitioned SDR class, that is, there is a set of objects for each system partition. When you configure the Group Services subsystem for a particular system partition, use the SDR data that corresponds to that system partition.

The Group Services port number is stored in the SDR so that, when the Group Services subsystem is configured on each node, the port number is fetched from the SDR. This ensures that the same port number is used by all Group Services daemons in the same operational domain. Note that because a Group Services daemon from each operational domain runs on the control workstation, the Group Services subsystem in each system partition must have a unique port number.

This intra-domain port number is also set in the /etc/services file, using the service name hags.syspar_name, where syspar_name is the name of the system partition. The /etc/services file is updated on all nodes in the system partition and on the control workstation. The Group Services daemon obtains the port number from the /etc/services file during initialization.

Unix domain sockets

Unix domain sockets are used for communication between GS clients and the local Group Services daemon (via the GSAPI). These are connection-oriented sockets. The socket name used by the GSAPI to connect to the Group Services daemon is /var/ha/soc/hagsdsocket.syspar_name, where syspar_name is the name of the system partition.

The control script (hagsctrl)

The Group Services control script is contained in the executable file /usr/sbin/rsct/bin/hagsctrl. This script is normally invoked by the syspar_ctrl command, which provides an interface to all of the system-partition-sensitive subsystems.

If necessary, you can invoke the hagsctrl command directly from the command line. Note that before you invoke the hagsctrl command, you must ensure that the SP_NAME environment variable is set to the appropriate system partition name.

For more information about the hagsctrl and syspar_ctrl commands, see the book PSSP: Command and Technical Reference.

The purpose of the hagsctrl command is to add (configure) the Group Services subsystem to a system partition. It can also be used to remove the subsystem from a system partition, start the subsystem, stop it, and clean the subsystem from all system partitions.

For more information, see Configuring Group Services.

Files and directories

The Group Services subsystem uses the following directories:

The /var/ha/lck directory (lock files)

In the /var/ha/lck directory, the hags.tid.syspar_name directory is used to ensure a single running instance of the Group Services daemon, and to establish an instance number for each invocation of the daemon. In the directory name, syspar_name is the name of the system partition. On the control workstation, there may be several instances of the Group Services daemon running, but they are in different operational domains.

The /var/ha/log directory (log files)

The /var/ha/log directory contains trace output from the Group Services daemon.

On the nodes, the |files are called |hags_nodenum_instnum.syspar_name |and |hags_nodenum_instnum.syspar_name.long, where:

On the control workstation and the nodes, the file hags.default.syspar_name.nodenum_instnum contains trace output from the initial startup of the daemon.

The Group Services daemon limits the log size to a pre-established number of lines (by default, 5,000 lines). When the limit is reached, the daemon appends the string .bak to the name of the current log file and begins a new log. If a .bak version already exists, it is removed before the current log is renamed.

The /var/ha/run directory (daemon working files)

In the /var/ha/run directory, a directory called hags.syspar_name is created, where syspar_name is the system partition name. This directory is the current working directory for the Group Services daemon. If the Group Services daemon abnormally terminates, the core dump file is placed in this directory. Whenever the Group Services daemon starts, it renames any core file to core_nodenum.instnum, where nodenum is the node number on which the daemon is running and instnum is the instance number of the previous instance of the daemon.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]