当前位置:首页 >> 信息与通信 >>

4-SunCluster3.3的Oracle和Jboss应用配置实战


一. 任务说明
环境说明 两台服务器,主机名别为 BOSS1 和 BOSS2(均已安装好了 SC 软件,并已进行了初始化 配置)上面需要运行 Oracle 软件、boss 软件(下文中对应的 sms 资源组) 、brms 软件 (下文中对应的 brms 资源组) 。 注:BOSS 软件和 BRMS 软件均为在 Jboss 平台下运行的应用软件,在配置双机过程中,选择 “

数据服务资源”时均选择“Generic Data Service for Oracle Solaris Cluster” 任务说明 在两台已安装好 SC 软件的服务器上进行 SC 配置, 确保集群中的所有资源和服务能够被 SC 管理。 主要的资源和服务包括 Oracle(含监听) 、oracle-VIP(Oracle 应用的虚拟 IP) 、Jboss、 Jboss-vip(boss 应用的虚拟 IP) 、BRMS-VIP(BRMS 应用的虚拟 IP) 。

二. scsetup 配置

1. 配置 Oracle 资源组和资源
[root@boss1:/]#/usr/cluster/bin/scsetup 王智峰版权所有,严禁转载 *** Main Menu *** Please select from one of the following options: 1) Quorum 2) Resource groups 3) Data Services 4) Cluster interconnect 5) Device groups and volumes 6) Private hostnames 7) New nodes 8) Other cluster tasks ?) Help with menu options q) Quit Option: 2

1 / 30 王智峰版权所有,严禁转载

*** Resource Group Menu *** Please select from one of the following options: 1) Create a resource group 2) Add a network resource to a resource group 3) Add a data service resource to a resource group 4) Resource type registration 5) Online/Offline or Switchover a resource group 6) Suspend/Resume recovery for a resource group 7) Enable/Disable a resource 8) Change properties of a resource group 9) Change properties of a resource 10) Remove a resource from a resource group 11) Remove a resource group 12) Clear the stop_failed error flag from a resource ?) Help s) Show current status q) Return to the main menu Option: 1 王智峰版权所有,严禁转载 >>> Create a Resource Group <<< Use this option to create a new resource group. You can also use this option to create new resources for the new group. A resource group is a container into which you can place resources of various types, such as network and data service resources. The cluster uses resource groups to manage its resource types. There are two types of resource groups, failover and scalable. Only failover resource groups may contain network resources. A network resource is either a LogicalHostname or SharedAddress resource. It is important to remember that each scalable resource group depends upon a failover resource group which contains one or more SharedAddress network resources. Is it okay to continue (yes/no) [yes]? Select the type of resource group you want to add:

2 / 30 王智峰版权所有,严禁转载

1) Failover Group 2) Scalable Group Option: 1 What is the name of the group you want to add? ——————配置为 Failover 模式 ora-rg —————设置 Oracle 资源组的名称 ora-rg oracle

Do you want to add an optional description (yes/no) [yes]? Do you want to add an optional description (yes/no) [yes]? Do you want to add an optional description (yes/no) [yes]? Description: oracle-group

——————设置 Oracle 资源组的描述信息

Because this cluster has two nodes, the new resource group will be configured to be hosted by both cluster nodes. At this time, you may select one node to be the preferred node for hosting this group. Or, you may allow the system to select a preferred node on an arbitrary basis. Do you want to specify a preferred node (yes/no) [yes]? Select the preferred node or zone for hosting this group: 1) boss1 2) boss2 Option: 1 ————配置 Oracle 资源组默认在 BOSS1 上启动

Some types of resources (for example, HA for NFS) require the use of an area in a global file system for storing configuration data. If any of the resources that will be added to this group require such support, you can specify the full directory path name now. Do you want to specify such a directory now (yes/no) [no]? Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -g ora-rg -h boss1,boss2 scrgadm -c -g ora-rg -y RG_description="oracle-group" Commands completed successfully.

3 / 30 王智峰版权所有,严禁转载

Press Enter to continue: Do you want to add any network resources now (yes/no) [yes]? 络资源 Select the type of network resource you want to add: 1) LogicalHostname 2) SharedAddress Option: 1 If a failover resource group contains LogicalHostname resources, the most common configuration is to have one LogicalHostname resource for each subnet. How many LogicalHostname resources would you like to create [1]? Each network resource manages a list of one or more logical hostnames for a single subnet. This is true whether the resource is a LogicalHostname or SharedAddress resource type. The most common configuration is to assign a single logical hostname to each network resource for each subnet. Therefore, scsetup(1M) only supports this configuration. If you need to support more than one hostname for a given subnet, add the additional support using scrgadm(1M). Before scsetup(1M) can create a network resource for any logical hostname, that hostname must be specified in the hosts(4) file on each node in the cluster. In addition, the required network adapters must be actively available on each of the nodes. What logical hostname do you want to add? oracle-vip —————为 ora-rg 资源组配置网 ————资源数量为 1 ———为 ora-rg 资源组添加网

络资源:给 Oracle 服务使用的 IPMP 组名称,可通过 more /etc/hosts 查看 Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -L -g ora-rg -l oracle-vip scrgadm -c -j oracle-vip -y R_description="LogicalHostname resource for oracle-vip" Commands completed successfully. 王智峰版权所有,严禁转载 Press Enter to continue:

