免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5828 | 回复: 10
打印 上一主题 下一主题

MC重要文件配置實例 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-03-18 11:09 |只看该作者 |倒序浏览
一、#############################/etc/cmcluster.conf#######################
     1  ############################## cmcluster.conf ##############################
     2  #
     3  # Highly Available Cluster file locations
     4  #
     5  # This file must not be edited
     6  ############################################################################
     7
     8  SGCONF=/etc/cmcluster
     9  SGSBIN=/usr/sbin
    10  SGLBIN=/usr/lbin
    11  SGLIB=/usr/lib
    12  SGRUN=/var/adm/cmcluster
    13  SGAUTOSTART=/etc/rc.config.d/cmcluster
    14  SGFFLOC=/opt/cmcluster/cmff

二、##########################/etc/cmcluster/cluster.ascii##################################
     1  # **********************************************************************
     2  # ********* HIGH AVAILABILITY CLUSTER CONFIGURATION FILE ***************
     3  # ***** For complete details about cluster parameters and how to *******
     4  # ***** set them, consult the Serviceguard manual. *********************
     5  # **********************************************************************
     6
     7  # Enter a name for this cluster.  This name will be used to identify the
     8  # cluster when viewing or manipulating it.
     9
    10  CLUSTER_NAME            cluster
    11
    12
    13  # Cluster Lock Parameters
    14  # The cluster lock is used as a tie-breaker for situations
    15  # in which a running cluster fails, and then two equal-sized
    16  # sub-clusters are both trying to form a new cluster.  The
    17  # cluster lock may be configured using only one of the
    18  # following alternatives on a cluster:
    19  #          the LVM lock disk
    20  #          the quorom server
    21  #
    22  #
    23  # Consider the following when configuring a cluster.
    24  # For a two-node cluster, you must use a cluster lock.  For
    25  # a cluster of three or four nodes, a cluster lock is strongly
    26  # recommended.  For a cluster of more than four nodes, a
    27  # cluster lock is recommended.  If you decide to configure
    28  # a lock for a cluster of more than four nodes, it must be
    29  # a quorum server.
    30
    31  # Lock Disk Parameters.  Use the FIRST_CLUSTER_LOCK_VG and
    32  # FIRST_CLUSTER_LOCK_PV parameters to define a lock disk.
    33  # The FIRST_CLUSTER_LOCK_VG is the LVM volume group that
    34  # holds the cluster lock. This volume group should not be
    35  # used by any other cluster as a cluster lock device.
    36
    37  # Quorum Server Parameters. Use the QS_HOST, QS_POLLING_INTERVAL,
    38  # and QS_TIMEOUT_EXTENSION parameters to define a quorum server.
    39  # The QS_HOST is the host name or IP address of the system
    40  # that is running the quorum server process.  The
    41  # QS_POLLING_INTERVAL (microseconds) is the interval at which
    42  # Serviceguard checks to make sure the quorum server is running.
    43  # The optional QS_TIMEOUT_EXTENSION (microseconds) is used to increase
    44  # the time interval after which the quorum server is marked DOWN.
    45  #
    46  # The default quorum server timeout is calculated from the
    47  # Serviceguard cluster parameters, including NODE_TIMEOUT and
    48  # HEARTBEAT_INTERVAL.  If you are experiencing quorum server
    49  # timeouts, you can adjust these parameters, or you can include
    50  # the QS_TIMEOUT_EXTENSION parameter.
    51  #
    52  # The value of QS_TIMEOUT_EXTENSION will directly effect the amount
    53  # of time it takes for cluster reformation in the event of failure.
    54  # For example, if QS_TIMEOUT_EXTENSION is set to 10 seconds, the cluster
    55  # reformation will take 10 seconds longer than if the QS_TIMEOUT_EXTENSION
    56  # was set to 0. This delay applies even if there is no delay in
    57  # contacting the Quorum Server.  The recommended value for
    58  # QS_TIMEOUT_EXTENSION is 0, which is used as the default
    59  # and the maximum supported value is 30000000 (5 minutes).
    60  #
    61  # For example, to configure a quorum server running on node
    62  # \"qshost\" with 120 seconds for the QS_POLLING_INTERVAL and to
    63  # add 2 seconds to the system assigned value for the quorum server
    64  # timeout, enter:
    65  #
    66  # QS_HOST qshost
    67  # QS_POLLING_INTERVAL 120000000
    68  # QS_TIMEOUT_EXTENSION 2000000
    69
    70  FIRST_CLUSTER_LOCK_VG           /dev/vglock
    71
    72
    73
    74  # Definition of nodes in the cluster.
    75  # Repeat node definitions as necessary for additional nodes.
    76  # NODE_NAME is the specified nodename in the cluster.
    77  # It must match the hostname and both cannot contain full domain name.
    78  # Each NETWORK_INTERFACE, if configured with IPv4 address,
    79  # must have ONLY one IPv4 address entry with it which could
    80  # be either HEARTBEAT_IP or STATIONARY_IP.
    81  # Each NETWORK_INTERFACE, if configured with IPv6 address(es)
    82  # can have multiple IPv6 address entries(up to a maximum of 2,
    83  # only one IPv6 address entry belonging to site-local scope
    84  # and only one belonging to global scope) which must be all
    85  # STATIONARY_IP. They cannot be HEARTBEAT_IP.
    86
    87
    88  NODE_NAME               chnytp01
    89    NETWORK_INTERFACE     lan1
    90      HEARTBEAT_IP        192.168.3.1
    91    NETWORK_INTERFACE     lan5
    92    NETWORK_INTERFACE     lan4
    93      HEARTBEAT_IP        10.134.95.65
    94    FIRST_CLUSTER_LOCK_PV /dev/dsk/c6t1d2
    95  # List of serial device file names
    96  # For example:
    97  # SERIAL_DEVICE_FILE    /dev/tty0p0
    98
    99  # Possible standby Network Interfaces for lan1,lan4: lan5.
   100
   101  NODE_NAME               chnyts01
   102    NETWORK_INTERFACE     lan1
   103      HEARTBEAT_IP        192.168.3.2
   104    NETWORK_INTERFACE     lan5
   105    NETWORK_INTERFACE     lan4
   106      HEARTBEAT_IP        10.134.95.85
   107    FIRST_CLUSTER_LOCK_PV /dev/dsk/c6t1d2
   108  # List of serial device file names
   109  # For example:
   110  # SERIAL_DEVICE_FILE    /dev/tty0p0
   111
   112  # Possible standby Network Interfaces for lan1,lan4: lan5.
   113
   114
   115  # Cluster Timing Parameters (microseconds).
   116
   117  # The NODE_TIMEOUT parameter defaults to 2000000 (2 seconds).
   118  # This default setting yields the fastest cluster reformations.
   119  # However, the use of the default value increases the potential
   120  # for spurious reformations due to momentary system hangs or
   121  # network load spikes.
   122  # For a significant portion of installations, a setting of
   123  # 5000000 to 8000000 (5 to 8 seconds) is more appropriate.
   124  # The maximum value recommended for NODE_TIMEOUT is 30000000
   125  # (30 seconds).
   126
   127  HEARTBEAT_INTERVAL              25000000
   128  NODE_TIMEOUT            50000000
   129
   130
   131  # Configuration/Reconfiguration Timing Parameters (microseconds).
   132
   133  AUTO_START_TIMEOUT      600000000
   134  NETWORK_POLLING_INTERVAL        2000000
   135
   136  # Network Monitor Configuration Parameters.
   137  # The NETWORK_FAILURE_DETECTION parameter determines how LAN card failures are detected.
   138  # If set to INONLY_OR_INOUT, a LAN card will be considered down when its inbound
   139  # message count stops increasing or when both inbound and outbound
   140  # message counts stop increasing.
   141  # If set to INOUT, both the inbound and outbound message counts must
   142  # stop increasing before the card is considered down.
   143  NETWORK_FAILURE_DETECTION               INOUT
   144
   145  # Package Configuration Parameters.
   146  # Enter the maximum number of packages which will be configured in the cluster.
   147  # You can not add packages beyond this limit.
   148  # This parameter is required.
   149  MAX_CONFIGURED_PACKAGES         5
   150
   151
   152  # Access Control Policy Parameters.
   153  #
   154  # Three entries set the access control policy for the cluster:
   155  # First line must be USER_NAME, second USER_HOST, and third USER_ROLE.
   156  # Enter a value after each.
   157  #
   158  # 1. USER_NAME can either be ANY_USER, or a maximum of
   159  #    8 login names from the /etc/passwd file on user host.
   160  #    The following special characters are NOT supported for USER_NAME
   161  #    \' \', \'/\', \'\\\', \'*\'
   162  # 2. USER_HOST is where the user can issue Serviceguard commands.
   163  #    If using Serviceguard Manager, it is the COM server.
   164  #    Choose one of these three values: ANY_SERVICEGUARD_NODE, or
   165  #    (any) CLUSTER_MEMBER_NODE, or a specific node. For node,
   166  #    use the official hostname from domain name server, and not
   167  #    an IP addresses or fully qualified name.
   168  # 3. USER_ROLE must be one of these three values:
   169  #    * MONITOR: read-only capabilities for the cluster and packages
   170  #    * PACKAGE_ADMIN: MONITOR, plus administrative commands for packages
   171  #      in the cluster
   172  #    * FULL_ADMIN: MONITOR and PACKAGE_ADMIN plus the administrative
   173  #      commands for the cluster.
   174  #
   175  # Access control policy does not set a role for configuration
   176  # capability. To configure, a user must log on to one of the
   177  # cluster\'s nodes as root (UID=0). Access control
   178  # policy cannot limit root users\' access.
   179  #
   180  # MONITOR and FULL_ADMIN can only be set in the cluster configuration file,
   181  # and they apply to the entire cluster. PACKAGE_ADMIN can be set in the
   182  # cluster or a package configuration file. If set in the cluster
   183  # configuration file, PACKAGE_ADMIN applies to all configured packages.
   184  # If set in a package configuration file, PACKAGE_ADMIN applies to that
   185  # package only.
   186  #
   187  # Conflicting or redundant policies will cause an error while applying
   188  # the configuration, and stop the process. The maximum number of access
   189  # policies that can be configured in the cluster is 200.
   190  #
   191  # Example: to configure a role for user john from node noir to
   192  # administer a cluster and all its packages, enter:
   193  # USER_NAME  john
   194  # USER_HOST  noir
   195  # USER_ROLE  FULL_ADMIN
   196
   197
   198  # List of cluster aware LVM Volume Groups. These volume groups will
   199  # be used by package applications via the vgchange -a e command.
   200  # Neither CVM or VxVM Disk Groups should be used here.
   201  # For example:
   202  # VOLUME_GROUP          /dev/vgdatabase
   203  # VOLUME_GROUP          /dev/vg02
   204
   205  VOLUME_GROUP            /dev/vgdbis
   206  VOLUME_GROUP            /dev/vgapis
   207  VOLUME_GROUP            /dev/vgdbes
   208  VOLUME_GROUP            /dev/vgapes
   209  VOLUME_GROUP            /dev/vglock
