Go to main content

Oracle® Solaris Cluster Data Service for Oracle Solaris Zones Guide

Exit Print View

Updated: September 2015
 
 

Specifying Configuration Parameters for the Zone Script Resource

HA for Solaris Zones provides the script sczsh_register, which automates the process of configuring zone script resource. By default this script obtains configuration parameters from the sczsh_config file in the /opt/SUNWsczone/sczsh/util directory. To specify configuration parameters for the zone script resource, copy the sczsh_config file to a different filename and amend it as described below. It is recommended to keep this file as a future reference. The register script provides option –f to specify the fully qualified filename to the copied configuration file.

Each configuration parameter in the sczsh_config file is defined as a keyword-value pair. The sczsh_config file already contains the required keywords and equals signs. For more information, see Listing of sczsh_config. When you edit the sczsh_config file, add the required value to each keyword.

The keyword-value pairs in the sczsh_config file are as follows:

RS=sczsh-rs
RG=sczbt-rg
SCZBT_RS=sczbt-rs
PARAMETERDIR=
Zonename=sczbt-zone-name
ServiceStartCommand=sczsh-start-command
ServiceStopCommand=sczsh-stop-command
ServiceProbeCommand=sczsh-probe-command

The meaning and permitted values of the keywords in the sczsh_config file are as follows:

RS=sczsh-rs

Specifies the name that you are assigning to the zone script resource. You must specify a value for this keyword.

RG=sczbt-rg

Specifies the name of the resource group the zone boot resource resides in. You must specify a value for this keyword.

SCZBT_RS=sczbt-rs

Specifies the name of the zone boot resource. You must specify a value for this keyword.

PARAMETERDIR=

This keyword is deprecated. Leave the value empty for this keyword.

Zonename=sczbt-zone-name

Specifies the zone name. You must specify a value for this keyword.

ServiceStartCommand=sczsh-start-command

Specifies the zone start command or script to run. You must specify a value for this keyword.

ServiceStopCommand=sczsh-stop-command

Specifies the zone stop command or script to run. You must specify a value for this keyword

ServiceProbeCommand=sczsh-probe-command

Specifies the zone probe command or script to run. You must specify a value for this keyword

Example 3  Sample sczsh_config File

In this example the zone script resource uses the scripts that are available with the pkg:/web/server/apache-22 package on Oracle Solaris 11. Before this example can be used the Apache2 configuration file http.conf needs to be configured. For the purpose of this example, the delivered /etc/apache2/2.2/http.conf can be used. Amend the file so that you can successfully start and stop the Apache httpd server.

This example shows an sczsh_config file in which configuration parameters are set as follows:

  • The name of the zone script resource is zone1-script-rs.

  • The name of the resource group for the zone script resource is zone1-rg.

  • The name of the zone boot resource is zone1-rs.

  • The name of the zone is zone1.

  • The name of the zone script resource start command and its parameter is "/lib/svc/method/http-apache22 start".

  • The name of the zone script resource stop command and its parameter is "/lib/svc/method/http-apache22 stop".

  • The name of the zone script resource probe command is "/var/tmp/probe-apache2". This script is shown in Example 4, Zone SMF Probe Script for Apache2 and must exist in zone1.

RS="zone1-script-rs"
RG="zone1-rg"
SCZBT_RS="zone1-rs"
PARAMETERDIR=
Zonename="zone1"
ServiceStartCommand="/lib/svc/method/http-apache22 start"
ServiceStopCommand="/lib/svc/method/http-apache22 stop"
ServiceProbeCommand="/var/tmp/probe-apache2"