4 / 30 王智峰版权所有,严禁转载

Do you want to add any additional network resources (yes/no) [no]? Do you want to add any data service resources now (yes/no) [yes]? ora-rg 资源组配置数据服务资源:监听 ——————下面开始为

Select the type of resource you want to add: Res Name ======== 1) SUNW.Event Description =========== HA Event server for Oracle Solaris Cluster

2) SUNW.HAStoragePlus:9 HA Storage Plus 3) SUNW.Proxy_SMF_failover Resource type for proxying failover SMF ser ... 4) SUNW.Proxy_SMF_multimaster Resource type for proxying multi-mastered S ... 5) SUNW.Proxy_SMF_scalable Resource type for proxying scalable SMF ser ... 6) SUNW.ScalDeviceGroup:3 Scalable Device Group Resource Type 7) SUNW.ScalMountPoint:3 Scalable Mount Point Resource Type 8) SUNW.asm_diskgroup 9) SUNW.derby 10) SUNW.gds:6 n) Next > Option: n Data service for Oracle ASM diskgroup Oracle Solaris Cluster Agent for Derby serv ... Generic Data Service for Oracle Solaris Clu ...

Select the type of resource you want to add: Res Name ======== Description ===========

11) SUNW.oracle_listener:5 Resource type for Oracle Listener 12) SUNW.oracle_rac_server:5 Resource type for Oracle RAC Server 13) SUNW.oracle_server:8 Resource type for Oracle Server 14) SUNW.scalable_acfs_proxy Scalable proxy data service for Oracle ACFS 15) SUNW.scalable_asm_diskgroup_proxy Scalable proxy data service for Oracle ASM 16) SUNW.scalable_asm_instance Scalable data service for Oracle ASM instan ... 17) SUNW.scalable_asm_instance_proxy Scalable proxy data service for Oracle ASM 18) SUNW.scalable_rac_listener Resource type for multi-master Oracle RAC l ... 19) SUNW.scalable_rac_server Resource type for multi-master Oracle RAC s ... 20) SUNW.scalable_rac_server_proxy:2 Proxy Resource type for Oracle RAC server p) < Previous ... ...

5 / 30 王智峰版权所有,严禁转载

n) Next > Option: 11 ————————配置数据库监听服务

The type of resource you selected is not yet registered. Each resource type must be registered with the cluster before any resources of the selected type can be added to a resource group. Registration of a resource type updates the cluster-wide configuration with the resource type properties found in default rt_reg files (see rt_reg(4)) on this node. It is important that the same resource type or data service software has been installed on each node in the cluster prior to registration. Is the software for this service installed on each node (yes/no) [yes]? Is it okay to register this resource type now (yes/no) [yes]? scrgadm -a -t SUNW.oracle_listener:5 Command completed successfully. 王智峰版权所有,严禁转载 Press Enter to continue: What is the name of the resource you want to add? 听服务的资源名称 Some resource types require that you set certain extension properties. ————下面开始配置监 听服务的扩展属性 If you require nondefault values for any extension properties of this resource, specify the values that you require. You must also specify values for any required extension properties for which no default is defined. Some properties accept different values for each node or zone that can master the resource. For information about the extension properties of the resource that you are adding, see the man page for the resource resource type. Please check the man page for your data service to learn more about extension properties associated with the resource that you are adding. This resource type does require that you set one or more extension properties. ora-listener ————————配置监

6 / 30 王智峰版权所有,严禁转载

Select a property you would like to set: Property Name ============= 1) ORACLE_HOME 2) Listener_name 3) User_env 4) Probe_timeout q) Done Option: 1 Property name: Property description: Property type: Property per-node: Property value: ————————配置 ORACLE_HOME 参数 ORACLE_HOME Oracle Home directory string FALSE /opt/ora10/product/10.2.0 Default Setting Desired Setting ===============

=============== <Needs Setting> LISTENER <NULL> 180

Select a property you would like to set: Property Name ============= 1) ORACLE_HOME 2) Listener_name 3) User_env 4) Probe_timeout q) Done Option: q Are you done setting properties (yes/no) [yes]? 王智峰版权所有,严禁转载 Here is the list of extension properties you want to set: ORACLE_HOME=/opt/ora10/product/10.2.0 Is it correct (yes/no) [yes]? Is it okay to proceed with the update (yes/no) [yes]? LISTENER <NULL> 180 Default Setting Desired Setting =============== /opt/ora10/product

===============

7 / 30 王智峰版权所有,严禁转载

scrgadm -a -j ora-listener -g ora-rg -t SUNW.oracle_listener:5 -x ORACLE_HOME=/opt/ora10/product/10.2.0 scrgadm -c -j ora-listener -y R_description="Failover data service resource for SUNW.oracle_listener:5" Commands completed successfully.

Press Enter to continue: Do you want to add any additional data service resources (yes/no) [no]? 续为 ora-rg 资源组配置数据服务资源:数据库 yes ————继

Select the type of resource you want to add: Res Name ======== 1) SUNW.Event Description =========== HA Event server for Oracle Solaris Cluster