###########################/etc/cmcluster/sharedtape/ats_tapelibs#######################
# sccs @(#) Advanced Tape Services A.11.09
#
#  Serviceguard Advanced Tape Services
#
#  Tape library robotic (autochanger) identification file
#
#  Path - /etc/cmcluster/sharedtape/ats_tapelibs
#
#  Syntax - :vendor:product_id:
#
#  This file may be edited (perhaps to recognize newly
#  supported hardware).  However, the file will be
#  overlaid by any subsequent update (or reinstall) of
#  the Advanced Tape Services software.
#
:HP:C5177-7000:
:HP:C5177-4000:
:HP:C5173-7000:
:HP:C5173-4000:
:HP:A4845A:
:HP:A4846A:
:HP:A4853A:
:HP:C1194F:
:HP:A5597A:
:HP:C7200-8000:
:HP:A5617A:

论坛徽章:
0
2 [报告]
发表于 2008-03-18 11:10 |只看该作者

/etc/cmcluster/cvm/VxVM-CVM-pkg.sh

1  #\"(#) A.11.13                                       $Date: 02/12/2001 $\"
     2  # **********************************************************************
     3  # *                                                                    *
     4  # *        HIGH AVAILABILITY PACKAGE CONTROL SCRIPT for CVM.           *
     5  # *                                                                    *
     6  # * ***** Note: This file MUST NOT be edited. *****                    *
     7  # *                                                                    *
     8  # **********************************************************************
     9  # * For complete details about the CVM package                         *
    10  # * consult the MC/ServiceGuard or ServiceGuard OPS Edition            *
    11  # * manpages or manuals.                                               *
    12  # **********************************************************************
    13
    14  # Set PATH to reference the appropriate directories.
    15  PATH=/usr/bin:/usr/sbin:/etc:/bin:/usr/lib/vxvm/bin
    16
    17  SERVICE_NAME[0]=\"vxclustd\"
    18
    19  # **********************************************************************
    20  # *                                                                    *
    21  # *  Some of the options of the vxclustd command                       *
    22  # *                                                                    *
    23  # *     -j nnn  set the join timeout to nnn seconds                    *
    24  # *     -d      set the debug level to 1                               *
    25  # *     -x n    set the debug level to n (n < 10)                      *
    26  # *                                                                    *
    27  # **********************************************************************
    28
    29  SERVICE_CMD[0]=\"/usr/lib/vxvm/bin/vxclustd start\"
    30  SERVICE_RESTART[0]=\"\"
    31
    32
    33  function halt_services
    34  {
    35  for I in ${SERVICE_NAME[@]}
    36  do
    37          print \"$(date \'+%b %e %X\') - Node \\\"$(hostname)\\\": Halting service $I\"
    38          cmhaltserv $I
    39          if (( $? != 0 ))
    40          then
    41                  print \"\\tFunction halt_services\"
    42                  print \"\\tWARNING: Failed to halt service $I\"
    43          fi
    44  done
    45  }
    46
    47
    48
    49  typeset MIN_VERSION=\"A.10.03\"  # Minimum version this control script works on
    50
    51  integer exit_value=0
    52  typeset CUR_VERSION
    53
    54  CUR_VERSION=\"$(/usr/bin/what /usr/lbin/cmcld | /usr/bin/grep \"Date\" | \\
    55                              /usr/bin/egrep \'[AB]\\...\\...|NTT\\...\\...\' | \\
    56                                      cut -f2 -d\" \")\"
    57
    58  if [[ \"${CUR_VERSION}\" = \"\"  ]] || \\
    59                                [[ \"${CUR_VERSION#*.}\" < \"${MIN_VERSION#*.}\" ]]
    60  then
    61      print \"ERROR:  Mismatched control script version ($MIN_VERSION).  You cannot run\"
    62      print \"\\ta version ${MIN_VERSION} control_script on a node running pre\"
    63      print \"\\t${MIN_VERSION} MC/ServiceGuard or ServiceGuard OPS Edition software\"
    64      exit 1
    65  fi
    66
    67  if [[ $1 = \"start\" ]]
    68  then
    69          print \"\\n\\t########### Node \\\"$(hostname)\\\": Starting package at $(date) ###########\"
    70
    71          integer C=0
    72          for I in ${SERVICE_NAME[@]}
    73          do
    74                  print \"$(date \'+%b %e %X\') - Node \\\"$(hostname)\\\": Starting service $I using\"
    75                  print \"   \\\"${SERVICE_CMD[$C]}\\\"\"
    76                  if [[ \"${SERVICE_RESTART[$C]}\" = \"\" ]]
    77                  then
    78                      cmrunserv $I \">> $0.log 2>&1 ${SERVICE_CMD[$C]}\"
    79                  else
    80                      cmrunserv ${SERVICE_RESTART[$C]} $I \">> $0.log 2>&1 ${SERVICE_CMD[$C]}\"
    81                  fi
    82
    83                  if (( $? != 0 ))
    84                  then
    85                      print \"\\tERROR:  Failed to start service ${SERVICE_NAME[$C]}\"
    86                      halt_services
    87                      exit 1
    88                  fi
    89                  (( C = $C + 1 ))
    90          done
    91
    92          # customer_defined_postrun_cmds
    93
    94          integer cvm_join_complete=0
    95          integer cvm_init_wait=0
    96
    97          vxdctl mode | grep enabled >/dev/null 2>&1
    98          while (( $? != 0 ))
    99          do
   100                  sleep 3
   101                  vxdctl mode | grep enabled >/dev/null 2>&1
   102          done
   103
   104          vxdctl -c mode | grep inactive >/dev/null 2>&1
   105
   106          while (( $? == 0 && $cvm_init_wait < 60 ))
   107          do
   108                  sleep 5
   109                  (( cvm_init_wait = $cvm_init_wait + 5 ))
   110                  vxdctl -c mode | grep inactive >/dev/null 2>&1
   111          done
   112
   113          if (( $cvm_init_wait > 59 ))
   114          then
   115                  print \"\\tERROR: Cluster volume manager is inactive after 60 secs\"
   116                  exit 1
   117          fi
   118
   119          while (( $cvm_join_complete == 0 ))
   120          do
   121                  sleep 1
   122                  cstate=`/usr/lib/vxvm/bin/vxclustd nodestate`
   123                  vxclustd_status=$?
   124                  echo $cstate | grep \"joining\" >/dev/null 2>&1
   125                  if (( $? != 0 ))
   126                  then
   127                          case $vxclustd_status in
   128
   129                                  101)
   130                                  print \"\\tERROR: Cluster Volume Manager did not complete its startup\"
   131                                  exit 1
   132                                  ;;
   133
   134                                  103)
   135                                  cvm_join_complete=1
   136                                  ;;
   137
   138                                  *)
   139                                  print \"\\tERROR:  Failed, unknown error.\"
   140                                  ;;
   141
   142                          esac
   143                  fi
   144          done
   145
   146          # Check exit value
   147
   148          if (( $exit_value == 1 ))
   149          then
   150                  print \"\\n\\t########### Node \\\"$(hostname)\\\": Package start failed  at $(date) ###########\"
   151                  exit 1
   152          else
   153                  print \"\\n\\t########### Node \\\"$(hostname)\\\": Package start completed  at $(date) ###########\"
   154                  exit 0
   155          fi
   156
   157  elif [[ $1 = \"stop\" ]]
   158  then
   159          print \"\\n\\t########### Node \\\"$(hostname)\\\": Halting package at $(date) ###########\"
   160
   161          halt_services
   162
   163          # Check exit value
   164          if (( $exit_value == 1 ))
   165          then
   166                  print \"\\n\\t########### Node \\\"$(hostname)\\\": Package halt failed at $(date) ###########\"
   167                  exit 1
   168          else
   169                  print \"\\n\\t########### Node \\\"$(hostname)\\\": Package halt completed at $(date) ###########\"
   170                  exit 0
   171          fi
   172
   173  fi

论坛徽章:
0
3 [报告]
发表于 2008-03-18 11:13 |只看该作者

/etc/cmcluster/cvm/VxVM-CVM-pkg-preshutdown.sh

1  #!/bin/sh
     2
     3  #\"(#) VxVM 3.5m  PHCO_29819                         $Date: 09/29/2003 $\"
     4  # **********************************************************************
     5  # *                                                                    *
     6  # *        HIGH AVAILABILITY CVM PACKAGE PRE SHUTDOWN CHECK SCRIPT.    *
     7  # *                                                                    *
     8  # * ***** Note: This file MUST NOT be edited. *****                    *
     9  # *                                                                    *
    10  # **********************************************************************
    11
    12
    13  VXCLUSTD=/etc/vx/bin/vxclustd
    14  VXKPRINT=/etc/vx/diag.d/vxkprint
    15  AWK=/usr/bin/awk
    16
    17  # find out my nodenumber
    18  node=`$VXCLUSTD -v nodestate | grep nodeId | cut -f2 -d\"=\"`
    19
    20  $VXKPRINT | $AWK \'
    21  BEGIN {
    22          # match means found open|shared and found means found the
    23          # openset corresponding to this Device.
    24          found=0;
    25          pmatch=0;
    26
    27          # res is the final return value
    28          res=0;
    29  }
    30        /^Device/ && $5 ~ /open|shared/ {
    31                  pmatch=1;
    32          }
    33
    34          $1 ~ /openset/ {
    35                  if (pmatch==1) {
    36                          found=1;
    37                          pmatch=0;
    38                  }
    39          }
    40
    41          {
    42                  if (found==1) {
    43                          # $1 now has something like openset=[0,1]
    44                          found=0
    45                          #n=split($1, nodes, \"=\");
    46
    47                          # nodes[2] is [0,1]
    48                          # split off [
    49                          nodes=substr($1, 10);
    50
    51                          #node is now something like 0,1].
    52                          # take out the trailing ]
    53
    54                          n=split(nodes, finalnodes, \"]\");
    55
    56                          # finalnodes is now 0,1
    57                          n=split(finalnodes[1], nodenumbers, \",\");
    58
    59                          for (i=1; i <= n ; ++i) {
    60                                  if ( nodenumbers == mynodenumber) {
    61                                          res=1
    62                                  }
    63                          }
    64
    65                  }
    66          }
    67  END {
    68  exit(res);
    69  }
    70  \' mynodenumber=$node

论坛徽章:
0
4 [报告]
发表于 2008-03-18 11:16 |只看该作者

/etc/cmcluster/pdb_ytis/pdb_ytis.conf

1  # **********************************************************************
     2  # ****** HIGH AVAILABILITY PACKAGE CONFIGURATION FILE (template) *******
     3  # **********************************************************************
     4  # ******* Note: This file MUST be edited before it can be used. ********
     5  # * For complete details about package parameters and how to set them, *
     6  # * consult the Serviceguard Extension for RAC manuals.
     7  # **********************************************************************
     8
     9  # Enter a name for this package.  This name will be used to identify the
    10  # package when viewing or manipulating it.  It must be different from
    11  # the other configured package names.
    12
    13  PACKAGE_NAME    pdb_ytis
    14
    15  # Enter the package type for this package. PACKAGE_TYPE indicates
    16  # whether this package is to run as a FAILOVER or SYSTEM_MULTI_NODE
    17  # package.
    18  #
    19  #    FAILOVER     package runs on one node at a time and if a failure
    20  #                 occurs it can switch to an alternate node.
    21  #
    22  #    SYSTEM_MULTI_NODE
    23  #                 package runs on multiple nodes at the same time.
    24  #                 It can not be started and halted on individual nodes.
    25  #                 Both NODE_FAIL_FAST_ENABLED and AUTO_RUN must be set
    26  #                 to YES for this type of package. All SERVICES must
    27  #                 have SERVICE_FAIL_FAST_ENABLED set to YES.
    28  #
    29  # NOTE: Packages which have a PACKAGE_TYPE of SYSTEM_MULTI_NODE are
    30  #       not failover packages and should only be used for applications
    31  #       provided by Hewlett-Packard.
    32  #
    33  #       Since SYSTEM_MULTI_NODE packages run on multiple nodes at
    34  #       one time, following parameters are ignored:
    35  #
    36  #          FAILOVER_POLICY
    37  #          FAILBACK_POLICY
    38  #
    39  #       Since an IP address can not be assigned to more than node at a
    40  #       time, relocatable IP addresses can not be assigned in the
    41  #       package control script for multiple node packages. If
    42  #       volume groups are assigned to multiple node packages they must
    43  #       activated in a shared mode and data integrity is left to the
    44  #       application. Shared access requires a shared volume manager.
    45  #
    46  #
    47  # Examples : PACKAGE_TYPE   FAILOVER (default)
    48  #            PACKAGE_TYPE   SYSTEM_MULTI_NODE
    49  #
    50
    51  PACKAGE_TYPE                    FAILOVER
    52
    53
    54  # Enter the failover policy for this package. This policy will be used
    55  # to select an adoptive node whenever the package needs to be started.
    56  # The default policy unless otherwise specified is CONFIGURED_NODE.
    57  # This policy will select nodes in priority order from the list of
    58  # NODE_NAME entries specified below.
    59  #
    60  # The alternative policy is MIN_PACKAGE_NODE. This policy will select
    61  # the node, from the list of NODE_NAME entries below, which is
    62  # running the least number of packages at the time this package needs
    63  # to start.
    64
    65  FAILOVER_POLICY                 CONFIGURED_NODE
    66
    67
    68  # Enter the failback policy for this package. This policy will be used
    69  # to determine what action to take when a package is not running on
    70  # its primary node and its primary node is capable of running the
    71  # package. The default policy unless otherwise specified is MANUAL.
    72  # The MANUAL policy means no attempt will be made to move the package
    73  # back to its primary node when it is running on an adoptive node.
    74  #
    75  # The alternative policy is AUTOMATIC. This policy will attempt to
    76  # move the package back to its primary node whenever the primary node
    77  # is capable of running the package.
    78
    79  FAILBACK_POLICY                 MANUAL
    80
    81
    82  # Enter the names of the nodes configured for this package.  Repeat
    83  # this line as necessary for additional adoptive nodes.
    84  #
    85  # NOTE:   The order is relevant.
    86  #         Put the second Adoptive Node after the first one.
    87  #
    88  # Example : NODE_NAME  original_node
    89  #           NODE_NAME  adoptive_node
    90  #
    91  # If all nodes in the cluster are to be specified and order is not
    92  # important, \"NODE_NAME *\" may be specified.
    93  #
    94  # Example : NODE_NAME  *
    95
    96  NODE_NAME      chnytp01
    97  NODE_NAME      chnyts01
    98
    99
   100  # Enter the value for AUTO_RUN. Possible values are YES and NO.
   101  # The default for AUTO_RUN is YES. When the cluster is started the
   102  # package will be automatically started. In the event of a failure the
   103  # package will be started on an adoptive node. Adjust as necessary.
   104  #
   105  # AUTO_RUN replaces obsolete PKG_SWITCHING_ENABLED.
   106
   107  AUTO_RUN                        YES
   108
   109
   110  # Enter the value for LOCAL_LAN_FAILOVER_ALLOWED.
   111  # Possible values are YES and NO.
   112  # The default for LOCAL_LAN_FAILOVER_ALLOWED is YES.  In the event of a
   113  # failure, this permits the cluster software to switch LANs locally
   114  # (transfer to a standby LAN card).  Adjust as necessary.
   115  #
   116  # LOCAL_LAN_FAILOVER_ALLOWED replaces obsolete NET_SWITCHING_ENABLED.
   117
   118  LOCAL_LAN_FAILOVER_ALLOWED      YES
   119
   120
   121  # Enter the value for NODE_FAIL_FAST_ENABLED.
   122  # Possible values are YES and NO.
   123  # The default for NODE_FAIL_FAST_ENABLED is NO.  If set to YES,
   124  # in the event of a failure, the cluster software will halt the node
   125  # on which the package is running. All SYSTEM_MULTI_NODE packages must have
   126  # NODE_FAIL_FAST_ENABLED set to YES.  Adjust as necessary.
   127
   128  NODE_FAIL_FAST_ENABLED          NO
   129
   130
   131  # Enter the complete path for the run and halt scripts.  In most cases
   132  # the run script and halt script specified here will be the same script,
   133  # the package control script generated by the cmmakepkg command.  This
   134  # control script handles the run(ning) and halt(ing) of the package.
   135  # Enter the timeout, specified in seconds, for the run and halt scripts.
   136  # If the script has not completed by the specified timeout value,
   137  # it will be terminated.  The default for each script timeout is
   138  # NO_TIMEOUT.  Adjust the timeouts as necessary to permit full
   139  # execution of each script.
   140  # Note: The HALT_SCRIPT_TIMEOUT should be greater than the sum of
   141  # all SERVICE_HALT_TIMEOUT values specified for all services.
   142
   143  RUN_SCRIPT                      /etc/cmcluster/pdb_ytis/pdb_ytis.cntl
   144  RUN_SCRIPT_TIMEOUT              NO_TIMEOUT
   145  HALT_SCRIPT                     /etc/cmcluster/pdb_ytis/pdb_ytis.cntl
   146  HALT_SCRIPT_TIMEOUT             NO_TIMEOUT
   147
   148
   149  # Enter the names of the storage groups configured for this package.
   150  # Repeat this line as necessary for additional storage groups.
   151  #
   152  # Storage groups are only used with CVM disk groups. Neither
   153  # VxVM disk groups or LVM volume groups should be listed here.
   154  # By specifying a CVM disk group with the STORAGE_GROUP keyword
   155  # this package will not run until the VxVM-CVM-pkg package is
   156  # running and thus the CVM shared disk groups are ready for
   157  # activation.
   158  #
   159  # NOTE: Should only be used by applications provided by
   160  #       Hewlett-Packard.
   161  #
   162  # Example : STORAGE_GROUP  dg01
   163  #           STORAGE_GROUP  dg02
   164  #           STORAGE_GROUP  dg03
   165  #           STORAGE_GROUP  dg04
   166  #
   167
   168
   169  # Enter the SERVICE_NAME, the SERVICE_FAIL_FAST_ENABLED and the
   170  # SERVICE_HALT_TIMEOUT values for this package.  Repeat these
   171  # three lines as necessary for additional service names.  All
   172  # service names MUST correspond to the SERVICE_NAME[] entries in
   173  # the package control script.
   174  #
   175  # The value for SERVICE_FAIL_FAST_ENABLED can be either YES or
   176  # NO.  If set to YES, in the event of a service failure, the
   177  # cluster software will halt the node on which the service is
   178  # running.  If SERVICE_FAIL_FAST_ENABLED is not specified, the
   179  # default will be NO.
   180  #
   181  # SERVICE_HALT_TIMEOUT is represented as a number of seconds.
   182  # This timeout is used to determine the length of time (in
   183  # seconds) the cluster software will wait for the service to
   184  # halt before a SIGKILL signal is sent to force the termination
   185  # of the service.  In the event of a service halt, the cluster
   186  # software will first send a SIGTERM signal to terminate the
   187  # service.  If the service does not halt, after waiting for the
   188  # specified SERVICE_HALT_TIMEOUT, the cluster software will send
   189  # out the SIGKILL signal to the service to force its termination.
   190  # This timeout value should be large enough to allow all cleanup
   191  # processes associated with the service to complete.  If the
   192  # SERVICE_HALT_TIMEOUT is not specified, a zero timeout will be
   193  # assumed, meaning the cluster software will not wait at all
   194  # before sending the SIGKILL signal to halt the service.
   195  #
   196  # Example: SERVICE_NAME                   DB_SERVICE
   197  #          SERVICE_FAIL_FAST_ENABLED      NO
   198  #          SERVICE_HALT_TIMEOUT           300
   199  #
   200  # To configure a service, uncomment the following lines and
   201  # fill in the values for all of the keywords.
   202  #
   203  SERVICE_NAME                    pdb_ytis_service
   204  SERVICE_FAIL_FAST_ENABLED       NO
   205  SERVICE_HALT_TIMEOUT            300
   206
   207
   208  # Enter the network subnet name that is to be monitored for this package.
   209  # Repeat this line as necessary for additional subnet names.  If any of
   210  # the subnets defined goes down, the package will be switched to another
   211  # node that is configured for this package and has all the defined subnets
   212  # available.
   213  # The subnet names could be IPv4 or IPv6. The network subnet
   214  # names that are to be monitored for this package could be a mix
   215  # of IPv4 or IPv6 subnet names
   216
   217  SUBNET         10.134.95.0
   218
   219
   220  # The keywords RESOURCE_NAME, RESOURCE_POLLING_INTERVAL,
   221  # RESOURCE_START, and RESOURCE_UP_VALUE are used to specify Package
   222  # Resource Dependencies.  To define a package Resource Dependency, a
   223  # RESOURCE_NAME line with a fully qualified resource path name, and
   224  # one or more RESOURCE_UP_VALUE lines are required.  The
   225  # RESOURCE_POLLING_INTERVAL and the RESOURCE_START are optional.
   226  #
   227  # The RESOURCE_POLLING_INTERVAL indicates how often, in seconds, the
   228  # resource is to be monitored.  It will be defaulted to 60 seconds if
   229  # RESOURCE_POLLING_INTERVAL is not specified.
   230  #
   231  # The RESOURCE_START option can be set to either AUTOMATIC or DEFERRED.
   232  # The default setting for RESOURCE_START is AUTOMATIC.  If AUTOMATIC
   233  # is specified, Serviceguard will start up resource monitoring for
   234  # these AUTOMATIC resources automatically when the node starts up.
   235  # If DEFERRED is selected, Serviceguard will not attempt to start
   236  # resource monitoring for these resources during node start up.  User
   237  # should specify all the DEFERRED resources in the package run script
   238  # so that these DEFERRED resources will be started up from the package
   239  # run script during package run time.
   240  #
   241  # RESOURCE_UP_VALUE requires an operator and a value.  This defines
   242  # the resource \'UP\' condition.  The operators are =, !=, >, <, >=,
   243  # and <=, depending on the type of value.  Values can be string or
   244  # numeric.  If the type is string, then only = and != are valid
   245  # operators.  If the string contains whitespace, it must be enclosed
   246  # in quotes.  String values are case sensitive.  For example,
   247  #
   248  #                                       Resource is up when its value is
   249  #                                       --------------------------------
   250  #       RESOURCE_UP_VALUE       = UP                    \"UP\"
   251  #       RESOURCE_UP_VALUE       != DOWN                 Any value except \"DOWN\"
   252  #       RESOURCE_UP_VALUE       = \"On Course\"           \"On Course\"
   253  #
   254  # If the type is numeric, then it can specify a threshold, or a range to
   255  # define a resource up condition.  If it is a threshold, then any operator
   256  # may be used.  If a range is to be specified, then only > or >= may be used
   257  # for the first operator, and only < or <= may be used for the second operator.
   258  # For example,
   259  #                                       Resource is up when its value is
   260  #                                       --------------------------------
   261  #       RESOURCE_UP_VALUE     = 5               5                   (threshold)
   262  #       RESOURCE_UP_VALUE     > 5.1             greater than 5.1    (threshold)
   263  #       RESOURCE_UP_VALUE     > -5 and < 10     between -5 and 10   (range)
   264  #
   265  # Note that \"and\" is required between the lower limit and upper limit
   266  # when specifying a range.  The upper limit must be greater than the lower
   267  # limit.  If RESOURCE_UP_VALUE is repeated within a RESOURCE_NAME block, then
   268  # they are inclusively OR\'d together.  Package Resource Dependencies may be
   269  # defined by repeating the entire RESOURCE_NAME block.
   270  #
   271  # Example : RESOURCE_NAME               /net/interfaces/lan/status/lan0
   272  #           RESOURCE_POLLING_INTERVAL   120
   273  #           RESOURCE_START              AUTOMATIC
   274  #           RESOURCE_UP_VALUE           = RUNNING
   275  #           RESOURCE_UP_VALUE           = ONLINE
   276  #
   277  #           Means that the value of resource /net/interfaces/lan/status/lan0
   278  #           will be checked every 120 seconds, and is considered to
   279  #           be \'up\' when its value is \"RUNNING\" or \"ONLINE\".
   280  #
   281  # Uncomment the following lines to specify Package Resource Dependencies.
   282  #
   283  #RESOURCE_NAME              <Full_path_name>
   284  #RESOURCE_POLLING_INTERVAL  <numeric_seconds>
   285  #RESOURCE_START             <AUTOMATIC/DEFERRED>
   286  #RESOURCE_UP_VALUE          <op> <string_or_numeric> [and <op> <numeric>]
   287
   288  # Access Control Policy Parameters.
   289  #
   290  # Three entries set the access control policy for the package:
   291  # First line must be USER_NAME, second USER_HOST, and third USER_ROLE.
   292  # Enter a value after each.
   293  #
   294  # 1. USER_NAME can either be ANY_USER, or a maximum of
   295  #    8 login names from the /etc/passwd file on user host.
   296  # 2. USER_HOST is where the user can issue Serviceguard commands.
   297  #    If using Serviceguard Manager, it is the COM server.
   298  #    Choose one of these three values: ANY_SERVICEGUARD_NODE, or
   299  #    (any) CLUSTER_MEMBER_NODE, or a specific node. For node,
   300  #    use the official hostname from domain name server, and not
   301  #    an IP addresses or fully qualified name.
   302  # 3. USER_ROLE must be PACKAGE_ADMIN. This role grants permission
   303  #    to MONITOR, plus for administrative commands for the package.
   304  #
   305  # These policies do not effect root users. Access Policies here
   306  # should not conflict with policies defined in the cluster configuration file.
   307  #
   308  # Example: to configure a role for user john from node noir to
   309  # administer the package, enter:
   310  # USER_NAME  john
   311  # USER_HOST  noir
   312  # USER_ROLE  PACKAGE_ADMIN
   313

论坛徽章:
0
5 [报告]
发表于 2008-03-18 11:33 |只看该作者

/etc/cmcluster/pdb_ytis/monitor.sh

包的配置文件如下:
while true
do
ps -ef | grep informix |grep \"bin/oninit\" |grep -v grep >/dev/null
if [ $? -eq 0 ]
then
echo Alive>/dev/null
else
echo Die>/dev/null
exit
fi

sleep 2
done

论坛徽章:
0
6 [报告]
发表于 2008-08-14 10:04 |只看该作者
公司管控,不能上傳附件,沒有辦法

论坛徽章:
0
7 [报告]
发表于 2008-09-12 15:02 |只看该作者
thanks for sharing
thank you very much!!!

论坛徽章:
0
8 [报告]
发表于 2008-09-12 16:37 |只看该作者
建议LZ贴的时候剔出#开头的部门,剩下精华部分比饺直观。

论坛徽章:
0
9 [报告]
发表于 2008-10-23 10:17 |只看该作者
感谢分享,收藏:heng:

论坛徽章:
0
10 [报告]
发表于 2009-04-01 10:52 |只看该作者
10# zhanghaitao-neu


顶一下啦
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP