Académique Documents
Professionnel Documents
Culture Documents
Issue 06 (2008-03-18)
3-1
M2000
HA System Administrator Guide (S10)
Switching Mechanism
The cluster can automatically relocate the applications from a faulty active node to a specified
standby node, and thus the Sun Cluster features high availability.
If the active node, that is, the node running services, is faulty, the Cluster restarts the services
on the same node. If the restart fails, the service is switched to the other node automatically.
There may be a temporary interruption during the switchover and you may need to reconnect
the two nodes after the switchover. The physical server that provides the applications and data,
however, is visible.
Resource
Resource is the instance of the resource type defined in the cluster range. The same resource
type may contain many resources and each resource has a name and an attribute group. In this
case, instances of the basic applications can run on the cluster.
Resource Group
A resource group is a group of resources that are associated with each other. These resources
depend on each other.
3-2
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Name
Description
Cluster
osscluster
Resource group
oss_rg
Resource
ossdg_rs
sybase_rs
ossapp_rs
3-3
M2000
HA System Administrator Guide (S10)
If the services fail to restart, the system tries to restart the services for the times as specified by
Retry_count of ossapp_rs. The default value is 2. After retry attempts are over, the system
measure the time between the restart time of the system and the beginning of the next monitoring
process after the interval Thorough_probe_interval. If the monitoring script returns a message
stating that the system is normal, the system performs the switchover and switches the resource
from the active node to the standby node.
CPU faults
Memory faults
Disconnection between the host Ethernet adapter and the LAN switch
Database faults
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
continues. If the script returns a message stating that the services are not normal, the system
invokes the script stop_OMC.sh and stops the M2000 services. When the services are stopped,
the monitoring also stops. When the stopped services need to be restarted, the system invokes
the script start_OMC.sh to start the M2000 services and records the time at that point. After
the interval of Thorough_probe_interval, the system starts the next phase of monitoring.
If the services ServiceManager and start_service are restarted successfully, the Cluster regards
the M2000 as normal and thus continues the monitoring.
If the services fail to restart, the system tries to restart the services for the times as specified by
Retry_count of ossapp_rs. The default value is 2. After retry attempts are over, the system
measure the time between the restart time of the system and the beginning of the next monitoring
process after the interval Thorough_probe_interval. If the monitoring script returns a message
stating that the system is normal, the system performs the switchover and switches the resource
from the active node to the standby node.
CPU faults
Memory faults
Disconnection between the host Ethernet adapter and the LAN switch
Database faults
Context
Take the switchover from osssvr-1 to osssvr-2 as an example to describe the procedures for
manual switchover.
Procedure
Step 1 Run the scstat command to check whether the system status is normal.
The online state means that the resource group is activated on the server.
# scstat
------------------------------------------------------------------- Cluster Nodes --
Cluster node:
Cluster node:
Node name
--------osssvr-1
osssvr-2
Status
-----Online
Online
------------------------------------------------------------------
Issue 06 (2008-03-18)
3-5
M2000
HA System Administrator Guide (S10)
Transport path:
Transport path:
Endpoint
-------osssvr-1:bge3
osssvr-1:bge1
Endpoint
-------osssvr-2:bge3
osssvr-2:bge1
Status
-----Path online
Path online
3
2
3
Node votes:
Node votes:
Device votes:
Device Name
----------/dev/did/rdsk/d4s2
Device Group
-----------ossdg
Primary
------osssvr-1
Secondary
--------osssvr-2
Device Group
-----------ossdg
Status
-----Online
Online Status
-------------
Resources
--------osssvr_rs ossdg_rs sybase_rs ossapp_rs
3-6
Node Name
--------osssvr-1
osssvr-2
State
----Online
Offline
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Node Name
--------osssvr-1
State
----Online
Status Message
-------------Online
osssvr-2
Offline
Offline
osssvr-1
osssvr-2
Online
Offline
Online
Offline
Online
Offline
Online
Offline
Online
Offline
Online
Offline
osssvr-1
osssvr-2
backup_server: STOPPED
Resource: ossapp_rs
Resource: ossapp_rs
osssvr-1
osssvr-2
Step 2 Log in as user root to perform the switchover on the active or standby node.
# scswitch -S -h osssvr-1
Step 3 Check whether the switchover is successful.
# scstat
----End
2.
3.
4.
5.
3-7
M2000
HA System Administrator Guide (S10)
Prerequisite
l
Procedure
Step 1 Type the path of the Sybase Agent installation package.
l
To install the Sybase Agent installation package on node 1, run the following command:
# cd /opt/OMC/etc/dual
To install the Sybase Agent installation package on node 2, transfer the registration
package /opt/OMC/etc/dual/SUNWscsyb.tar.gz in bin mode from node 1 to the path /
tmp on node 2 through the FTP.
Run the command ftp IP address of node 1 on node 2 and log in to node 1 as user root. Run
the following commands:
ftp> lcd /tmp
ftp> cd /opt/OMC/etc/dual
ftp> bin
ftp> get SUNWscsyb.tar.gz
ftp> bye
After the files are transferred, run the following command to navigate to the installation
directory of node 2:
# cd /tmp
The system prompts the following information after the installation of Sybase Agent.
Installation of <SUNWscsyb> was successful.
----End
3-8
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Prerequisite
You have logged in to Node1 and Node2 as root.
Procedure
Step 1 Open /opt/SUNWscsyb/bin/sybase_stop_servers and run the following commands:
# cd /opt/SUNWscsyb/bin
# TERM=vt100; export TERM
# vi sybase_stop_servers
Step 2 Find the following contents in two different places in the file.
${SYBASE}/${SYBASE_OCS}/bin/isql -Usa
-S${ADAPTIVE_SERVER_NAME}<<SVR_EOF
Step 3 Add the password of the sa user into the contents mentioned previously in the two different
places.
The modified contents is shown as follows:
${SYBASE}/${SYBASE_OCS}/bin/isql -Usa
-S${ADAPTIVE_SERVER_NAME} -Pemsems<<SVR_EOF
NOTE
The file sybase_stop_servers is read-only. To modify it, run wq! to write this file effectively, and then
exit.
Prerequisite
l
The Sybase registration scripts reg_syb.sh and AddHacheck.sql are copied to the
directory /opt/OMC/etc/dual on node 1.
Issue 06 (2008-03-18)
3-9
M2000
HA System Administrator Guide (S10)
Procedure
Step 1 Run the following command to add the operation rights for reg_syb.sh:
# cd /opt/OMC/etc/dual
# chmod a+x reg_syb.sh
Step 2 Run the registration script reg_syb.sh.
# bash
# ./reg_syb.sh SYB sa the password of the user sa
Step 3 At the following prompt, type the name of the resource according to Names for M2000 HA
System Cluster Components:
Please input Resource Group name [default:oss_rg]:
Please input Disk Group Resource name [default:ossdg_rs]:
Please input Sybase Resource name [default:sybase_rs]:
NOTE
In case of a failure, you can also run the following command, and then enter information as prompted.
# ./reg_syb.sh
----End
Prerequisite
You have logged in to node 1 as user root.
Procedure
Run the scstat -g command on node 1 to check the resource status.
# scstat -g
-- Resource Groups and Resources -Group Name
---------Resources: oss_rg
Resources
--------osssvr_rs ossdg_rs sybase_rs
3-10
Node Name
--------osssvr-1
osssvr-2
State
----Online
Offline
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Node Name
--------osssvr-1
State
Status Message
-----------------Online
Online - LogicalHostname
osssvr-2
Offline
Offline
Resource: ossdg_rs
Resource: ossdg_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
Resource: sybase_rs
Resource: sybase_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
If sybase_rs is displayed, you can infer that the M2000 is successfully registered in the
Cluster.
----End
Prerequisite
l
Stop the Sybase service. For details, refer to 3.5.7 Stopping the Sybase (HA).
Procedure
Step 1 Run the following command to start monitoring the Sybase by using the Sun Cluster:
# scswitch -e -j sybase_rs
The Cluster starts the Sybase.
Step 2 Run the following command to check whether the Sybase is started:
# scstat -g
-- Resource Groups and Resources -Group Name
---------Resources: oss_rg
Resources
--------osssvr_rs ossdg_rs sybase_rs
Node Name
--------osssvr-1
osssvr-2
State
----Online
Offline
Issue 06 (2008-03-18)
Node Name
--------osssvr-1
State
Status Message
-----------------Online
Online - LogicalHostname
osssvr-2
Offline
Offline
3-11
M2000
HA System Administrator Guide (S10)
osssvr-1
osssvr-2
Online
Offline
Online
Offline
Resource: sybase_rs
Resource: sybase_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
In such a case, the Cluster ensures that the Sybase is started and that the Sybase can be switched
to the entire M2000 resource group. In the output, if the State of sybase_rs is Online on
node 1 (osssvr-1), you can infer that the Sybase is running.
If you do not want the Cluster to monitor the Sybase, run the following command to deactivate
the monitoring:
# scswitch -n -j sybase_rs
CAUTION
In Cluster-managed HA mode, sybase_rs is monitored by the Cluster. Do not use the isql
command to stop the Sybase server.
----End
2.
3.
4.
Prerequisite
3-12
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Procedure
Step 1 Type the path of the M2000 registration package.
l
To install the M2000 registration package on node 1, run the following command:
# cd /opt/OMC/etc/dual
To install the M2000 registration package on node 2, transfer the registration package /opt/
OMC/etc/dual/M2kPkg.tar in bin mode from node 1 to the path /tmp on node 2 through
the FTP.
Run the command ftp IP address of node 1 on node 2 and log in to node 1 as user root. Run
the following commands:
ftp> lcd /tmp
ftp> cd /opt/OMC/etc/dual
ftp> bin
ftp> get M2kPkg.tar
ftp> bye
After the files are transferred, run the following command to go to the installation directory
of node 2.
# cd /tmp
Prerequisite
You have logged in to node 1 as user root.
Procedure
Run the following command on node 1 to register the M2000 server application:
# scrgadm -a -t HW.M2000
Issue 06 (2008-03-18)
3-13
M2000
HA System Administrator Guide (S10)
Prerequisite
You have logged in to node 1 as user root.
Procedure
Run the following command on node 1 to check the resource status and to check whether the
M2000 is registered successfully in the Cluster:
# scstat -g
-- Resource Groups and Resources -Group Name
---------Resources: oss_rg
Resources
--------osssvr_rs ossdg_rs sybase_rs ossapp_rs
Node Name
--------osssvr-1
osssvr-2
State
----Online
Offline
Node Name
--------osssvr-1
State
Status Message
-----------------Online
Online - LogicalHostname
osssvr-2
Offline
Offline
Resource: ossdg_rs
Resource: ossdg_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
Resource: sybase_rs
Resource: sybase_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
If ossapp_rs exists is displayed, you can infer that the M2000 is successfully registered
in the Cluster.
----End
3-14
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Prerequisite
You have logged in to node 1 as user root.
Procedure
Step 1 Run the following commands to check all the M2000 services:
# cd /opt/OMC
# . ./svc_profile.sh
# svc_ps
If certain services are running, run the following command to stop all the M2000 services:
# stop_svc
Step 2 Run the following command to start the monitoring of the M2000 server operation through the
Cluster:
# scswitch -e -j ossapp_rs
The Cluster starts the M2000 server.
Step 3 Run the following command to check whether the M2000 is started:
# scstat -g
-- Resource Groups and Resources -Group Name
---------Resources: oss_rg
Resources
--------osssvr_rs ossdg_rs sybase_rs ossapp_rs
Node Name
--------osssvr-1
osssvr-2
State
----Online
Offline
Issue 06 (2008-03-18)
Node Name
--------osssvr-1
State
Status Message
-----------------Online
Online - LogicalHostname
osssvr-2
Offline
Offline
Resource: ossdg_rs
Resource: ossdg_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
Resource: sybase_rs
Resource: sybase_rs
osssvr-1
osssvr-2
Online
Offline
Online
Offline
3-15
M2000
HA System Administrator Guide (S10)
osssvr-1
osssvr-2
Online
Offline
Online
Offline
The Cluster monitors the real-time operational status of the M2000 and ensures that the
M2000 is started. In the output, if the State of ossapp_rs is Online on node 1
(osssvr-1), you can infer that M2000 services are running.
If you do not want the Cluster to monitor the M2000 server, run the following command to stop
the monitoring process:
# scswitch -n -j ossapp_rs
CAUTION
l
In the Cluster-managed HA mode, ossapp_rs is monitored by the Cluster. Do not run the
stop_svc command to stop the M2000 server.
After you register the Sybase software and M2000 resources with the Cluster, you must stop
the M2000 and Sybase monitoring before stopping the server.
# scswitch -n -j ossapp_rs
# scswitch -n -j sybase_rs
# scshutdown -g0 -y
----End
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
Prerequisite
You have logged in to the server as user root.
Procedure
Run the scstat -g command to view the resources in the oss_rg resource group.
# scstat -g
The oss_rg resource group contains osssvr, ossdg_rs, sybase_rs, and ossapp_rs.
----End
Prerequisite
You have logged in to the server as user root.
Procedure
If a resource is not monitored by the Cluster, run the following command to start the Cluster
monitoring on the resource.
# scswitch -e -j resource name
Run the following command to enable the Cluster monitoring on the Sybase:
# scswitch -e -j sybase_rs
Run the following command to enable the Cluster monitoring on the M2000:
# scswitch -e -j ossapp_rs
NOTE
After you run the scswitch -e -j command, the corresponding resource is started. For example, after you
run the scswitch -e -j ossapp_rs command, the M2000 server is started.
----End
Prerequisite
You have logged in to the server as user root.
Issue 06 (2008-03-18)
3-17
M2000
HA System Administrator Guide (S10)
Context
The Cluster monitors all the resources in the resource group. If a resource is faulty, the Cluster
attempts to restart the resource. The Cluster switches oss_rg to the standby node if the number
of restart attempts reaches the preset value.
Procedure
Stop Cluster monitoring on the resources.
# scswitch -n -j resource name
Run the following command to stop Cluster monitoring on the Sybase:
# scswitch -n -j sybase_rs
Run the following command to stop Cluster monitoring on the M2000:
# scswitch -n -j ossapp_rs
NOTE
The scswitch -n -j command helps you stop a resource. For example, after you run the scswitch -n -j
sybase_rs command, the Sybase is stopped.
CAUTION
The stopped resource cannot restart automatically after the server restarts. In this situation, you
must start the resource manually.
----End
Prerequisite
You have logged in to the M2000 as user root.
Procedure
To start M2000 services, run the command # scswitch -e -j ossapp_rs.
NOTE
Before starting the M2000 server, ensure that the Sybase is started. If the Sybase is not started, refer
to 17.2.2 How to Start the Sybase (HA) to start the Sybase.
The HA system takes some time to start services. Wait for ten minutes after you run the command.
----End
Issue 06 (2008-03-18)
M2000
HA System Administrator Guide (S10)
the M2000 services are resumed, the M2000 updates data with the NEs and processes the updated
data.
Prerequisite
You have logged in to the M2000 as user root.
Procedure
To stop M2000 services, run the command # scswitch -n -j ossapp_rs.
NOTE
The HA system takes some time to stop the services. Wait for ten minutes after you run the command. Run
the command svc_ps | wc to monitor the service stopping progress.
----End
Prerequisite
You have logged in to the server as user root.
Procedure
Run the following command to start the Sybase:
# scswitch -e -j sybase_rs
----End
Prerequisite
You have logged into the server as user root.
Procedure
Run the following command to stop the Sybase:
# scswitch -n -j sybase_rs
----End
Issue 06 (2008-03-18)
3-19