2) SUNW.HAStoragePlus:9 HA Storage Plus 3) SUNW.Proxy_SMF_failover Resource type for proxying failover SMF ser ... 4) SUNW.Proxy_SMF_multimaster Resource type for proxying multi-mastered S ... 5) SUNW.Proxy_SMF_scalable Resource type for proxying scalable SMF ser ... 6) SUNW.ScalDeviceGroup:3 Scalable Device Group Resource Type 7) SUNW.ScalMountPoint:3 Scalable Mount Point Resource Type 8) SUNW.asm_diskgroup 9) SUNW.derby 10) SUNW.gds:6 n) Next > Option: n Data service for Oracle ASM diskgroup Oracle Solaris Cluster Agent for Derby serv ... Generic Data Service for Oracle Solaris Clu ...

Select the type of resource you want to add: Res Name ======== Description ===========

11) SUNW.oracle_listener:5 Resource type for Oracle Listener 12) SUNW.oracle_rac_server:5 Resource type for Oracle RAC Server 13) SUNW.oracle_server:8 Resource type for Oracle Server 14) SUNW.scalable_acfs_proxy Scalable proxy data service for Oracle ACFS

8 / 30 王智峰版权所有,严禁转载

15) SUNW.scalable_asm_diskgroup_proxy Scalable proxy data service for Oracle ASM 16) SUNW.scalable_asm_instance Scalable data service for Oracle ASM instan ... 17) SUNW.scalable_asm_instance_proxy Scalable proxy data service for Oracle ASM 18) SUNW.scalable_rac_listener Resource type for multi-master Oracle RAC l ... 19) SUNW.scalable_rac_server Resource type for multi-master Oracle RAC s ... 20) SUNW.scalable_rac_server_proxy:2 Proxy Resource type for Oracle RAC server p) < Previous n) Next > Option: 13 ——————选择 oracle 数据库

... ...

The type of resource you selected is not yet registered. Each resource type must be registered with the cluster before any resources of the selected type can be added to a resource group. Registration of a resource type updates the cluster-wide configuration with the resource type properties found in default rt_reg files (see rt_reg(4)) on this node. It is important that the same resource type or data service software has been installed on each node in the cluster prior to registration. Is the software for this service installed on each node (yes/no) [yes]? Is it okay to register this resource type now (yes/no) [yes]? scrgadm -a -t SUNW.oracle_server:8 Command completed successfully.

Press Enter to continue: What is the name of the resource you want to add? 务资源配置名称 Some resource types require that you set certain extension properties. oracle 数据库服务参数 If you require nondefault values for any extension properties of this resource, specify the values that you require. You must also specify values for any required extension properties for which no default is defined. Some properties accept different values for each node or zone that can master the resource. For information about the extension properties of the resource that you are adding, see the man page for ——下面开始配置 oracle-svr ————为数据库服

9 / 30 王智峰版权所有,严禁转载

the resource resource type. Please check the man page for your data service to learn more about extension properties associated with the resource that you are adding. This resource type does require that you set one or more extension properties. Select a property you would like to set: Property Name ============= 1) ORACLE_SID 2) ORACLE_HOME 3) Alert_log_file 4) Parameter_file 5) Connect_string 6) Connect_cycle 7) Probe_timeout 8) Debug_level 9) Wait_for_online 10) User_env n) Next > q) Done Option: 1 Property name: Property description: Property type: Property per-node: Property value: ORACLE_SID Oracle System Identifier (SID) string FALSE boss ———————配置 SID 名称 Default Setting Desired Setting ===============

=============== <Needs Setting> <Needs Setting> <Needs Setting> <NULL> <Needs Setting> 5 300 1 True <NULL>

Select a property you would like to set: Property Name ============= 1) ORACLE_SID 2) ORACLE_HOME 3) Alert_log_file 4) Parameter_file <Needs Setting> <Needs Setting> <NULL> Default Setting Desired Setting =============== boss

===============

10 / 30 王智峰版权所有,严禁转载

5) Connect_string 6) Connect_cycle 7) Probe_timeout 8) Debug_level 9) Wait_for_online 10) User_env n) Next > q) Done 王智峰版权所有,严禁转载 Option: 2 Property name: Property description: Property type: Property per-node: Property value:

<Needs Setting> 5 300 1 True <NULL>

————————配置 oracle_home ORACLE_HOME Oracle Home directory string FALSE /opt/ora10/product/10.2.0

Select a property you would like to set: Property Name ============= 1) ORACLE_SID 2) ORACLE_HOME 3) Alert_log_file 4) Parameter_file 5) Connect_string 6) Connect_cycle 7) Probe_timeout 8) Debug_level 9) Wait_for_online 10) User_env n) Next > q) Done Option: 3 Property name: Property description: Property type: Property per-node: Property value: ——————配置 Alert_log_file 文件路径 Alert_log_file Oracle alert log file string FALSE /opt/ora10/product/admin/boss/bdump/alert_boss.log <Needs Setting> <NULL> <Needs Setting> 5 300 1 True <NULL> Default Setting Desired Setting =============== boss /opt/ora10/product

===============

11 / 30 王智峰版权所有,严禁转载

