时间:2015-06-18 来源:

HPUX11.31MC-SGSGeRAC配置 【编程语言】

也导入到hbyxdb2上:

环境: 系统版本 hp-unix 11.3v2 1503 serviceguard extension版本 T1907

然后可以在hbyxdb1上做:

USER_HOST ANY_SERVICEGUARD_NODE

Nslookup 10.109.4.129等.

# FILESYSTEM MOUNT RETRY COUNT. # Specify the number of mount retrys for each filesystem. # The default is 0. During startup, the script # will exit with 1. # NOTE: If the FS_MOUNT_RETRY_COUNT > 0, you may enter the following: # # CONCURRENT_FSCK_OPERATIONS=50 # CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS=50 # # LV[0]=/dev/vg01/lvol1; FS[0]=/pkg01aa; FS_MOUNT_OPT[0]="-o rw"; # FS_UMOUNT_OPT[0]="-s"; FS_FSCK_OPT[0]="-s"; FS_TYPE[0]="vxfs" # # LV[1]=/dev/vg01/lvol2; FS[1]=/pkg01ab; FS_MOUNT_OPT[1]="-o rw" # FS_UMOUNT_OPT[1]="-s"; FS_FSCK_OPT[1]="-s"; FS_TYPE[0]="vxfs" # : : : # : : : # : : : # LV[49]=/dev/vg01/lvol50; FS[49]=/pkg01bx; FS_MOUNT_OPT[49]="-o rw" # FS_UMOUNT_OPT[49]="-s"; FS_FSCK_OPT[49]="-s"; FS_TYPE[0]="vxfs" # # IP ADDRESSES # Specify the IP and Subnet address pairs which are used by this package. # You could specify IPv4 or IPv6 IP and subnet address pairs. # Uncomment IP[0]="" and SUBNET[0]="" and fill in the name of your first # IP and subnet address. You must begin with IP[0] and SUBNET[0] and # increment the list in sequence. # # For example, if this package uses an IPv6 IP of 2001::1/64 # The address prefix identifies the subnet as 2001::/64 which is an available # subnet. # enter: # IP[0]=2001::1 # SUBNET[0]=2001::/64 # (netmask=ffff:ffff:ffff:ffff::) # Alternatively the IPv6 IP/Subnet pair can be specified without the prefix # for the IPv6 subnet. # IP[0]=2001::1 # SUBNET[0]=2001:: # (netmask=ffff:ffff:ffff:ffff::) # # Hint: Run "netstat -i" to see the available IPv6 subnets by looking # at the address prefixes # IP/Subnet address pairs for each IP address you want to add to a subnet # interface card. Must be set in pairs, command, SERVICE_CMD[0]="", command, SERVICE_CMD[0], this # includes the PATH variable. Absolute path names are required for the # service command definition. Default shell is /usr/bin/sh. # #SERVICE_NAME[0]="" #SERVICE_CMD[0]="" #SERVICE_RESTART[0]="" # DEFERRED_RESOURCE NAME # Specify the full path name of the 'DEFERRED' resources configured for # this package. Uncomment DEFERRED_RESOURCE_NAME[0]="" and fill in the # full path name of the resource. # #DEFERRED_RESOURCE_NAME[0]="" # DTC manager information for each DTC. # Example: DTC[0]=dtc_20 #DTC_NAME[0]= # HA_NFS_SCRIPT_EXTENSION # If the package uses HA NFS, the name of this script is # assumed to be "hanfs.sh". If set, for example, # the HA NFS script must be placed in the same directory as the package # control script. This allows multiple packages to be run out of the # same directory, before the service is # started. You can create as many functions as you need. function customer_defined_run_cmds { # ADD customer defined run commands. : # do nothing instruction, after the service is # halted. function customer_defined_halt_cmds { # ADD customer defined halt commands. : # do nothing instruction, because a function must contain some command. test_return 52 } # END OF CUSTOMER DEFINED FUNCTIONS 将hbyxdb1的cluster.cntl传输到hbyxdb2/etc/cmcluster/clusterpkg目录下,div页面(重要):

FIRST_CLUSTER_LOCK_PV /dev/dsk/disk6006 #(节点1上共享仲裁盘的磁盘信息)

Warning: Do not modify or enable packages until the halt operation is completed.

PACKAGE STATUS STATE AUTO_RUN SYSTEM orapkg up running enabled no NODE_NAME STATUS STATE SWITCHING hbyxdb1 up running enabled NODE_NAME STATUS STATE SWITCHING hbyxdb2 up running enabled Other_Attributes: ATTRIBUTE_NAME ATTRIBUTE_VALUE Style legacy Priority no_priority

首先div+css+js切图,MC-SG只是挂载共享磁盘承接网站前端,共享磁盘并不切换,承接网站前端也没有IP切换psd切图html,所以该包只是在指定的机器上运行即可,承接网页制作不用切换) # "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, use the multi-threaded vgchange option in # combination with the CONCURRENT_VGCHANGE_OPERATIONS option.

hbyxdb1:root />vgcreate /dev/lockvg /dev/disk/disk6006

从nodedb1上复制到nodedb2:

CONCURRENT_MOUNT_AND_UMOUNT_OPERATIONS=1

IPv4:

5 lan900 (hbyxdb1)

# FILESYSTEMS # Filesystems are defined as entries specifying the logical volume, the mount, # filesystem, umount and fsck options and filesystem type # for the file system. You must begin with LV[0], # FS_MOUNT_OPT[0], FS_FSCK_OPT[0], pkg01a and pkg01b, you would enter the following: # LV[0]=/dev/vg01/lvol1; FS[0]=/pkg01a; FS_MOUNT_OPT[0]="-o rw"; # FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]=""; FS_TYPE[0]="vxfs" # # LV[1]=/dev/vg01/lvol2; FS[1]=/pkg01b; FS_MOUNT_OPT[1]="-o rw" # FS_UMOUNT_OPT[1]=""; FS_FSCK_OPT[1]=""; FS_TYPE[1]="vxfs" # #Nested mount points may also be configured # #LV[0]=""; FS[0]=""; FS_MOUNT_OPT[0]=""; FS_UMOUNT_OPT[0]=""; FS_FSCK_OPT[0]="" #FS_TYPE[0]="" # # VOLUME RECOVERY # # When mirrored VxVM volumes are started during the package control # bring up, uncomment the line # VXVOL="vxvol -g \$DiskGroup -o bg startall" and comment out the default. # # VXVOL="vxvol -g \$DiskGroup -o bg startall"

AUTOSTART_CMCLD=1

2.7 检查完毕后psd切图html,分发到集群中所有结点:

hbyxdb1:root /etc/cmcluster>cmhaltpkg orapkg

The package template has been created. This file must be edited before it can be used.

hbyxdb1:root /etc/cmcluster>rcp /etc/cmcluster/clusterpkg/cluster.cntl hbyxdb2:/etc/cmcluster/clusterpkg/cluster.cntl

hbyxdb1:root />mkdir /dev/lockvg

CLUSTER_NAME hbyxdb_cluster #(配置集群名字)

hbyxdb1:root />vgexport -p -v -s -m /tmp/testvg.map /dev/testvg

2.8 两台机器上建立包目录,psd切图html在两台上都做(oracle相关工作):

