Sun Cluster HA for Solaris Containers provides the script sczsmf_register, which automates the process of configuring the zone SMF resource. By default this script obtains configuration parameters from the sczsmf_config file in the /opt/SUNWsczone/sczsmf/util directory. To specify configuration parameters for the zone SMF resource, copy the sczsmf_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 sczmf_config file is defined as a keyword-value pair. The sczsmf_config file already contains the required keywords and equals signs. For more information, see Listing of sczsmf_config. When you edit the sczsmf_config file, add the required value to each keyword.
The keyword-value pairs in the sczsmf_config file are as follows:
RS=sczsmf-rs RG=sczbt-rg SCZBT_RS=sczbt-rs ZONE=sczbt-zone-name SERVICE=smf-service RECURSIVE=true|false STATE=true|false SERVICE_PROBE=sczsmf-service-probe
The meaning and permitted values of the keywords in the sczsmf_config file are as follows:
Specifies the name that you are assigning to the zone SMF resource. This must be defined.
Specifies the name of the resource group the zone boot resource resides in. This must be defined.
Specifies the name of the zone boot resource. You must specify a value for this keyword.
Specifies the zone name. This must be defined.
Specifies the SMF service to enable/disable. This must be defined.
Specifies true to enable the service recursively or false to just enable the service and no dependents. This must be defined.
Specifies true to wait until the service state is reached or false to not wait until the service state is reached. This must be defined.
Specify the script to check the SMF service. Specifying a value for this keyword is optional.
In this example the zone SMF resource uses the Apache2 SMF service that is available in Solaris 10. Before this example can be used the Apache2 configuration file http.conf needs to be configured. For the purpose of this example, the delivered http.conf-example can be used. Copy the file as follows:
# zlogin zone1 # cd /etc/apache2 # cp http.conf-example http.conf # exit
This example shows an sczsmf_config file in which configuration parameters are set as follows:
The name of the zone SMF resource is zone1-smf-rs.
The name of the resource group for the zone SMF resource is zone1-rg.
The name of the zone boot resource is zone1-rs.
The name of the zone name is zone1.
The name of the zone SMF service is apache2.
Indicates that the zone SMF service Recursive option is true.
Indicates that the zone SMF service State option is true.
Indicates that the zone SMF service probe name is /var/tmp/probe-apache2. This script is shown in Example 4 and must exist in zone1.
RS=zone1-smf-rs RG=zone1-rg SCZBT_RS=zone1-rs ZONE=zone1 SERVICE=apache2 RECURSIVE=true STATE=true SERVICE_PROBE=/var/tmp/probe-apache2