王智峰版权所有,严禁转载 Select a property you would like to set: Property Name ============= 1) ORACLE_SID 2) ORACLE_HOME 3) Alert_log_file 4) Parameter_file 5) Connect_string 6) Connect_cycle 7) Probe_timeout 8) Debug_level 9) Wait_for_online 10) User_env n) Next > q) Done Option: 5 Property name: Property description: database Property type: Property per-node: Property value: string FALSE system/system ——————配置数据库连接的用户名和密码 Connect_string Oracle user and password. Used by fault monitor to connect to <NULL> <Needs Setting> 5 300 1 True <NULL> Default Setting Desired Setting =============== boss /opt/ora10/product /opt/ora10/product

===============

Select a property you would like to set: Property Name ============= 1) ORACLE_SID 2) ORACLE_HOME 3) Alert_log_file 4) Parameter_file 5) Connect_string 6) Connect_cycle 7) Probe_timeout 8) Debug_level 9) Wait_for_online 10) User_env 5 300 1 True <NULL> <NULL> system/system Default Setting Desired Setting =============== boss /opt/ora10/product /opt/ora10/product

===============

12 / 30 王智峰版权所有,严禁转载

n) Next > q) Done Option: q Are you done setting properties (yes/no) [yes]? 王智峰版权所有,严禁转载 Here is the list of extension properties you want to set: ORACLE_SID=boss ORACLE_HOME=/opt/ora10/product/10.2.0 Alert_log_file=/opt/ora10/product/admin/boss/bdump/alert_boss.log Connect_string=system/system Is it correct (yes/no) [yes]? Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -j oracle-svr -g ora-rg -t SUNW.oracle_server:8 -x ORACLE_SID=boss -x ORACLE_HOME=/opt/ora10/product/10.2.0 -x Alert_log_file=/opt/ora10/product/admin/boss/bdump/alert_boss.log -x Connect_string=system/system scrgadm -c -j oracle-svr -y R_description="Failover data service resource for SUNW.oracle_server:8" Commands completed successfully.

Press Enter to continue: Do you want to add any additional data service resources (yes/no) [no]? Do you want to bring this resource group online now (yes/no) [yes]? no

*** Resource Group Menu *** Please select from one of the following options: 1) Create a resource group 2) Add a network resource to a resource group 3) Add a data service resource to a resource group 4) Resource type registration 5) Online/Offline or Switchover a resource group

13 / 30 王智峰版权所有,严禁转载

6) Suspend/Resume recovery for a resource group 7) Enable/Disable a resource 8) Change properties of a resource group 9) Change properties of a resource 10) Remove a resource from a resource group 11) Remove a resource group 12) Clear the stop_failed error flag from a resource ?) Help s) Show current status q) Return to the main menu Option: 3 —————下面开始为 ora-rg 添加共享磁盘的资源

>>> Add a Data Service Resource to a Resource Group <<< This option allows you to add a data service resource to a resource group. If the resource type for the data service is not yet registered with the cluster, you will have the opportunity to register that type. Is it okay to continue (yes/no) [yes]?

Select the type of resource you want to add: Res Name ======== 1) SUNW.Event Description =========== HA Event server for Oracle Solaris Cluster

2) SUNW.HAStoragePlus:9 HA Storage Plus 3) SUNW.Proxy_SMF_failover Resource type for proxying failover SMF ser ... 4) SUNW.Proxy_SMF_multimaster Resource type for proxying multi-mastered S ... 5) SUNW.Proxy_SMF_scalable Resource type for proxying scalable SMF ser ... 6) SUNW.ScalDeviceGroup:3 Scalable Device Group Resource Type 7) SUNW.ScalMountPoint:3 Scalable Mount Point Resource Type 8) SUNW.asm_diskgroup 9) SUNW.derby 10) SUNW.gds:6 n) Next > Option: 2 王智峰版权所有,严禁转载 ——————选择共享磁盘 Data service for Oracle ASM diskgroup Oracle Solaris Cluster Agent for Derby serv ... Generic Data Service for Oracle Solaris Clu ...

14 / 30 王智峰版权所有,严禁转载

The type of resource you selected is not yet registered. Each resource type must be registered with the cluster before any resources of the selected type can be added to a resource group. Registration of a resource type updates the cluster-wide configuration with the resource type properties found in default rt_reg files (see rt_reg(4)) on this node. It is important that the same resource type or data service software has been installed on each node in the cluster prior to registration. Is the software for this service installed on each node (yes/no) [yes]? Is it okay to register this resource type now (yes/no) [yes]? scrgadm -a -t SUNW.HAStoragePlus:9 Command completed successfully. 王智峰版权所有,严禁转载 Press Enter to continue: What is the name of the resource you want to add? 名字 Select the resource group you want to use for "oracle-disk": Group Name ========== 1) ora-rg Option: 1 王智峰版权所有,严禁转载 Some resource types require that you set certain extension properties. 扩展属性 If you require nondefault values for any extension properties of this resource, specify the values that you require. You must also specify values for any required extension properties for which no default is defined. Some properties accept different values for each node or zone that can master the resource. For information about the extension properties of the resource that you are adding, see the man page for the resource resource type. Please check the man page for your data service to learn more about ————为该资源配置 Type ==== Failover Description =========== oracle-group oracle-disk ————为该资源配置

15 / 30 王智峰版权所有,严禁转载

extension properties associated with the resource that you are adding. Any extension properties you would like to set (yes/no) [yes]? Select a property you would like to set: Property Name ============= 1) GlobalDevicePaths 2) FilesystemMountPoints 3) AffinityOn 4) FilesystemCheckCommand 5) Zpools 6) ZpoolsSearchDir 7) Monitor_retry_count 8) Monitor_retry_interval 9) IOTimeout 10) IOOption q) Done Option: 2 Property name: Property type: Property per-node: Property value: 王智峰版权所有,严禁转载———————配置磁盘阵列挂接点 FilesystemMountPoints stringarray FALSE /bossdata 2 300 ReadOnly 4 Default Setting Desired Setting ===============

=============== <NULL> <NULL> True <NULL> <NULL> <NULL>

Property description: The list of file system mountpoints

Select a property you would like to set: Property Name ============= 1) GlobalDevicePaths 2) FilesystemMountPoints 3) AffinityOn 4) FilesystemCheckCommand 5) Zpools 6) ZpoolsSearchDir 7) Monitor_retry_count 8) Monitor_retry_interval 9) IOTimeout 2 300 4 Default Setting Desired Setting ===============

=============== <NULL> <NULL> True <NULL> <NULL> <NULL>

/bossdata

16 / 30 王智峰版权所有,严禁转载

10) IOOption q) Done Option: q

ReadOnly

Are you done setting properties (yes/no) [yes]?

Here is the list of extension properties you want to set: FilesystemMountPoints=/bossdata Is it correct (yes/no) [yes]? Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -j oracle-disk -g ora-rg -t SUNW.HAStoragePlus:9 -x FilesystemMountPoints=/bossdata scrgadm -c -j oracle-disk -y R_description="Failover data service resource for SUNW.HAStoragePlus:9" Commands completed successfully.

Press Enter to continue: Do you want to enable "oracle-disk" on all nodes (yes/no) [yes]? Do you want to enable this resource (yes/no) [yes]? no

*** Resource Group Menu *** Please select from one of the following options: 1) Create a resource group 2) Add a network resource to a resource group 3) Add a data service resource to a resource group 4) Resource type registration 5) Online/Offline or Switchover a resource group 6) Suspend/Resume recovery for a resource group 7) Enable/Disable a resource 8) Change properties of a resource group 9) Change properties of a resource

17 / 30 王智峰版权所有,严禁转载

10) Remove a resource from a resource group 11) Remove a resource group 12) Clear the stop_failed error flag from a resource ?) Help s) Show current status q) Return to the main menu Option: 8 ————————设置资源组的默认启动节点

>>> Change Properties of a Resource Group <<< Use this option to change certain properties of a resource group. These properties are the resource group Nodelist, RG_description, and Pathprefix. Other resource group properties can be changed using scrgadm(1M). Is it okay to continue (yes/no) [yes]? Select the group whose property you want to change: 1) ora-rg q) Done Option: 1 Select the property you want to change: 1) Nodelist 2) RG_description 3) Pathprefix ?) Help q) Return to the resource group menu Option: 1

>>> Change the Nodelist Resource Group Property <<< The Nodelist of a resource group is an ordered list of nodes/zones capable of mastering that group. These nodes/zones are the potential

18 / 30 王智峰版权所有,严禁转载

primaries for a resource group. You can add nodes/zones to a list, remove nodes/zones from a list, or change the order of nodes/zones in a list. Is it okay to continue (yes/no) [yes]?

The following two nodes/zones are in the Nodelist: 故不需要调整 boss1 boss2

——默认启动节点为 boss1,同规划相同

Select the type of change you want to make to the Nodelist: 1) Swap the order of the two nodes/zones in the Nodelist 2) Remove a node/zone from the Nodelist q) Done Option: q 王智峰版权所有,严禁转载

2. 测试 Oracle 资源组
下面测试刚添加的 ora-rg 资源组是否能被 SC 成功启动、成功切换

注意: 注意: 服务、 测试前需要将磁盘阵列 umount、将 Oracle 服务、监听统统停掉 、 命令将资源组启动、 使用 scsetup 命令将资源组启动、切换进行测试 检查点: 磁盘阵列是否成功被挂载; orale-vip 的 IPMP 是否成功启动(即 192.168.1.3 的 oracle 虚 IP 地址) oracle 监听是否成功启动; oracle 服务是否成功启动
[root@boss1:/]# [root@boss1:/]#ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000

19 / 30 王智峰版权所有,严禁转载

bge0: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 2 inet 10.10.0.17 netmask ffffff00 broadcast 10.10.0.255 groupname sc_ipmp0 ether 0:21:28:b5:ca:1e bge0:1: flags=1001040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,FIXEDMTU> mtu 1500 index 2 inet 192.168.1.3 netmask ffffff00 broadcast 10.10.0.255 IP bge1: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 6 inet 172.16.0.129 netmask ffffff80 broadcast 172.16.0.255 ether 0:21:28:b5:ca:1f e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3 inet 10.10.0.11 netmask ffffff00 broadcast 10.10.0.255 groupname sc_ipmp0 ether 0:15:17:f4:3d:86 e1000g0:1: flags=9040843<UP,BROADCAST,RUNNING,MULTICAST,DEPRECATED,IPv4,NOFAILOVER> mtu 1500 index 3 inet 10.10.0.16 netmask ffffff00 broadcast 10.10.0.255 e1000g1: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 8 inet 172.16.1.1 netmask ffffff80 broadcast 172.16.1.127 ether 0:15:17:f4:3d:87 sppp0: flags=10010008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,IPv4,FIXEDMTU> mtu 1500 index 4 inet 10.11.12.2 --> 10.11.12.1 netmask ff000000 ether 0:0:0:0:0:0 clprivnet0: flags=1008843<UP,BROADCAST,RUNNING,MULTICAST,PRIVATE,IPv4> mtu 1500 index 7 inet 172.16.4.1 netmask fffffe00 broadcast 172.16.5.255 ether 0:0:0:0:0:1 [root@boss1:/]# 王智峰版权所有,严禁转载 ——————Oracle 虚拟 ——————