One or more packages or package instances have been halted.

hbyxdb1:root />rcp /tmp/testvg.map hbyxdb2:/tmp/testvg.map

如果是新安装机器web外包,则不用这一步.

hbyxdb1:root/etc/cmcluster>vgchange -a y /dev/testvg

hbyxdb2:root />vgimport -s -v -m /tmp/testvg.map /dev/testvg

Volume group "/dev/lockvg" has been successfully created.

hbyxdb2:root />mknod /dev/lockvg/group c 64 0x010000

vgimport: Volume group "/dev/vgora" has been successfully created.

Disabling all packages from running on hbyxdb2.

hbyxdb1:root />mknod /dev/lockvg/group c 64 0x010000

hbyxdb2:root />mkdir /dev/lockvg

IPv4:

hbyxdb1:root/etc/cmcluster>cmmakepkg -s /etc/cmcluster/clusterpkg/cluster.cntl Package control script is created. This file must be edited before it can be used.

Node hbyxdb1 is already halted.

/dev/testvg hbyxdb1 hbyxdb2

3. 创立包配置文件,web外包实际就是激活共享卷组testvg的脚本:

/etc/nsswitch.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/services is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmignoretypes.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmknowncmds is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmnotdisk.conf is the same across nodes hbyxdb1 hbyxdb2 Command 'cat /etc/cmcluster/cmclfiles2check | /usr/sbin/cmcompare -W -v -n hbyxdb1 -n hbyxdb2' exited with status 2 WARNING: Unable to check consistency of all files listed in /etc/cmcluster/cmclfiles2check /etc/cmcluster/clusterpkg/ora.ascii: A legacy package is being used. Attempting to add package orapkg. Maximum configured packages parameter is 300. Configured 1 new packages. Total number of packages configured in the cluster is 1. Modifying configuration on node hbyxdb1 Modifying configuration on node hbyxdb2 Modifying the cluster configuration for cluster hbyxdb_cluster Modifying node hbyxdb1 in cluster hbyxdb_cluster Modifying node hbyxdb2 in cluster hbyxdb_cluster Adding the package configuration for package orapkg.

将testvg的map导出到/tmp下:

NODE_FAIL_FAST_ENABLED NO

5. 发配置文件到所有结点

hbyxdb1:root /etc/cmcluster>cmapplyconf -v -C /etc/cmcluster/cluster.ascii -P /etc/cmcluster/clusterpkg/ora.ascii (分发配置文件) Begin cluster verification... Checking cluster file: /etc/cmcluster/cluster.ascii MAX_CONFIGURED_PACKAGES configured to 300. check_cdsf_group, than on nodes hbyxdb1 /etc/hosts has timestamp "Apr 14 16:33" on nodes hbyxdb2, "Apr 14 16:31" on nodes hbyxdb1 WARNING: /etc/nsswitch.conf permissions could not be checked on nodes hbyxdb1 hbyxdb2

vi /etc/hosts---------两个主机都作

LOCAL_LAN_FAILOVER_ALLOWED YES

/dev/vg00 /dev/disk/disk28_p264000/0xfa00/0x3 hbyxdb1 /dev/disk/disk29 64000/0xfa00/0x4 hbyxdb1 /dev/disk/disk30 64000/0xfa00/0x5 hbyxdb1

AUTO_VG_ACTIVE=0

详细的错误信息在/etc/cmcluster下,手机网页外包如:/etc/cmcluster/clusterpkg/cluster.cntl.log .

使用nslookup检查配置的正确性:

hbyxdb1:root /> cd /tmp

OPS_VOLUME_GROUP /dev/testvg #(这里填写数据盘)

MAX_CONFIGURED_PACKAGES 300

2.4 在hbyxdb1 创立集群配置文件

#public IP 10.109.4.129 hbyxdb1 10.109.4.130 hbyxdb2 #db_priv 10.109.5.65 hbyxdb1-priv 10.109.5.66 hbyxdb2-priv #MC_HB 10.109.5.67 hbyxdb1-hb 10.109.5.68 hbyxdb2-hb #rac_vip 10.109.4.131 hbyxdb1-vip 10.109.4.132 hbyxdb2-vip

CLUSTER STATUS hbyxdb_cluster up NODE STATUS STATE hbyxdb1 up running Cluster_Lock_LVM: VOLUME_GROUP PHYSICAL_VOLUME STATUS /dev/lockvg /dev/disk/disk6006 up Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up LinkAgg0 lan900 PRIMARY up LinkAgg1 lan901 NODE STATUS STATE hbyxdb2 up running Cluster_Lock_LVM: VOLUME_GROUP PHYSICAL_VOLUME STATUS /dev/lockvg /dev/dsk/c4t1d2 up Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up LinkAgg0 lan900 PRIMARY up LinkAgg1 lan901 MULTI_NODE_PACKAGES

hbyxdb2:root />mkdir /dev/testvg

# Configuration/Reconfiguration Timing Parameters (microseconds).

12 lan901 (hbyxdb2)

hbyxdb1:root />mknod /dev/testvg/group c 64 0x020000

Number of configured IPv6 interfaces found: 0. Warning: Unable to determine local domain name for hbyxdb1 check_cdsf_group, use vxdiskadm(1M) to initialize a disk for VxVM. Gathering network information Beginning network probing Completed network probing

HALT_SCRIPT /etc/cmcluster/clusterpkg/cluster.cntl

10.109.5.64 lan901 (hbyxdb1) lan901 (hbyxdb2)

Possible IP Monitor Subnets:

Possible Heartbeat IPs:

hbyxdb1:root />rcp /tmp/lockvg.map hbyxdb2:/tmp/lockvg.map .

IPv6:

否则cmapplyconf报错.

NETWORK_AUTO_FAILBACK YES

/etc/nsswitch.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/services is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmignoretypes.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmknowncmds is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmnotdisk.conf is the same across nodes hbyxdb1 hbyxdb2 Command 'cat /etc/cmcluster/cmclfiles2check | /usr/sbin/cmcompare -W -v -n hbyxdb1 -n hbyxdb2' exited with status 2 WARNING: Unable to check consistency of all files listed in /etc/cmcluster/cmclfiles2check Maximum configured packages parameter is 300. Verified 0 new packages. Total number of packages configured in the cluster is 0. Creating the cluster configuration for cluster hbyxdb_cluster Adding node hbyxdb1 to cluster hbyxdb_cluster Adding node hbyxdb2 to cluster hbyxdb_cluster cmcheckconf: Verification completed. No errors found. Use the cmapplyconf command to apply the configuration.

HEARTBEAT_IP 10.109.4.130

10.109.4.128 Polling Target 10.109.4.254

Nslookup hbyxdb1

然后在hbyxdb1上创建lockvg:

hbyxdb1:root /etc/cmcluster>cmhaltcl -v -f (关闭集群) Disabling all packages from starting on nodes to be halted. Disabling all packages from running on hbyxdb1. Disabling all packages from running on hbyxdb2. Warning: Do not modify or enable packages until the halt operation is completed. This operation may take some time. Waiting for nodes to halt ..... done Successfully halted all nodes specified. Halt operation complete.

确认删除.这样就会保留原有的配置文件psd切图html, 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,任何一台机器都可以:

CONCURRENT_FSCK_OPERATIONS=1

/dev/lockvg hbyxdb1 hbyxdb2

HEARTBEAT_IP 10.109.4.130

USER_NAME ANY_USER

Nslookup hbyxdb2

WARNING: /etc/nsswitch.conf checksum could not be checked on nodes hbyxdb1 hbyxdb2

# "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. # 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", 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, NODE, # SG_NODE and SG_SCRIPT_LOG_FILE are set by Serviceguard # at the time the control script is executed. # Do not set these environment variables yourself! # The package may fail to start or halt if the values for # these environment variables are altered. # NOTE: Starting from 11.17, or the control script may not # function as it should. . ${SGCONFFILE:=/etc/cmcluster.conf} # UNCOMMENT the variables as you set them. # Set PATH to reference the appropriate directories. PATH=$SGSBIN:/usr/bin:/usr/sbin:/etc:/bin # VOLUME GROUP ACTIVATION: # Specify the method of activation for volume groups. # Leave the default (VGCHANGE="vgchange -a e") if you want volume # groups activated in exclusive mode. This assumes the volume groups have # been initialized with 'vgchange -c y' at the time of creation. # # Uncomment the first line (VGCHANGE="vgchange -a e -q n"), if you want to activate volume groups in exclusive mode # and ignore the disk quorum requirement. Since the disk quorum ensures # the integrity of the LVM configuration, and commen # out the default, # ignore the disk quorum requirement, and comment # out the default, and comment # out the default,MC-SG只是挂载共享磁盘div+css+js切图,共享磁盘并不切换,手机网页外包两台机器都需要同时运行该包) # "AUTO_RUN" defines whether the package is to be started when the cluster is started, meaning that the package will be automatically started when the cluster is started, # in the event of a failure the package will be started on an adoptive node. If "AUTO_RUN" is "NO", and must be started with the cmrunpkg command. # "AUTO_RUN" replaces "PKG_SWITCHING_ENABLED". # Legal values for AUTO_RUN: YES, NO.

hbyxdb1:root />cmdeleteconf

10.109.4.128 10.109.4.129 (hbyxdb1) 10.109.4.130 (hbyxdb2)

Writing cluster data to /etc/cmcluster/cluster.ascii.

NETWORK_FAILURE_DETECTION INOUT

/dev/vg00 hbyxdb2

Activated volume group.

/dev/disk/disk6000 /dev/testvg 18 seconds

IPv6:

SUCCESSOR_HALT_TIMEOUT NO_TIMEOUT

2.3 修改参数文件:

NODE_NAME hbyxdb1 NODE_NAME hbyxdb2

# 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.

/dev/dsk/c4t1d2 45/0/2/0/0/0/0.37.85.0.0.1.2 hbyxdb2 /dev/dsk/c6t1d2 45/0/2/0/0/0/0.37.84.0.0.1.2 hbyxdb2 /dev/dsk/c8t1d2 45/0/2/0/0/0/1.36.85.0.0.1.2 hbyxdb2

修改完毕后,网页切图制作检查.

#(因为oracle为RAC,MC-SG只是挂载共享磁盘,网页重构报价共享磁盘并不切换承接网站前端,也没有IP切换,承接网站前端所以该包只是在指定的机器上运行即可psd切图html,不用切换,psd切图html故用 MULTI_NODE 方式) # "NODE_NAME" specified which nodes this package can run on. # Enter the names of the nodes configured to run this package, and order is not important, or any node name in the cluster. # Node name is any string that starts and ends with an alphanumeric character, dot(.), or underscore(_) in between. # Maximum name length is 39 characters.

FAILOVER_POLICY CONFIGURED_NODE

IP_MONITOR OFF #(原来为ON)

# NETWORK_AUTO_FAILBACK # When set to YES a recovery of the primary LAN interface will cause failback # from the standby LAN interface to the primary. # When set to NO a recovery of the primary LAN interface will do nothing and # the standby LAN interface will continue to be used until cmmodnet -e lanX # is issued for the primary LAN interface.

VXVM_DG_RETRY="NO"

/etc/nsswitch.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/services is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmignoretypes.conf is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmknowncmds is the same across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmnotdisk.conf is the same across nodes hbyxdb1 hbyxdb2 Command 'cat /etc/cmcluster/cmclfiles2check | /usr/sbin/cmcompare -W -v -n hbyxdb1 -n hbyxdb2' exited with status 2 WARNING: Unable to check consistency of all files listed in /etc/cmcluster/cmclfiles2check /etc/cmcluster/clusterpkg/ora.ascii: A legacy package is being used. Attempting to validate package orapkg. Maximum configured packages parameter is 300. Verified 1 new packages. Total number of packages configured in the cluster is 0. Modifying configuration on node hbyxdb1 Modifying configuration on node hbyxdb2 Modifying the cluster configuration for cluster hbyxdb_cluster cmcheckconf: Verification completed. No errors found. Use the cmapplyconf command to apply the configuration.

NETWORK_INTERFACE lan901 #(Heartbreak IP)

HEARTBEAT_IP 10.109.4.12 #(原来为STATIONARY_IP)

IPv4:

hbyxdb1:root />cmhaltcl –v –f

vi /etc/lvmrc---------两个主机都作psd切图html,确保机器启动时不会激活共享卷组.lockvg实际上不用激活即可使用.

10.109.4.128 lan900 (hbyxdb1) lan900 (hbyxdb2)

6 lan901 (hbyxdb1)

AUTO_START_TIMEOUT 600000000 NETWORK_POLLING_INTERVAL 2000000

2.5 编辑集群配置文件

NETWORK_INTERFACE lan900 #(public IP)

vi /etc/rc.config.d/cmcluster---------两个主机都作(这个文件默认为只读,psd切图html可以chmod 755 更改文件读写权限)

FS_MOUNT_RETRY_COUNT=0

# IP Monitor Configuration Parameters. # The following set of three parameters can be repeated as necessary. # SUBNET is the subnet to be configured whether or not to be monitored # at IP layer. # IP_MONITOR is set to ON if the subnet is to be monitored at IP layer. # IP_MONITOR is set to OFF if the subnet is not to be monitored at IP layer. # POLLING_TARGET is the IP address to which polling messages are sent # from each network interface in the subnet. # Each SUBNET can have multiple polling targets, peer interfaces in the subnet will be polling targets for each other. # Only subnets with a gateway that is configured to accept # ICMP Echo Request messages will be included by default with IP_MONITOR # set to ON, and with its gateway listed as a POLLING_TARGET.

AUTO_RUN YES

#POLLING_TARGET 10.109.4.25(注释掉)

然后,div页面

1 10.109.4.128

IP_MONITOR OFF

Successfully halted all nodes specified.

hbyxdb2:root />vgimport -s -v -m /tmp/lockvg.map /dev/lockvg

# Optional package default weight parameters. Use WEIGHT_NAME and # WEIGHT_DEFAULT parameters to define a default value for this weight # for all packages except system multi-node packages. # Package weights correspond to node capacities; node capacity # is checked against the corresponding package weight to determine # if the package can run on that node. # # WEIGHT_NAME # specifies a name for a weight that corresponds to a # capacity specified earlier in this file. Weight is defined for # a package, WEIGHT_NAME, if CAPACITY_NAME "memory" is not defined for # node1, pkgB, all three packages are eligible # to run at the same time on node1, a default value of zero will be assumed. If defined, repeat this process for each weight. # Note: for the reserved weight "package_limit", # but it can be overriden in the package configuration file. # # For any given package and WEIGHT_NAME, second USER_HOST, or a maximum of # 8 login names from the /etc/passwd file on user host. # The following special characters are NOT supported for USER_NAME # ' ', '\', it is the COM server. # Choose one of these three values: ANY_SERVICEGUARD_NODE, or a specific node. For node, and not # an IP addresses or fully qualified name. # 3. USER_ROLE must be one of these three values: # * MONITOR: read-only capabilities for the cluster and packages # * PACKAGE_ADMIN: MONITOR, a user must log on to one of the # cluster's nodes as root (UID=0). Access control # policy cannot limit root users' access. # # MONITOR and FULL_ADMIN can only be set in the cluster configuration file, PACKAGE_ADMIN applies to all configured packages. # If set in a package configuration file, and stop the process. The maximum number of access # policies that can be configured in the cluster is 200. # # Example: to configure a role for user john from node noir to # administer a cluster and all its packages, enter: # USER_NAME john # USER_HOST noir # USER_ROLE FULL_ADMI

WARNING: /etc/nsswitch.conf checksum could not be checked on nodes hbyxdb1 hbyxdb2

PRIORITY NO_PRIORITY

Halting package orapkg on node hbyxdb1

修改:/etc/cmcluster/clusterpkg/ora.ascii 如下,承接网站前端红色部分为修改部分:

注意:如果因进程失败引起应用包orapkg在任意节点切换失败psd切图html,此时节点会设置状态不允许orapkg在任意节点上运行,承接网页制作此时我们要用cmmodpkg命令实现包的自动切换web外包, the node switching is disabled Unable to run package orapkg on node hbyxdb2, 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 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. # MONITORED_SUBNET 192.10.26.0 # no MONITORED_SUBNET_ACCESS entry, FULL. #MONITORED_SUBNET #MONITORED_SUBNET_ACCESS # "CLUSTER_INTERCONNECT_SUBNET" specifies subnets that are to be monitored for # a SGERAC multi-node package. # This parameter requires an IPV4 or IPV6 address. CLUSTER_INTERCONNECT_SUBNETs # can be configured only for multi_node packages in SGeRAC configurations. # Legal values for CLUSTER_INTERCONNECT_SUBNET: <Any String> #CLUSTER_INTERCONNECT_SUBNET # "SERVICE_NAME" is a long lived (daemon) executable which # Serviceguard will monitor while the package is up. # "SERVICE_NAME", and the service fails, # Serviceguard will first send a SIGTERM signal to terminate the # service. If the service does not halt, 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, 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, and # contains only alphanumeric characters, dash(-), 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_START" and "RESOURCE_UP_VALUE". # To define a package resource dependency, and one or more # "RESOURCE_UP_VALUE" lines are required. "RESOURCE_POLLING_INTERVAL" and # the "RESOURCE_START" are optional, in seconds, 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 =, >, >=, depending on the type of value. Values can be string or # numeric. If the type is string, it must be enclosed # in quotes. String values are case sensitive. For example, then it can specify a threshold, then any operator # may be used. If a range is to be specified, and only < or <= may be used for the second operator. # For example, 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, deferred. # Legal values for RESOURCE_UP_VALUE: <Any String> #RESOURCE_NAME #RESOURCE_POLLING_INTERVAL #RESOURCE_START #RESOURCE_UP_VALUE # "STORAGE_GROUP" specifies CVM specific disk group used in this package. # # WARNING: "STORAGE_GROUP" is intended to support CVM 3.5 only. This # parameter has been depreciated. It will be obsoleted in a future # Serviceguard release! For CVM 4.1 or later disk groups, and # contains only alphanumeric characters, dash(-), "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", and the third "USER_ROLE". # Enter a value after each. # # 1. "USER_NAME" can either be "ANY_USER", # or (any) "CLUSTER_MEMBER_NODE", # use the name portion of the official hostname supplied by the # domain name server, 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, and # contains only alphanumeric characters, dash(-), amount of available memory, if you set the number # of concurrent operations too high, if you set CONCURRENT_VGCHANGE_OPERATIONS=5 # and the node where the package is started has only one processor, increasing the values a little at a time and observing the # effect on the performance, the values # used should take into account the node with the least resources in the # cluster, if you tune the concurrent operations for a package so # that it provides optimum performance for the package on a node while # no other packages are running on that node, or may even fail when other packages are already running on that node. # # CONCURRENT VGCHANGE OPERATIONS # Specify the number of concurrent volume group activations or # deactivations to allow during package startup or shutdown. # Setting this value to an appropriate number may improve the performance # while activating or deactivating a large number of volume groups in the # package. If the specified value is less than 1, it must be unique in the cluster. # To help assign unique priorities, # a package depends on other packages, but can be specified even # when no weights or dependencies have yet been configured. # If priority is not configured, NO_PRIORITY. # Serviceguard gives preference to running the higher priority package. # This means that, Serviceguard will halt a package (or # halt and restart on anther node) in order to run a higher priority # package. The reason may be: # * the node's capacity would otherwise be exceeded # * there is a direct or indirect dependency between the lower and # higher priority packages. # For example, both have package switching enabled # and both are currently up on node node1. If pkg1 needs to # fail over to node2, it can force pkg2 to # move to node2. Otherwise, ( (value >= 1) && (value <= 3000) ).

WARNING: /etc/nsswitch.conf owner could not be checked on nodes hbyxdb1 hbyxdb2

Volume group "/dev/testvg" has been successfully created.

hbyxdb1:root /etc/cmcluster>cmhaltcl -v

检车结果中WARNING: /etc/nsswitch.conf 可以不用担心.

10.109.5.64 10.109.5.65 (hbyxdb1) 10.109.5.66 (hbyxdb2)

LVM volume groups:

USER_ROLE MONITOR

2.2 创建数据卷组和lockvg (/dev/disk/disk6006),其实也可以直接用数据卷组作为lock vg.

Volume group "/dev/lockvg" has been successfully changed.

Beginning the import process on Volume Group "/dev/testvg".

IP subnets:

# CLUSTER_LOCK_LUN

WARNING: /etc/nsswitch.conf owner could not be checked on nodes hbyxdb1 hbyxdb2

Possible Cluster Lock Devices:

MEMBER_TIMEOUT 14000000

#cmapplyconf -v -C /etc/cmcluster/cluster.ascii

执行完本步骤后,psd切图html集群中所有结点都已生成 /etc/cmcluster/cmclconfig二进制的配置文件

首先创建数据卷组testvg(/dev/rdisk/disk6000):

#vgchange -a n /dev/lockvg #vgchange -a n /dev/testvg

启动cluster

hbyxdb1:root/etc/cmcluster>cmruncl -v

VXVOL="vxvol -g \$DiskGroup startall" # Default

Node Names: hbyxdb1 hbyxdb2

6. 启停MC-SG:

将testvg导入到hbyxdb2上:

修改MC/SG配置:

2.9 建立并修改包配置文件web外包, EMS resources or subnets, 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, they must be activated in shared mode, MULTI_NODE, SYSTEM_MULTI_NODE.

PACKAGE_TYPE MULTI_NODE

Activated volume group.

在磁盘阵列上划分两个磁盘空间,psd切图html一个用于数据testvg, 另一个用于创建lockvg, the script output is sent to a file named by appending # ".log" to the script path. # Legal values for SCRIPT_LOG_FILE: <Any String> #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. # An alternative policy is "SITE_PREFERRED". This policy means # that when selecting nodes from the list of "NODE_NAME" entries, over those that belong to a different site. When # all nodes belonging to the same site where the package last ran are # unable to run the package, # Serviceguard selects a node that belongs to the site that the package # last ran on. When all nodes belonging to the same site where the package # last ran are unable to run the package, manual intervention is # needed to start the package on either the same site or on another site. # Another policy is "MIN_PACKAGE_NODE". This policy means # Serviceguard will select from the list of "NODE_NAME" entries the # node, MIN_PACKAGE_NODE, SITE_PREFERRED_MANUAL.

# ********************************************************************** # ********* HIGH AVAILABILITY CLUSTER CONFIGURATION FILE *************** # ***** For complete details about cluster parameters and how to ******* # ***** set them, if "NODE_FAIL_FAST_ENABLED" is set to "YES", NO.

Begin cluster verification... Checking cluster file: /etc/cmcluster/cluster.ascii. MAX_CONFIGURED_PACKAGES configured to 300. Checking nodes ... Done Checking existing configuration ... Done MAX_CONFIGURED_PACKAGES configured to 300. Gathering storage information Found 5 devices on node hbyxdb1 Found 9 devices on node hbyxdb2 Analysis of 14 devices should take approximately 2 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Found 3 volume groups on node hbyxdb1 Found 3 volume groups on node hbyxdb2 Analysis of 6 volume groups should take approximately 1 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Gathering network information Beginning network probing (this may take a while) Completed network probing Cluster hbyxdb_cluster is an existing cluster Begin file consistency checking WARNING: /etc/hosts is different across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmclfiles2check is the same across nodes hbyxdb1 hbyxdb2 /etc/hosts has different content on nodes hbyxdb2, "Apr 14 16:31" on nodes hbyxdb1 WARNING: /etc/nsswitch.conf permissions could not be checked on nodes hbyxdb1 hbyxdb2

/dev/lockvg /dev/disk/disk6006 64000/0xfa00/0xf hbyxdb1

#cmquerycl -n hbyxdb1 -n hbyxdb2 -v -C /etc/cmcluster/cluster.ascii

# CLUSTER_LOCK_LUN

/var/adm/syslog/syslog.log

首先在hbyxdb1上激活lockvg, (value > 0).

# FILESYSTEM UNMOUNT COUNT # Specify the number of unmount attempts for each filesystem during package # shutdown. The default is set to 1.

# Route information # route id 2: 10.0.10.195 # route id 3: 192.168.100.2 # CAPACITY_NAME # CAPACITY_VALUE # Link Aggregate lan901 contains the following port(s): lan2 # Warning: There are no standby network interfaces for lan901. # Link Aggregate lan902 contains the following port(s): lan4 # Warning: There are no standby network interfaces for lan902. # Cluster Timing Parameters (microseconds). # The MEMBER_TIMEOUT parameter defaults to 14000000 (14 seconds). # If a heartbeat is not received from a node within this time, a setting of as low as 3 seconds is possible. # When a single heartbeat network with standby interfaces is configured, or 22 seconds if the network interface type is # InfiniBand (HP-UX only). # Note that a system hang or network load spike whose duration exceeds # MEMBER_TIMEOUT will result in one or more node failures. # The maximum value recommended for MEMBER_TIMEOUT is 60000000 # (60 seconds).

Route Connectivity (local node information only - full probing was not performed):

Volume Group configuration for /dev/testvg has been saved in /etc/lvmconf/testvg.conf

Modify the cluster configuration ([y]/n)? y Marking/unmarking volume groups for use in the cluster Completed the cluster creation hbyxdb1:root /etc/cmcluster> hbyxdb1:root /etc/cmcluster> hbyxdb1:root /etc/cmcluster>cmruncl -v cmruncl: Validating network configuration... Gathering network information Beginning network probing (this may take a while) Completed network probing cmruncl: Network validation complete cmruncl: Validating cluster lock disk .... Done Waiting for cluster to form .... done Cluster successfully formed. Check the syslog files on all nodes in the cluster to verify that no warnings occurred during startup.

