- 論壇徽章:
- 0
|
9,編輯包配置文件(紅色標(biāo)示部分為修改內(nèi)容):[hsedb1:/]#cd /etc/cmcluster/pkg1[hsedb1:/etc/cmcluster/pkg1]#vi pkg1.conf# **********************************************************************# ****** HIGH AVAILABILITY PACKAGE CONFIGURATION FILE (template) *******# **********************************************************************# ******* Note: This file MUST be edited before it can be used. ********# * For complete details about package parameters and how to set them, *# * consult the Serviceguard manual. # **********************************************************************# # "PACKAGE_NAME" is the name that is used to identify the package.# # This name will be used to identify the package when viewing or# manipulating it. Package names must be unique within a cluster.# # # Legal values for PACKAGE_NAME:# Any string that starts and ends with an alphanumeric character, and # contains only alphanumeric characters, dot(.), dash(-), or underscore(_) # in between.# Maximum length is 39 characters. # PACKAGE_NAME pkg1 # "PACKAGE_TYPE" is the type of package.# # The PACKAGE_TYPE attribute specifies the desired behavior for this# package. Legal values and their meaning are described below:# # FAILOVER package runs on one node at a time and if a failure# occurs it can switch to an alternate node.# # MULTI_NODE package runs on multiple nodes at the same time and# can be independently started and halted on# individual nodes. Failures of package components such# as services, EMS resources or subnets, will cause# the package to be halted only on the node on which the# failure occurred. Relocatable IP addresses cannot be# assigned to "multi_node" packages.# # SYSTEM_MULTI_NODE# package runs on all cluster nodes at the same time.# It cannot be started and halted on individual nodes.# Both "NODE_FAIL_FAST_ENABLED" and "AUTO_RUN" # must be set to "YES" for this type of package. All # "SERVICES" must have "SERVICE_FAIL_FAST_ENABLED" set # to "YES". SYSTEM_MULTI_NODE packages are only# supported for use by applications provided by# Hewlett-Packard.# # # Since "MULTI_NODE" and "SYSTEM_MULTI_NODE" packages can run on more# than one node at a time and do not failover in the event of a# package failure, the following parameters cannot be# specified when configuring packages of these types:# # FAILOVER_POLICY# FAILBACK_POLICY# # Since an IP address cannot be assigned to more than one node at# a time, relocatable IP addresses cannot be assigned to# "MULTI_NODE" packages. If volume groups are used in a# "MULTI_NODE" package, they must be activated in shared mode,# leaving the application responsible for data integrity.# # Shared access requires a shared volume manager.# # The default value for "PACKAGE_TYPE" is "FAILOVER".# # Legal values for PACKAGE_TYPE: FAILOVER, MULTI_NODE, SYSTEM_MULTI_NODE. PACKAGE_TYPE MULTI_NODE # "NODE_NAME" specified which nodes this package can run on.# # Enter the names of the nodes configured to run this package, repeat# this line for each cluster member node configured to run this package. # # NOTE: The order in which the nodes are specified here determines the# order of priority when Serviceguard is deciding where to run the# package.# # Example : NODE_NAME first_priority_node# NODE_NAME second_priority_node# # If all nodes in the cluster can run the package, and order is not# important, specify "NODE_NAME *".# # Example : NODE_NAME *# # Legal values for NODE_NAME:# "*", or any node name in the cluster.# Node name is any string that starts and ends with an alphanumeric # character, and contains only alphanumeric characters, dot(.), dash(-), # or underscore(_) in between.# Maximum name length is 39 characters. # NODE_NAME hsedb1 NODE_NAME hsedb2NODE_NAME hsedb3NODE_NAME hsedb4 # "AUTO_RUN" defines whether the package is to be started when the# cluster is started, and if it will fail over automatically.# # Possible values are "YES" and "NO".# The default for "AUTO_RUN" is "YES", meaning that the package will be# automatically started when the cluster is started, and that, in the# event of a failure the package will be started on an adoptive node. If# "AUTO_RUN" is "NO", the package is not started when the cluster# is started, and must be started with the cmrunpkg command.# # "AUTO_RUN" replaces "PKG_SWITCHING_ENABLED".# # Legal values for AUTO_RUN: YES, NO. AUTO_RUN YES # "NODE_FAIL_FAST_ENABLED" will cause node to fail if package fails.# # Possible values are "YES" and "NO".# The default for "NODE_FAIL_FAST_ENABLED" is "NO". In the event of# failure, if "NODE_FAIL_FAST_ENABLED" is set to "YES", Serviceguard# will halt the node on which the package is running. All# "SYSTEM_MULTI_NODE" packages must have "NODE_FAIL_FAST_ENABLED" set to# "YES".# # # Legal values for NODE_FAIL_FAST_ENABLED: YES, NO. NODE_FAIL_FAST_ENABLED NO # "RUN_SCRIPT" is the script that starts a package.# "HALT_SCRIPT" is the script that stops a package.# # Enter the complete path for the run and halt scripts. The scripts must# be located in directory with "cmcluster" in the path name. In most cases# the run script and halt script specified here will be the same script,# the package control script generated by the cmmakepkg command. This# control script handles the run(ning) and halt(ing) of the package.# # Legal values for RUN_SCRIPT:# Full path name for the run script with "cmcluster" in the path name.# The maximum length for the path name is MAXPATHLEN characters long.# RUN_SCRIPT /etc/cmcluster/pkg1/pkg1.cntl # Legal values for HALT_SCRIPT:# Full path name for the halt script with "cmcluster" in the path name.# The maximum length for path name MAXPATHLEN characters long.# HALT_SCRIPT /etc/cmcluster/pkg1/pkg1.cntl # "RUN_SCRIPT_TIMEOUT" is the number of seconds allowed for the package to start.# "HALT_SCRIPT_TIMEOUT" is the number of seconds allowed for the package to halt.# # # If the start or halt function has not completed in the specified# number of seconds, the function will be terminated. The default for# each script timeout is "NO_TIMEOUT". Adjust the timeouts as necessary# to permit full execution of each function.# # Note: The "HALT_SCRIPT_TIMEOUT" should be greater than the sum of# all "SERVICE_HALT_TIMEOUT" values specified for all services.# # Legal values for RUN_SCRIPT_TIMEOUT: NO_TIMEOUT, (value > 0). RUN_SCRIPT_TIMEOUT NO_TIMEOUT # Legal values for HALT_SCRIPT_TIMEOUT: NO_TIMEOUT, (value > 0). HALT_SCRIPT_TIMEOUT NO_TIMEOUT # "SUCCESSOR_HALT_TIMEOUT" limits the amount of time Serviceguard waits# for packages that depend on this package ("successor packages") to# halt, before running the halt script of this package.# # SUCCESSOR_HALT_TIMEOUT limits the amount of time# Serviceguard waits for successors of this package to# halt, before running the halt script of this package.# This is an optional parameter.# Permissible values are 0 - 4294 (specifying the maximum# number of seconds Serviceguard will wait).# The default value is "NO_TIMEOUT", which means Serviceguard# will wait for as long as it takes for the successor package to halt.# The timeout of 0 indicates, that this package will halt without# waiting for successors packages to halt# Example: \n"# SUCCESSOR_HALT_TIMEOUT NO_TIMEOUT# SUCCESSOR_HALT_TIMEOUT 60# # Legal values for SUCCESSOR_HALT_TIMEOUT: NO_TIMEOUT, ( (value >= 0) && (value SUCCESSOR_HALT_TIMEOUT NO_TIMEOUT # "SCRIPT_LOG_FILE" is the full path name for the package control script# log file. The maximum length of the path name is MAXPATHLEN characters long.# # If not set, the script output is sent to a file named by appending# ".log" to the script path.# # Legal values for SCRIPT_LOG_FILE: #SCRIPT_LOG_FILE # "FAILOVER_POLICY" is the policy to be applied when package fails.# # This policy will be used to select a node whenever the package needs# to be started or restarted. The default policy is "CONFIGURED_NODE".# This policy means Serviceguard will select nodes in priority order# from the list of "NODE_NAME" entries.# # # The alternative policy is "MIN_PACKAGE_NODE". This policy means# Serviceguard will select from the list of "NODE_NAME" entries the# node, which is running fewest packages when this package needs to# start.# # Legal values for FAILOVER_POLICY: CONFIGURED_NODE, MIN_PACKAGE_NODE. FAILOVER_POLICY CONFIGURED_NODE # "FAILBACK_POLICY" is the action to take when a package is not running# on its primary node.# # This policy will be used to determine what action to take when a# package is not running on its primary node and its primary node is# capable of running the package. The default policy is "MANUAL". The# "MANUAL" policy means no attempt will be made to move the package back# to its primary node when it is running on an adoptive node.# # The alternative policy is "AUTOMATIC". This policy means Serviceguard# will attempt to move the package back to its primary node as soon as# the primary node is capable of running the package.# # # Legal values for FAILBACK_POLICY: MANUAL, AUTOMATIC. FAILBACK_POLICY MANUAL # "PRIORITY" specifies the PRIORITY of the package.# # This is an optional parameter. Valid values are a number between# 1 and 3000 or NO_PRIORITY. Default is NO_PRIORITY.# A smaller number indicates higher priority. A package with a# numerical priority has higher priority than a package with NO_PRIORITY.# # If a number is specified, it must be unique in the cluster.# To help assign unique priorities, HP recommends you use# priorities in increments of 20. This will allow you# to add new packages without having to reassign priorities.# # Multi-node and System multi node packages cannot be assigned a priority. # # This parameter is used only when a package depends on other packages,# or other packages depend on this package, but can be specified even# when no dependencies have yet been configured.# If priority is not configured, the package is assigned the default# priority value, NO_PRIORITY.# # Serviceguard gives preference to running the higher priority package.# This means that, if necessary and if package switching is enabled,# Serviceguard will halt a lower priority package which is already# running, and restart it on another node, in order to run a higher# priority package that directly or indirectly depends on it.# # For example, suppose package pkg1 depends on package pkg2# to be up on the same node, both have package switching enabled# and both are currently up on node node1. If pkg1 needs to# fail over to node2, it will also need pkg2 to move to node2.# If pkg1 has higher priority than pkg2, it can force pkg2 to # move to node2. Otherwise, pkg1 cannot fail over because pkg2 is# running on node1.# Examples of package priorities and failover results:# # pkg1 priority pkg2 priority results# 20 40 pkg1 is higher; fails over# 40 20 pkg1 is lower; will not fail over# any number NO_PRIORITY pkg1 is higher; fails over# NO_PRIORITY NO_PRIORITY equal priority; will not fail over# NO_PRIORITY any number pkg1 is lower; will not fail over# # Legal values for PRIORITY: NO_PRIORITY, ( (value >= 1) && (value PRIORITY NO_PRIORITY # The package dependency parameters are "DEPENDENCY_NAME",# "DEPENDENCY_CONDITION" and "DEPENDENCY_LOCATION".# # Dependencies are used to describe the relationship between packages# To define a dependency, all three attributes are required.# # "DEPENDENCY_NAME" must have a unique identifier for the dependency.# # "DEPENDENCY_CONDITION"# This is an expression describing what must be true for# the dependency to be satisfied.# # The syntax is: = up, where # depends on the type of the predecessor.# # A multi-node package can depend on another multi-# node or system multi-node package.# # A failover package with the FAILOVER_POLICY with# MIN_PACKAGE_NODE can depend on a multi-node or# system multi-node package.# # A failover package with the FAILOVER_POLICY with# CONFIGURED_NODE can depend on a multi-node, system# multi-node or another failover package with the# FAILOVER_POLICY set to CONFIGURED_NODE.# # "DEPENDENCY_LOCATION"# This describes where the condition must be satisfied.# The only possible value for this attribute is "same_node"# # NOTE: # If dependencies are used on a CFS cluster, these are automatically# setup in the system_multi_node and multi_node packages created for# disk groups and mount points.# # Example : # DEPENDENCY_NAME SG-CFS-MP-1_dep # DEPENDENCY_CONDITION SG-CFS-MP-1=up# DEPENDENCY_LOCATION same_node# # Legal values for DEPENDENCY_NAME:# Any string that starts and ends with an alphanumeric character, and # contains only alphanumeric characters, dot(.), dash(-), or underscore(_) # in the middle.# Maximum string length is 39 characters. # # Legal values for DEPENDENCY_CONDITION: # Legal values for DEPENDENCY_LOCATION: same_node. #DEPENDENCY_NAME #DEPENDENCY_CONDITION #DEPENDENCY_LOCATION # "LOCAL_LAN_FAILOVER_ALLOWED" will allow LANs to be switched locally.# # Possible values are "YES" and "NO".# The default for "LOCAL_LAN_FAILOVER_ALLOWED" is "YES". In the event of a# failure, this permits the Serviceguard to switch LANs locally# (transfer to a standby LAN card). Adjust as necessary.# # "LOCAL_LAN_FAILOVER_ALLOWED" replaces "NET_SWITCHING_ENABLED".# # Legal values for LOCAL_LAN_FAILOVER_ALLOWED: YES, NO. LOCAL_LAN_FAILOVER_ALLOWED YES # "MONITORED_SUBNET" specifies the addresses of subnets that are to be # monitored for this package.# # Enter the network subnet name that is to be monitored for this package.# Repeat this line as necessary for additional subnet names. If any of# the subnets defined goes down, the package will be switched to another# node that is configured for this package and has all the defined subnets# available.# # "MONITORED_SUBNET" replaces "SUBNET".# # The MONITORED_SUBNET names can be IPv4 or IPv6, or a mix of both.# # Example : # MONITORED_SUBNET 192.10.25.0 # (netmask=255.255.255.0)# MONITORED_SUBNET 2001::/64 # (netmask=ffff:ffff:ffff:ffff::)# MONITORED_SUBNET 2001:: # (netmask=ffff:ffff:ffff:ffff::)# # Legal values for MONITORED_SUBNET: # "MONITORED_SUBNET_ACCESS" defines how the MONITORED_SUBNET is# configured in the cluster.# # # MONITORED_SUBNET_ACCESS defines whether access to a MONITORED_SUBNET# is configured on all of the nodes that can run this package, or only# on some. Possible values are "PARTIAL" and "FULL". "PARTIAL" means# that the MONITORED_SUBNET is expected to be configured on one or more# of the nodes this package can run on, but not all. "FULL" means that# the MONITORED_SUBNET is expected to be configured on all the nodes# that this package can run on. "FULL" is the default. (Specifying# "FULL" is equivalent to not specifying the monitored_subnet_access at# all.) # # Legal values for MONITORED_SUBNET_ACCESS: PARTIAL, FULL. MONITORED_SUBNET 10.22.133.64 #MONITORED_SUBNET_ACCESS # "CLUSTER_INTERCONNECT_SUBNET" specifies subnets that are to be monitored for # a SGERAC multi-node package.# # # This parameter requires an IPV4 address. CLUSTER_INTERCONNECT_SUBNETs # can be configured only for multi_node packages in SGeRAC configurations.# # # Legal values for CLUSTER_INTERCONNECT_SUBNET: #CLUSTER_INTERCONNECT_SUBNET # "SERVICE_NAME" is a long lived (daemon) executable which# Serviceguard will monitor while the package is up.# # "SERVICE_NAME", "SERVICE_FAIL_FAST_ENABLED" and "SERVICE_HALT_TIMEOUT" # specify a service for this package.# # The value for "SERVICE_FAIL_FAST_ENABLED" can be either "yes" or # "no". The default is "no". If "SERVICE_FAIL_FAST_ENABLED" is set to# "yes", and the service fails, Serviceguard will halt the node on which# the service is running.# # # "SERVICE_HALT_TIMEOUT" is a number of seconds. This timeout is used# to determine the length of time the Serviceguard will wait for the# service to halt before a SIGKILL signal is sent to force the# termination of the service. In the event of a service halt,# Serviceguard will first send a SIGTERM signal to terminate the# service. If the service does not halt, Serviceguard will wait for the# specified "SERVICE_HALT_TIMEOUT", then send the SIGKILL signal to# force the service to terminate. This timeout value should be large# enough to allow all cleanup processes associated with the service to# complete. If the "SERVICE_HALT_TIMEOUT" is not specified, a zero# timeout will be assumed, meaning the cluster software will not wait at# all before sending the SIGKILL signal to halt the service.# # # Example: # SERVICE_NAME service_1a # SERVICE_FAIL_FAST_ENABLED no # SERVICE_HALT_TIMEOUT 300 # # SERVICE_NAME service_1b# SERVICE_FAIL_FAST_ENABLED no # SERVICE_HALT_TIMEOUT 300 # # SERVICE_NAME service_1c# SERVICE_FAIL_FAST_ENABLED no # SERVICE_HALT_TIMEOUT 300 # # Note: No environmental variables will be passed to the service command, this# includes the PATH variable. Absolute path names are required for the# service command definition. Default shell is /usr/bin/sh.# # Legal values for SERVICE_NAME:# Any string that starts and ends with an alphanumeric character, and # contains only alphanumeric characters, dot(.), dash(-), or underscore(_) # in between.# Maximum string length is 39 characters. # # Legal values for SERVICE_FAIL_FAST_ENABLED: yes, no.# Legal values for SERVICE_HALT_TIMEOUT: (value >= 0). #SERVICE_NAME #SERVICE_FAIL_FAST_ENABLED #SERVICE_HALT_TIMEOUT # Event Monitoring Service Resource Dependencies# # Event monitoring service resource dependencies are specified with the# following parameters: "RESOURCE_NAME", "RESOURCE_POLLING_INTERVAL", # "RESOURCE_START" and "RESOURCE_UP_VALUE".# # To define a package resource dependency, a "RESOURCE_NAME" line with # a fully qualified resource path name, and one or more # "RESOURCE_UP_VALUE" lines are required. "RESOURCE_POLLING_INTERVAL" and# the "RESOURCE_START" are optional, and will default as described# below if not specified. # # The "RESOURCE_POLLING_INTERVAL" indicates how often, in seconds, the # resource is to be monitored. The default is 60 seconds.# # The "RESOURCE_START" option can be set to either "automatic" or "deferred".# The default is "automatic". "automatic" means Serviceguard will # start up resource monitoring for this resource automatically when the # node starts up. If "deferred" is specified, Serviceguard will not # attempt to start this resource at node start up. User # should specify all the "deferred" resources in the package run script # so that these "deferred" resources will be started up from the package # run script during package run time. # # "RESOURCE_UP_VALUE" requires an operator and a value. This defines # the resource 'UP' condition. The operators are =, !=, >, =, # and Values can be string or # numeric. If the type is string, then only = and != are valid # operators. If the string contains white space, it must be enclosed # in quotes. String values are case sensitive. For example, # # Resource is up when its value is# --------------------------------# RESOURCE_UP_VALUE = UP "UP"# RESOURCE_UP_VALUE != DOWN Any value except "DOWN"# RESOURCE_UP_VALUE = "On Course" "On Course"# # If the type is numeric, then it can specify a threshold, or a range to# define a resource up condition. If it is a threshold, then any operator# may be used. If a range is to be specified, then only > or >= may be used# for the first operator, and only # For example,# Resource is up when its value is# --------------------------------# RESOURCE_UP_VALUE = 5 5 (threshold)# RESOURCE_UP_VALUE > 5.1 greater than 5.1 (threshold)# RESOURCE_UP_VALUE > -5 and 10 between -5 and 10 (range)# # Note that "and" is required between the lower limit and upper limit to# specify a range. The upper limit must be greater than the lower# limit. If "RESOURCE_UP_VALUE" is repeated within a "RESOURCE_NAME"# block, then they are inclusively OR'd together. (Additional package# resource dependencies are defined by repeating the entire# "RESOURCE_NAME" block.)# # Example : RESOURCE_NAME /net/interfaces/lan/status/lan0# RESOURCE_POLLING_INTERVAL 120# RESOURCE_START automatic# RESOURCE_UP_VALUE = running # RESOURCE_UP_VALUE = online # # Means that the value of resource /net/interfaces/lan/status/lan0# will be checked every 120 seconds, and is considered to# be 'up' when its value is "running" or "online".# # Uncomment the following lines to specify package resource dependencies.# # Legal values for RESOURCE_NAME: # Legal values for RESOURCE_POLLING_INTERVAL: ( (value > 0) && (value # Legal values for RESOURCE_START: automatic, deferred.# Legal values for RESOURCE_UP_VALUE: #RESOURCE_NAME #RESOURCE_POLLING_INTERVAL #RESOURCE_START #RESOURCE_UP_VALUE # "STORAGE_GROUP" specifies CVM specific disk group used in this package.# # Enter the names of the storage groups configured for this package.# Repeat this line as necessary for additional storage groups.# # Storage groups are only used with CVM disk groups. Neither# VxVM disk groups or LVM volume groups should be listed here.# By specifying a CVM disk group with the "STORAGE_GROUP" keyword# this package will not run until the CVM system multi node package is# running and thus the CVM shared disk groups are ready for# activation.# # Example : STORAGE_GROUP "dg01"# STORAGE_GROUP "dg02"# STORAGE_GROUP "dg03"# STORAGE_GROUP "dg04"# # Legal values for STORAGE_GROUP:# Any string that starts and ends with an alphanumeric character, and # contains only alphanumeric characters, dot(.), dash(-), or underscore(_) # in the middle.# Maximum string length is 39 characters. # #STORAGE_GROUP # Access Control Policy Parameters.# # "USER_NAME", "USER_HOST" and "USER_ROLE" specify who can administer # this package.# # Three entries set the access control policy for the package: the# first line must be "USER_NAME", the second "USER_HOST", and the third "USER_ROLE".# Enter a value after each. # # 1. "USER_NAME" can either be "ANY_USER", or a maximum of # 8 login names from the /etc/passwd file on user host.# 2. "USER_HOST" is where the user can issue Serviceguard commands. # Choose one of these three values: "ANY_SERVICEGUARD_NODE", # or (any) "CLUSTER_MEMBER_NODE", or a specific node. For node, # use the name portion of the official hostname supplied by the # domain name server, not the IP addresses or fully qualified name.# 3. "USER_ROLE" must be "PACKAGE_ADMIN". This role grants permission# to "monitor", plus for administrative commands for the package.# # These policies do not affect root users. Access Policies defined in# this file must not conflict with policies defined in the cluster# configuration file.# # Example: to configure a role for user john from node noir to# administer the package, enter:# USER_NAME john# USER_HOST noir# USER_ROLE package_admin# # Legal values for USER_NAME:# A string of tokens each of which starts with an alphanumeric character and contains# only alphanumeric and underscore(_) characters. The tokens must be separated by a space # or a tab character. # Maximum length of each user_name is 39 character. # # Legal values for USER_HOST:# Any string that starts and ends with an alphanumeric character, and # contains only alphanumeric characters, dot(.), dash(-), or underscore(_) # in the middle.# Maximum length is 39 character. # # Legal values for USER_ROLE: package_admin. #USER_NAME #USER_HOST #USER_ROLE
本文來(lái)自ChinaUnix博客,如果查看原文請(qǐng)點(diǎn):http://blog.chinaunix.net/u/6589/showart_721348.html |
|