3. 配置 sms 资源组和资源
[root@boss1:/]# [root@boss1:/]#/usr/cluster/bin/scsetup

20 / 30 王智峰版权所有,严禁转载

*** Main Menu *** Please select from one of the following options: 1) Quorum 2) Resource groups 3) Data Services 4) Cluster interconnect 5) Device groups and volumes 6) Private hostnames 7) New nodes 8) Other cluster tasks ?) Help with menu options q) Quit Option: 2

*** Resource Group Menu *** Please select from one of the following options: 1) Create a resource group 2) Add a network resource to a resource group 3) Add a data service resource to a resource group 4) Resource type registration 5) Online/Offline or Switchover a resource group 6) Suspend/Resume recovery for a resource group 7) Enable/Disable a resource 8) Change properties of a resource group 9) Change properties of a resource 10) Remove a resource from a resource group 11) Remove a resource group 12) Clear the stop_failed error flag from a resource ?) Help s) Show current status q) Return to the main menu Option: 1

>>> Create a Resource Group <<<

21 / 30 王智峰版权所有,严禁转载

Use this option to create a new resource group. You can also use this option to create new resources for the new group. A resource group is a container into which you can place resources of various types, such as network and data service resources. The cluster uses resource groups to manage its resource types. There are two types of resource groups, failover and scalable. Only failover resource groups may contain network resources. A network resource is either a LogicalHostname or SharedAddress resource. It is important to remember that each scalable resource group depends upon a failover resource group which contains one or more SharedAddress network resources. Is it okay to continue (yes/no) [yes]? Select the type of resource group you want to add: 1) Failover Group 2) Scalable Group Option: 1 What is the name of the group you want to add? sms-rg Do you want to add an optional description (yes/no) [yes]? no sms-rg ————设置资源组名称为

Because this cluster has two nodes, the new resource group will be configured to be hosted by both cluster nodes. At this time, you may select one node to be the preferred node for hosting this group. Or, you may allow the system to select a preferred node on an arbitrary basis. Do you want to specify a preferred node (yes/no) [yes]? Select the preferred node or zone for hosting this group: 1) boss1 2) boss2

22 / 30 王智峰版权所有,严禁转载

Option: 2

——————设置默认启动节点为为 boss2

Some types of resources (for example, HA for NFS) require the use of an area in a global file system for storing configuration data. If any of the resources that will be added to this group require such support, you can specify the full directory path name now. Do you want to specify such a directory now (yes/no) [no]? Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -g sms-rg -h boss2,boss1 Command completed successfully.

Press Enter to continue: Do you want to add any network resources now (yes/no) [yes]? 加网络资源 Select the type of network resource you want to add: 1) LogicalHostname 2) SharedAddress Option: 1 If a failover resource group contains LogicalHostname resources, the most common configuration is to have one LogicalHostname resource for each subnet. How many LogicalHostname resources would you like to create [1]? Each network resource manages a list of one or more logical hostnames for a single subnet. This is true whether the resource is a LogicalHostname or SharedAddress resource type. The most common configuration is to assign a single logical hostname to each network resource for each subnet. Therefore, scsetup(1M) only supports this configuration. If you need to support more than one hostname for a given subnet, add the additional support using scrgadm(1M). Before scsetup(1M) can create a network resource for any logical hostname, that hostname must be specified in the hosts(4) file on each —————为 sms-rg 资源组添

23 / 30 王智峰版权所有,严禁转载

node in the cluster. In addition, the required network adapters must be actively available on each of the nodes. What logical hostname do you want to add? jboss-vip 的 IPMP 资源 Is it okay to proceed with the update (yes/no) [yes]? scrgadm -a -L -g sms-rg -l jboss-vip scrgadm -c -j jboss-vip -y R_description="LogicalHostname resource for jboss-vip" Commands completed successfully. jboss-vip —————添加名称为

Press Enter to continue: Do you want to add any additional network resources (yes/no) [no]? Do you want to add any data service resources now (yes/no) [yes]? 组配置数据服务资源 —————为 sms-rg 资源

Select the type of resource you want to add: Res Name ======== 1) SUNW.Event Description =========== HA Event server for Oracle Solaris Cluster