(去激活:#vgchange -c n /dev/lockvg)

查看cluster状态 hbyxdb1:root />cmviewcl -v

VGCHANGE="vgchange -a s" # 因为是共享卷组.

hbyxdb1:root/etc/cmcluster>cmmakepkg -p /etc/cmcluster/clusterpkg/ora.ascii

# The package dependency parameters are "DEPENDENCY_NAME", "DEPENDENCY_NAME" and "DEPENDENCY_CONDITION" # are required and "DEPENDENCY_LOCATION is optional. # "DEPENDENCY_NAME" must be a unique identifier for the dependency. # "DEPENDENCY_CONDITION" describes what must be true for # the dependency to be satisfied. # The syntax is: <package name> = <package status> # The valid values for <package status> are "up" or "down". # "up" means that this package requires the package identified # by "PACKAGE_NAME" to be up (status reported by cmviewcl is "up"). # If "up" is specified, or another failover package whose # FAILOVER_POLICY is CONFIGURED_NODE. # "down" means that this package requires the package # identified by "package name" to be down (status reported by cmviewcl is "down"). This is known as an exclusion dependency. # This means that only one of these packages can be running at any given time. # If "down" value is specified, if pkgA depends on pkgB to be down, you must apply both packages to the # cluster configuration at the same time. # An exclusion dependency is allowed only between failover # packages with configured_node as failover policy, the default value "same_node" will be used. # The possible values for this attribute depend on the # dependency condition. # If an "up" dependency is specified, "any_node", the possible values are "same_node" and "all_nodes". # "same_node" means the package depended on must be down on the same node. # "all_nodes" means the package depended on must be down on all nodes in the cluster. # NOTE: # Within a package, pkg1 cannot have one same_node and one any_node dependency on pkg2. # When a package requires that another package be up and the # DEPENDENCY_LOCATION is any_node or different_node, if pkg1 has a same_node # dependency on pkg2 and pkg2 has an any_node dependency on pkg3, the dependencies among the mount point, # and system multi-node packages are automatically created by the commands that construct those packages. # Example 1 : To specify a "same_node" dependency between pkg1 and pkg2: # pkg1's ascii configuration file: # DEPENDENCY_NAME pkg2_dep # DEPENDENCY_CONDITION pkg2 = up # DEPENDENCY_LOCATION same_node # Example 2 : To specify a "same_node" exclusion dependency between pkg1 and pkg2: # pkg1's ascii configuration file: # DEPENDENCY_NAME pkg2_dep # DEPENDENCY_CONDITION pkg2 = down # DEPENDENCY_LOCATION same_node # pkg2's ascii configuration file: # DEPENDENCY_NAME pkg1_dep # DEPENDENCY_CONDITION pkg1 = down # DEPENDENCY_LOCATION same_node # Note that pkg1 and pkg2 must be applied at the same time. # Legal values for DEPENDENCY_NAME: # Any string that starts and ends with an alphanumeric character, dot(.), or underscore(_) in the middle. # Maximum string length is 39 characters. # Legal values for DEPENDENCY_CONDITION: <Any String> # Legal values for DEPENDENCY_LOCATION: same_node, different_node, they are case insensitive. # A package can use this mechanism to define up to four arbitrary # weight names with corresponding values that are meant to represent # the runtime resource consumption of the package. In the cluster # configuration file, # the package manager will ensure the total value of any given named # weight does not exceed the capacity limit configured for the node. # The "WEIGHT_NAME" is string of up to 39 characters. # The "WEIGHT_VALUE" specifies a value for the named weight that # precedes it. This is an unsigned floating point value between 0 and # 1000000 with at most three digits after the decimal point. # If "WEIGHT_NAME" is specified, repeat this process. # You can define weights either individually within each # package configuration file, the value specified in the package configuration file takes # precedence. This allows you to set an overall default, if you specify WEIGHT_NAME "memory" with WEIGHT_DEFAULT # 1000 in the cluster configuration file, pkgA's # "memory" weight will be 1000. If you define a weight value of 2000 for # "memory" in the configuration file for pkgA, and WEIGHT_NAME and WEIGHT_VALUE # are not specified in this package configuration file for that CAPACITY, the WEIGHT_VALUE for this package is set to one; # otherwise, if you specify CAPACITY "memory" and do not specify # a WEIGHT_DEFAULT for "memory" in the cluster configuration file, then pkgA's "memory" weight will be zero. # Note that cmapplyconf will fail if you define a weight in the package # configuration file and no node in the cluster configuration file # specifies a capacity of the same name. # Weight can be assigned only to multi-node packages, see the cmquerycl man page, and the Managing Serviceguard manual. # Example : # WEIGHT_NAME package_limit # WEIGHT_VALUE 10 # This overrides the default value of 1 and sets the weight for this # package to 10 # Legal values for WEIGHT_NAME: # Any string that starts and ends with an alphanumeric character, dot(.), or underscore(_) # in the middle. # Maximum string length is 39 characters. # Legal values for WEIGHT_VALUE: # Any unsigned floating point string. Only 3 digits after the decimal point # are significant. Maximum string length is 11 characters. #WEIGHT_NAME #WEIGHT_VALUE # "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, NO.

IPv4:

hbyxdb1:root />pvcreate /dev/rdisk/disk6006

# CVM DISK GROUP ACTIVATION: # Specify the method of activation for CVM disk groups. # Leave the default # (CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite") # if you want disk groups activated in the exclusive write mode. # # Uncomment the first line # (CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=readonly"), if you want disk groups activated in # the readonly mode. # # Uncomment the second line # (CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=sharedread"), if you want disk groups activated in the # shared read mode. # # Uncomment the third line # (CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=sharedwrite"), if you want disk groups activated in the # shared write mode. # # CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=readonly" # CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=sharedread" # CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=sharedwrite" CVM_ACTIVATION_CMD="vxdg -g \$DiskGroup set activation=exclusivewrite" # VOLUME GROUPS # Specify which volume groups are used by this package. Uncomment VG[0]="" # and fill in the name of your first volume group. You must begin with # VG[0], if this package uses your volume groups vg01 and vg02, and then two equal-sized # sub-clusters are both trying to form a new cluster. The # cluster lock may be configured using only one of the # following alternatives on a cluster: # the LVM lock disk # the lock LUN # the quorom server # # # Consider the following when configuring a cluster. # For a two-node cluster, a cluster lock is strongly # recommended. For a cluster of more than four nodes, it must be # a quorum server. # Lock Disk Parameters. Use the FIRST_CLUSTER_LOCK_VG and # FIRST_CLUSTER_LOCK_PV parameters to define a lock disk. # The FIRST_CLUSTER_LOCK_VG is the LVM volume group that # holds the cluster lock. This volume group should not be # used by any other cluster as a cluster lock device. # LUN lock disk parameters. Use the CLUSTER_LOCK_LUN parameter # to define the device on a per node basis. The device may only # be used for this purpose and by only a single cluster. # # Example for a FC storage array cluster disk # CLUSTER_LOCK_LUN /dev/dsk/c1t2d3s1 # For 11.31 and later versions of HP-UX with cluster device files # CLUSTER_LOCK_LUN /dev/cdisk/disk22 # For 11.31 and later versions of HP-UX without cluster device files # CLUSTER_LOCK_LUN /dev/disk/disk4_p2 # Quorum Server Parameters. Use the QS_HOST, QS_POLLING_INTERVAL, Serviceguard # uses the next available subnet to communicate with the quorum server. # QS_HOST is used to specify the quorum server and QS_ADDR can be used to # specify additional IP addresses for the quorum server. The QS_HOST entry # must be specified (only once) before any other QS parameters. Only # one QS_ADDR entry is used to specify the additional IP address. # Both QS_HOST and QS_ADDR should not resolve to the same IP address. # Otherwise cluster configuration will fail. All subnets must be up # when you use cmapplyconf and cmquerycl to configure the cluster. # The QS_POLLING_INTERVAL is the interval (in microseconds) at which # Serviceguard checks to sure the quorum server is running. # The optional QS_TIMEOUT_EXTENSION (in microseconds) is used to increase # the time allocated for quorum server response. The default quorum # server timeout is calculated primarily from MEMBER_TIMEOUT parameter. # For cluster of up to 4 nodes it is 0.2*MEMBER_TIMEOUT. It increases # as number of nodes increases and reaches to 0.5*MEMBER_TIMEOUT for # 16 nodes # # If quorum server is configured on busy network or if quorum server # polling is experiencing timeouts (syslog messages) or if quorum server # is used for large number of clusters, if QS_TIMEOUT_EXTENSION is set to 10 seconds, # and the maximum supported value is 300000000 (5 minutes). # # For example, enter # # QS_HOST qs_host # QS_ADDR qs_addr # QS_POLLING_INTERVAL 120000000 # QS_TIMEOUT_EXTENSION 2000000

CLUSTER STATUS hbyxdb_cluster up NODE STATUS STATE hbyxdb1 up running Cluster_Lock_LVM: VOLUME_GROUP PHYSICAL_VOLUME STATUS /dev/lockvg /dev/disk/disk6006 up Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up LinkAgg0 lan900 PRIMARY up LinkAgg1 lan901 NODE STATUS STATE hbyxdb2 up running Cluster_Lock_LVM: VOLUME_GROUP PHYSICAL_VOLUME STATUS /dev/lockvg /dev/dsk/c4t1d2 up Network_Parameters: INTERFACE STATUS PATH NAME PRIMARY up LinkAgg0 lan900 PRIMARY up LinkAgg1 lan901

# ********************************************************************** # ****** 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, and # contains only alphanumeric characters, dash(-), you must set this parameter in the following # cases: for an extended-distance cluster using software mirroring across # data centers over links between iFCP switches; and for any cluster in # which packages use NFS mounts. See the section on cluster configuration # parameters in the 'Managing Serviceguard' manual for more information. # CONFIGURED_IO_TIMEOUT_EXTENSION 0 # Network Monitor Configuration Parameters. # The NETWORK_FAILURE_DETECTION parameter determines how LAN card failures are detected. # If set to INONLY_OR_INOUT, both the inbound and outbound message counts must # stop increasing before the card is considered down.

NETWORK_INTERFACE lan900 #(public IP)

hbyxdb2:root />mknod /dev/testvg/group c 64 0x020000

cp /.rhosts /etc/hosts.equiv

HPUX 11.31 MC-SG SGeRAC配置

FS_UMOUNT_COUNT=1

hbyxdb1:root />mkdir /dev/testvg

2.6 hbyxdb1检查集群配置文件

WARNING: /etc/nsswitch.conf owner could not be checked on nodes hbyxdb1 hbyxdb2

附常用命令: uname -a 查看操作系统版本 glance 性能监控工具 swinstall -s /xx swinstall方式安装软件 swlist |grep -i RAC 查看系统serviceguard 版本信息 ifconfig lanXX 查看网卡信息 netstat -in (可以看到网卡的地址、IP地址对应的子网、网关、缺省路由、是否有浮动网卡、是否主机) vgchange -a y 卷组名 (激活) vgchange -a n 卷组名 (去激活) vgdisplay -v 查看VG信息 bdf 查看文件系统信息 insf -eC disk 刷新新加的磁盘设备(删除磁盘要重启才能生效) diskinfo /dev/rdisk/disk* 查看磁盘大小 ioscan -fnkC 查看聚合前的磁盘 ioscan -fnNkC 查看聚合后的磁盘 (系统中的磁盘状态及磁盘数量以这个结果为准) ioscan -m dsf 查看磁盘的多路径信息 rmsf /dev/disk/diskXX /dev/rdisk/diskXX 删除磁盘设备

如果要Cluster自动启动:

FAILBACK_POLICY MANUAL

hbyxdb1:root />cmcheckconf -v -C /etc/cmcluster/cluster.ascii Begin cluster verification... Checking cluster file: /etc/cmcluster/cluster.ascii. MAX_CONFIGURED_PACKAGES configured to 300. Checking nodes ... Done Checking existing configuration ... Done MAX_CONFIGURED_PACKAGES configured to 300. Gathering storage information Found 5 devices on node hbyxdb1 Found 9 devices on node hbyxdb2 Analysis of 14 devices should take approximately 2 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Found 3 volume groups on node hbyxdb1 Found 3 volume groups on node hbyxdb2 Analysis of 6 volume groups should take approximately 1 seconds 0%----10%----20%----30%----40%----50%----60%----70%----80%----90%----100% Gathering network information Beginning network probing (this may take a while) Completed network probing Begin file consistency checking WARNING: /etc/hosts is different across nodes hbyxdb1 hbyxdb2 /etc/cmcluster/cmclfiles2check is the same across nodes hbyxdb1 hbyxdb2 /etc/hosts has different content on nodes hbyxdb2, "Apr 14 16:31" on nodes hbyxdb1 WARNING: /etc/nsswitch.conf permissions could not be checked on nodes hbyxdb1 hbyxdb2

LVM physical volumes:

FIRST_CLUSTER_LOCK_VG /dev/lockvg #(配置仲裁盘)

cmhaltpkg: Completed successfully on all packages specified

4. 检测集群配置信息

2. 修改/创建MC-SG:

hbyxdb1:root />vgcreate /dev/testvg /dev/disk/disk6006

SUBNET 10.109.4.12 #(这个是PUBLIC IP的子网)

hbyxdb1:root />cd /tmp

# CONCURRENT MOUNT AND UMOUNT OPERATIONS # Specify the number of concurrent mounts and umounts to allow during # package startup or shutdown. # Setting this value to an appropriate number may improve the performance # while mounting or un-mounting a large number of file systems in the package. # If the specified value is less than 1,查看双机信息

IPv6:

Successfully halted package orapkg on node hbyxdb2

# The HOSTNAME_ADDRESS_FAMILY parameter specifies the Internet Protocol address # family to which Serviceguard will attempt to resolve cluster node names and # quorum server host names. # If the parameter is set to IPV4, Serviceguard will attempt to resolve the names # to IPv6 addresses only. No IPv4 addresses need be configured on the system or # listed in the /etc/hosts file except for IPv4 loopback address. # If the parameter is set to ANY,保证物理磁盘是一致的div+css+js切图,如果不一致,手机网页外包可以使用lockvg.map在两边都导入一遍.

LVM logical volumes:

/dev/testvg /dev/disk/disk6000 64000/0xfa00/0x9 hbyxdb1

hbyxdb1:root /etc/cmcluster>cmruncl -v

hbyxdb1:root /etc/cmcluster>cmviewcl -v

# CONCURRENT FSCK OPERATIONS # Specify the number of concurrent fsck to allow during package startup. # Setting this value to an appropriate number may improve the performance # while checking a large number of file systems in the package. If the # specified value is less than 1,任何一台机器都可以::

KILL_PROCESSES_ACCESSING_RAW_DEVICES="NO"

2 10.109.5.64

# "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, this parameter allows # you to specify if you want to kill the processes that are accessing the # raw devices at package halt time. If raw devices are still being accessed # at package halt time, # causing the package halt to also fail. This problem usually happens when # the application does not shut down properly. # Note that if you are using Oracle's Cluster Ready Service, if configured with IPv4 address, if configured with IPv6 address(es) # can have multiple IPv6 address entries(up to a maximum of 2, # comment out any IPv4 STATIONARY_IPs or HEARTBEAT_IPs. # If this leaves any NETWORK_INTERFACE without any STATIONARY_IP or # HEARTBEAT_IP, and otherwise contains only alphanumeric characters, dash (-), but if CAPACITY_NAME is specified, repeat this process for each capacity. # NOTE: If a given capacity is not defined for a node, if pkgA, and pkgC # each specify a weight of 1000000 for WEIGHT_NAME "memory", then all three packages are eligible # to run at the same time on node1, you cannot # define any other capacities for this cluster, # assuming each has the default weight of one. # # For all capacities other than "package_limit", and increment the list in sequence. # # For example, enter: # CVM_DG[0]=dg01 # CVM_DG[1]=dg02 # # The cvm disk group activation method is defined above. The filesystems # associated with these volume groups are specified below in the CVM_* variables. # #CVM_DG[0]="" # NOTE: Do not use CVM and VxVM disk group parameters to reference # devices used by CFS (cluster file system). CFS resources are # controlled by the Disk Group and Mount Multi-node packages. # # VxVM DISK GROUPS # Specify which VxVM disk groups are used by this package. Uncomment # VXVM_DG[0]="" and fill in the name of your first disk group. You must # begin with VXVM_DG[0], if this package uses your disk groups dg01 and dg02, CVM disk groups and VxVM disk groups. # # NOTE: When VxVM is initialized it will store the hostname of the # local node in its volboot file in a variable called 'hostid'. # The Serviceguard package control scripts use both the values of # the hostname(1m) command and the VxVM hostid. As a result # the VxVM hostid should always match the value of the hostname(1m) command. # # If you modify the local host name after VxVM has been # initialized and such that hostname(1m) does not equal uname -n, if the import of a VXVM # disk group fails then this parameter allows you to specify if you want # to retry the import of disk group. Setting this parameter to "YES" will # execute the command "vxdisk scandisks" to scan for potentially missing # disks that might have caused the datagroup import to fail. This command # can take a long time on a system which has a large IO subsystem. # The use of this parameter is recommended in a Metrocluster with EMC SRDF environment. # The legal values are "YES" and "NO". The default value is "NO"

#mkdir /etc/cmcluster/clusterpkg

cmruncl: Validating network configuration... Gathering network information Beginning network probing (this may take a while) Completed network probing cmruncl: Network validation complete cmruncl: Validating cluster lock disk .... Done Waiting for cluster to form .... done Cluster successfully formed. Check the syslog files on all nodes in the cluster to verify that no warnings occurred during startup.

Volume groups on hbyxdb2: /dev/vg00/lvol1 FS MOUNTED /stand /dev/vg00/lvol2 /dev/vg00/lvol3 FS MOUNTED / /dev/vg00/lvol4 FS MOUNTED /home /dev/vg00/lvol5 FS MOUNTED /opt /dev/vg00/lvol6 FS MOUNTED /tmp /dev/vg00/lvol7 FS MOUNTED /usr /dev/vg00/lvol8 FS MOUNTED /var /dev/vg00/lv_oracle FS MOUNTED /oracle /dev/vg00/hpiso2 FS MOUNTED /hpiso2

# Route information # route id 1: 192.168.0.10 # route id 2: 10.0.10.193 # route id 3: 192.168.100.1 # CAPACITY_NAME # CAPACITY_VALUE # Warning: There are no standby network interfaces for lan0. # Link Aggregate lan901 contains the following port(s): lan2 # Warning: There are no standby network interfaces for lan901. # Link Aggregate lan902 contains the following port(s): lan4 # Warning: There are no standby network interfaces for lan902. # #(配置节点2网络和仲裁盘信息) NODE_NAME hbyxdb2 #hostname

点击次数:97981
作者:
web前端行业资讯
Web new NewsList
微软发布WindowsServerBuild17074更新 ,,2018年01月18日凭借一个AI小功能,这款Google应用冲上苹果AppStore榜首 ,,2018年01月18日百度数据可视化实验室正式成立,发布深度学习可视化平台VisualDL ,,2018年01月18日OpenAI开源最新工具包,模型增大10倍只需额外增加20%计算时间 ,,2018年01月18日百度手机输入法8.0正式发布:支持多人语音速记 ,,2018年01月18日CSDN宣布收购TinyMind团队并升级为AI社区 ,,2018年01月18日甲骨文发布补丁修复英特尔芯片漏洞造成的问题 ,,2018年01月18日权威!官方发布CPU熔断和幽灵漏洞防范指引:附补丁下载 ,,2018年01月18日Oracle宣布新的JavaChampions ,,2018年01月18日腾讯加码区块链项目已悄然注册“以太锁”商标 ,,2018年01月18日Fedora28壁纸征集活动现已开幕:将持续至2月13日 ,,2018年01月18日苹果WebKit团队发布Speedometer2.0网页响应测试工具 ,,2018年01月18日百度输入法8.0后天发布:全感官AI输入 ,,2018年01月18日腾讯和乐高合作:共同研发智能玩具、游戏 ,,2018年01月18日HomePod上市日益临近智能音箱市场吸引力越来越大 ,,2018年01月18日3D打印脑组织?科学家正在向这一目标正在前进 ,,2018年01月18日英特尔公布修补漏洞后PC性能数据:8代CPU影响最小 ,,2018年01月18日云存储公司Dropbox秘密提交IPO申请估值超百亿美元 ,,2018年01月18日iPod之父:防手机上瘾无技术难度苹果谷歌应承担责任 ,,2018年01月18日芯片不安全英特尔云客户考虑转用AMD等对手处理器 ,,2018年01月18日2018年Java展望 ,,2018年01月18日区块链有多火?快播流量矿石遭20多万人疯抢 ,,2018年01月18日Intel搞定神经拟态芯片:模拟人类大脑、自主学习 ,,2018年01月18日阿里巴巴发布IoTConnect开放连接协议,盼推动语音互动入口普及 ,,2018年01月18日区块链火了,全球大佬们怎么看? ,,2018年01月18日Facebook正测试新功能主推本地新闻资讯 ,,2018年01月18日在GooglePlay中发现使用Kotlin开发的安卓恶意软件 ,,2018年01月18日VisualStudio201715.6预览版本2,增加新功能 ,,2018年01月18日百度陆奇:AI是5G最好的加速器 ,,2018年01月18日PinterestCEO:不同于谷歌和Facebook,我们走了第三条路 ,,2018年01月18日【BZOJ】几道比较有趣的题目 【编程语言】2015年03月10日当看见过使得空间分割几个当看见过【编程语言】2014年11月19日redis翻译_内存优化 【系统运维】2015年06月18日创建单例类 【编程语言】2014年11月04日excel画斜线方法,excel中怎么画斜线2014年01月28日Mybatis中selectByExample()的用法:用userID查记录列表 【Web前端】2015年01月19日LeetCodeLRUCache(Java实现)【编程语言】2014年11月10日nyoj九的余数【综合】2015年08月03日cocoStudio:Button三种状态切换【编程语言】2015年06月18日Hibernate之三态篇 【Web前端】2014年11月04日【CSS3教程】相对单位rem详解【移动开发】2015年02月02日Siege压力测试2015年04月28日Dron右键菜单v1.02014年01月29日PHP数组为文章加关键字连接文章内容自动加链接2014年01月29日iosUITableView和UITableViewIndex 【数据库】2015年07月30日Floyd-Warshall算法--最短路径(适合节点密集的图)【编程语言】2015年07月17日XML时钟2014年01月28日在LinuxMint中对firefox进行手动安装flash插件【研发管理】2014年11月17日Asterisk13.2.0current.tar.gz安装步骤详解【编程语言】2015年03月24日基于MooTools的很有创意的滚动条时钟动画2014年01月29日Android备忘录【编程语言】2015年01月29日OpenCV——去雾 【移动开发】2014年11月17日HDUACM2191悼念512汶川大地震遇难同胞——珍惜现在,感恩生活->多重背包问题 【架构设计】2015年04月27日KesionCMSV4.x部份最常用的标签清单2014年01月29日vijos1308埃及分数(迭代加深搜索) 【移动开发】2015年08月14日如何写一个正经的Android音乐播放器二 【Web前端】2014年12月09日PHP实现多进程并行操作的详解(可做守护进程)2014年01月29日JSP与HTML的区别2015年07月16日中文Access2000速成教程--1.1使用“向导”设计数据库2014年01月28日Spring技术入门(六) 【架构设计】2015年03月09日
我们保证
We guarantee
> psd效果文件手工切图,保证图片效果最好体积最小利于传输
> 100%手写的HTML(DIV+CSS)编码,绝对符合W3C标准
> 代码精简、css沉余量小、搜索引擎扫描迅速,网页打开快捷
> 应用Css Sprite能够减少HTTP请求数,提高网页性能
> 跨浏览器兼容(IE6、7、8、9,Firefox火狐,Chrome谷歌)