2) SUNW.HAStoragePlus:9 HA Storage Plus 3) SUNW.Proxy_SMF_failover Resource type for proxying failover SMF ser ... 4) SUNW.Proxy_SMF_multimaster Resource type for proxying multi-mastered S ... 5) SUNW.Proxy_SMF_scalable Resource type for proxying scalable SMF ser ... 6) SUNW.ScalDeviceGroup:3 Scalable Device Group Resource Type 7) SUNW.ScalMountPoint:3 Scalable Mount Point Resource Type 8) SUNW.asm_diskgroup 9) SUNW.derby 10) SUNW.gds:6 n) Next > Option: 10 —————选择通用数据服务 Data service for Oracle ASM diskgroup Oracle Solaris Cluster Agent for Derby serv ... Generic Data Service for Oracle Solaris Clu ...

注:BOSS 软件和 BRMS 软件均为在 Jboss 平台下运行的应用软件,在配置双机过程中,选择 “数据服务资源”时均选择“Generic Data Service for Oracle Solaris Cluster”

24 / 30 王智峰版权所有,严禁转载

What is the name of the resource you want to add?

sms

————设置资源名称为 sms

This data service uses the "Port_list" property. The default "Port_list" for this data service is as follows: <NULL> Please check the man page for this resource type for more information on how the list should be set for this resource. Do you want to override the default (yes/no) [no]? Port number (Ctrl-D to finish): 只要不被占用就行 Is this a TCP port (yes/no) [yes]? 43512 yes ——————选择 yes —————端口号,可随便输入一个,

Port number (Ctrl-D to finish):

^D

This is the Port_list which you entered: 43512/tcp Is it correct (yes/no) [yes]? Some resource types require that you set certain extension properties. If you require nondefault values for any extension properties of this resource, specify the values that you require. You must also specify values for any required extension properties for which no default is defined. Some properties accept different values for each node or zone that can master the resource. For information about the extension properties of the resource that you are adding, see the man page for the resource resource type. Please check the man page for your data service to learn more about extension properties associated with the resource that you are adding. This resource type does require that you set one or more extension properties. Select a property you would like to set: Property Name Default Setting Desired Setting

25 / 30 王智峰版权所有,严禁转载

============= 1) Monitor_retry_count 2) Monitor_retry_interval 3) Probe_timeout 4) Child_mon_level 5) Validate_command 6) Start_command 7) Stop_command 8) Probe_command 9) Network_aware 10) Stop_signal n) Next > q) Done Option: q 15 2 30 -1 4

===============

===============

<NULL> <Needs Setting> <NULL> <NULL> True

Any property without a default value must be explicitly set.

Press Enter to continue: Select a property you would like to set: Property Name ============= 1) Monitor_retry_count 2) Monitor_retry_interval 3) Probe_timeout 4) Child_mon_level 5) Validate_command 6) Start_command 7) Stop_command 8) Probe_command 9) Network_aware 10) Stop_signal n) Next > q) Done Option: 6 ————————配置 jboss 启动命令的路径和命令。 15 2 30 -1 <NULL> <Needs Setting> <NULL> <NULL> True 4 Default Setting Desired Setting ===============

===============

26 / 30 王智峰版权所有,严禁转载

注意: 注意:配置前需要将该命令赋予可执行权限
Property name: Property description: Property type: Property per-node: Property value: Start_command Command to start application stringarray FALSE /boss/jboss-4.0.2/bin/jboss_script/runjboss.sh

Select a property you would like to set: Property Name ============= 1) Monitor_retry_count 2) Monitor_retry_interval 3) Probe_timeout 4) Child_mon_level 5) Validate_command 6) Start_command 7) Stop_command 8) Probe_command 9) Network_aware 10) Stop_signal n) Next > q) Done Option: 7 ———配置 jboss 停止命令的路径和命令 15 <NULL> <NULL> True 2 30 -1 <NULL> /boss/jboss-4. 4 Default Setting Desired Setting ===============

===============

注意: 注意:配置前需要将该命令赋予可执行权限
Property name: Property description: Property type: Property per-node: Property value: Stop_command Command to stop application string FALSE /boss/jboss-4.0.2/bin/jboss_script/shutdown-jboss.sh

Select a property you would like to set: Property Name ============= 1) Monitor_retry_count 2) Monitor_retry_interval 3) Probe_timeout 2 30 4 Default Setting Desired Setting ===============

===============

27 / 30 王智峰版权所有,严禁转载

4) Child_mon_level 5) Validate_command 6) Start_command 7) Stop_command 8) Probe_command 9) Network_aware 10) Stop_signal n) Next > q) Done Option: 8

-1 <NULL> /boss/jboss-4. <NULL> <NULL> True 15 /boss/jboss-4.

————————配置 jboss 监听命令的路径和命令

注意: 注意:配置前需要将该命令赋予可执行权限

Property name: Property description: Property type: Property per-node: Property value:

Probe_command Command to probe application string FALSE /boss/jboss-4.0.2/bin/jboss_script/probe-jboss.sh

Select a property you would like to set: Property Name ============= 1) Monitor_retry_count 2) Monitor_retry_interval 3) Probe_timeout 4) Child_mon_level 5) Validate_command 6) Start_command 7) Stop_command 8) Probe_command 9) Network_aware 10) Stop_signal n) Next > q) Done Option: q Are you done setting properties (yes/no) [yes]? 15 <NULL> <NULL> True 2 30 -1 <NULL> /boss/jboss-4. /boss/jboss-4. /boss/jboss-4. 4 Default Setting Desired Setting ===============

===============

28 / 30 王智峰版权所有,严禁转载

Here is the list of extension properties you want to set: Start_command=/boss/jboss-4.0.2/bin/jboss_script/runjboss.sh Stop_command=/boss/jboss-4.0.2/bin/jboss_script/shutdown-jboss.sh Probe_command=/boss/jboss-4.0.2/bin/jboss_script/probe-jboss.sh Is it correct (yes/no) [yes]? Is it okay to proceed with the update (yes/no) [yes]?

scrgadm -a -j brms -g sms-rg -t SUNW.gds:6 -y Scalable=false -y Port_list=43512/tcp -x Start_command=/boss/jboss-4.0.2/bin/jboss-script/runjboss.sh -x Stop_command=/boss/jboss-4.0.2/bin/jboss-script/shutdown-jboss.sh -x Probe_command=/boss/jboss-4.0.2/bin/jboss-script/probe-jboss.sh scrgadm -c -j brms -y R_description="Failover data service resource for SUNW.gds:6" Commands completed successfully.

Press Enter to continue: Do you want to add any additional data service resources (yes/no) [no]? Do you want to bring this resource group online now (yes/no) [yes]? no

4. 配置 brms 资源组和资源
配置方法同“配置 sms 资源组和资源”的方法相同。 名称为 brms 的 Jboss 资源具体配置数据如下: 监控:/boss/jboss-4.0.2-brms/bin/brms-script/ probe-jboss1.sh 启动:/boss/jboss-4.0.2-brms/bin/brms-script/runjboss1.sh 停止:/boss/jboss-4.0.2-brms/bin/brms-script/ shutdown-jboss1.sh

注:BOSS 软件和 BRMS 软件均为在 Jboss 平台下运行的应用软件,在配置双机过程中,选择 “数据服务资源”时均选择“Generic Data Service for Oracle Solaris Cluster”

29 / 30 王智峰版权所有,严禁转载

5. 测试 sms 和 brms 资源组
主要测试 sms、brms 资源组是否能被 SC 成功启动、成功切换

注意: 注意: 测试前需要将 sms 和 brm 的 jboss 服务停止 测试方法:使用 scsetup 命令将资源组启动、切换进行测试 检查点: Jboss 能否成功启动; jboss-vip 和 brms-vip 的 IPMP 是否成功启动(即 192.168.1.1 和 192.168.1.10 的虚 IP 地 址)

30 / 30 王智峰版权所有,严禁转载


相关文章:
...SUN Cluster 3.2.3+oracle10g 安装配置-5.集群下Ora...
VMWare实现Solaris SUN Cluster 3.2.3+oracle10g 安装配置-5.集群下Oracle10G安装_计算机软件及应用_IT...See system(4). * * set test_module:debug = ...
jboss配置
jboss配置_IT/计算机_专业资料。ORACLE 敏捷数据一...Sun Microsystems, Inc.//DTD Web Application 2.3...需要启动一个服务 cluster-service.xml )、需要启动...
JBOSS详细配置
4. 编辑 WEB-INF\jboss-web.xml 文件, 打开<...client: 存储配置信息和可能被 Java 客户端应用程序...(如 MySql、 Oracle、 Server、 SQL Postgres 等)...
jboss cluster环境的安装与配置
jboss cluster环境的安装与配置_IT/计算机_专业资料。...2.2.3.so 4.jboss-eap-4.3.0.GA_CP06.zip ...//java.sun.com/xml/ns/j2ee" xmlns:xsi="http...
JBoss的部署及运行
同样的方法添加 JBOSS_HOME 和 AN T_HOME。 如下图: 4 Confidential Level:...库 (如 MySql、Oracle、SQL Server、 Postgres 等)配置数据源的 JCA 配置文件...
JBOSS中配置JNDI数据源
3.然后将oracle-ds.xml复制到E:\jboss-4.2.2.GA\server\default\deploy中。 4.如果在启动时提示找不到数据源,则部署项目的数据源名称前加"java:". 例如: ...
Jboss Oracle数据库连接池配置
Jboss Oracle 数据库连接池配置假设应用程序部署在 Jboss 的 default 模式下 用...jboss数据库连接池配置 3页 免费 4-SunCluster3.3的Oracl... 30页 免费 Orac...
Jboss安装配置
Jboss安装配置_计算机软件及应用_IT/计算机_专业资料。Jboss安装配置,图文详解1...选择我们刚才配置的 oracle 驱动 3. 填写数据库连接项,点击确定完成。 4. ...
JBOSS的下载安装、环境变量配置以及部署
下载 JDK(http://www.oracle.com/technetwork/java/javase/downloads/index....jboss安全配置 4页 免费 jboss配置 3页 免费 JBOSS环境变量配置 4页 免费 JBoss...
Jboss优化配置
Jboss优化配置_计算机软件及应用_IT/计算机_专业资料...+UseParallelOldGC -Dsun.rmi.dgc.server.gc..._cluster.sar/ quartz-ra.rar remoting3-jboss-...
更多相关标签:
jboss cluster | sun cluster | sun cluster 命令 | sun cluster 日志 | sun cluster 脚本 | suncluster配置磁盘组 | sun cluster db2 | sun cluster 停止服务 |