Dual-Machine switching (NEWSTARTHA,SKYBILITY,HACMP,HP UNIX dual-machine)

Source: Internet
Author: User
Tags failover

1. Suse Linux (Newstartha):

# CLI

cli:~>service-migrate

Select Service to migrate:

Current service:

0) Bill

1) gdb

2) Cancel

Select a service [0, 2]:

Follow the command line prompt to enter for switchover

2. AIX (HACMP):

# Smit HACMP

After entering:

Enter ENTER:

View dual-Machine status:

  switch resources from suibao01 to suibao02: Smitty hacmp

3. Suse Linux (skybility):

Dual-Machine switching test

After the HA configuration is complete, the last step is required: two-machine switching test. Testing allows you to check whether the entire software installation was successful.

The test steps are as follows:

1. Check the dual-machine status on the primary node:

(1) check whether the floating IP is active

Run:

# IP Addr

There should be a floating IP bound to the content on the eth0:0.

(2) Check whether the file system is mount

Run:

# df–k

A result similar to the following is returned:

/DEV/SDB1 50403000 14185692 33656952 30%/zxindata

(3) Check whether the Intelligent network software starts normally

To log in as a zxin10 user, run:

$ zxtool–p

You should be able to see that the process of the Smart network has started successfully, and you can view the boot log: /home/zxin10/log/zxcom.log The file should be able to find the information that the intelligent network system successfully connected to the database. If all checks are correct, the two-computer software starts successfully on the primary node and performs the following steps.

2. check that the HA process is started on the standby node:

# /etc/init.d/hadaemons status

Hacomm (PID 12016) is running.

Hacenter (PID 12021) is running.

HALOCKD (PID 12019) is running.

As shown above , running indicates that the ha process is working properly.

Run the following command to check if the dual-machine boot is normal:

# /opt/ha/bin/hastat

If the returned result 5.21 shows that two nodes are up, it indicates that the network is in the online state.

Figure 5.2? 1 Check the status of the dual machine

3. run the following command on the master node to perform a two-machine switchover

$ superstop

Cluster will detect the application failure, the dual-machine switching.

And if you use the Stop Cluster service method:

#/opt/ha/bin/hadaemons Stop

The two machines will be switched on immediately, but this node will not shut down. The next time you need to switchover from an alternate node to the master node, you need to manually start the Cluster service:

# /opt/ha/bin/hadaemons start

Ha typically stops the two machines on the main node as follows:

(1) stop application script

(2) umount file system

(3) releasing the floating IP address

Run the following command on the standby node to check the two-machine stop step:

# /opt/ha/bin/hastat

If the 5.2.2 shows, the primary node is stopping the dual machine.

Figure 5.2? 2 Check the dual-machine status 1

When the content shown in 5.2 3 appears, the service has successfully switched to the standby machine.

Figure 5.2? 3 Check the dual-machine status 2

4. Check the system state after dual-machine switching on the standby node

Log on to the standby with the root user to check if the ZTE Smart network software is running on the standby machine:

(1) check whether the floating IP is active;

(2) Check whether the file system is mount;

(3) Check whether the Intelligent network software starts normally.

5. start CLUSTER with the main node

Perform the following command to detect the status of the CLUSTER service on the primary node:

# /opt/ha/bin/hadaemons status

When the following result is returned, it indicates that the Ha service did not start.

Hacomm (PID 12016) is running.

Hacenter (PID 12021) is running.

HALOCKD (PID 12019) is running.

If the Cluster service does not start after the system restarts , check the cause. If you have just stopped the master node Cluster service manually, then manually start the Cluster service:

# /opt/ha/bin/hadaemons start

Then run the following command to check the status:

# /opt/ha/bin/hastat

When the results shown in 5.2 4 show, the start is successful.

Figure 5.2? 4 Check the dual-machine status 3

6. run the following command on the standby node to convert the two machines to the main node

# /opt/ha/bin/hadaemons stop

7. to the standby node to start HA

#/opt/ha/bin/hadaemons start

At this point, the two-machine environment is ready.

The above is through the conventional method of the switching test, on the basis of which users can also carry out a variety of means of switching test, such as: Unplug the main node network cable, the main node shut down, stop the database and so on. All of these conditions will cause the ha dual-machine switching.

4. HP UNIX:

1,Mc/service Guard dual-machine Common maintenance command

Location of the dual-machine maintenance command

#cd/usr/sbin/(with LS cm* you can see all the execution commands on the two machines )

1.1 Monitoring Cluster operation status

# CMVIEWCL [-v] [-N NN] ...  [-P PN] ... [-l {Package|cluster|node}]

[-V] Verbose output

[-N] View information only about the specific node_name (s).

[-P Package_name ... View information only about the specific

Package_name (s).

[-l] pkg|clus|node Display only package, cluster or node specific information

For example:

# CMVIEWCL

CLUSTER STATUS

Cluster1 up

NODE STATUS State

Imana100 up running

Package STATUS State Auto_run NODE

Pkg_oracle up running enabled imana100

NODE STATUS State

Imana101 up running

Package STATUS State Auto_run NODE

Pkg_app up running enabled imana101

You can also use the command:

Cmviewcl-v, or

CMQUERYCL, or

cmviewconf;

1.2 start cluster

# CMRUNCL-V-N imana100

1.3 Stop Cluster run

# CMHALTCL –f-v

[-F] Force the cluster to shutdown even if packages is currently running.

[-V] Verbose output

1.4 Start the node and add the node to Cluster

# cmrunnode-v Imana100

1.5 stop running a node and Cluster continue running on another node

# Cmhaltnode [-f] [-v] [NN ...]

[-F] Force the node to halt even if there is packages running on it.

[-V] Verbose output

# Cmhaltnode –f–v imana101

1.6 running a package in Running Cluster

# cmrunpkg [-N NN] [-v] PN ...

[-N] ACT on a specific node.

[-V] Verbose output

For example:

# cmrunpkg-n imana101 Pkg_app

Cmrunpkg:completed successfully on all packages specified.

1.7 To stop a running package

# cmhaltpkg [-N NN] [-v] PN ...

[-N] ACT on a specific node.

[-V] Verbose output

For example:

# cmhaltpkg-n imana101 Pkg_app

One or more packages have been halted and would not be started automatically. To start these packages, enable Auto_run via cmmodpkg

-e <package_name>.

Cmhaltpkg:completed successfully on all packages specified.

1.8 Changing the switch properties of a package

# cmmodpkg [-v] [-N NN] ...  {-e|-d} Pn...

[-V] Verbose output

[-N] Modify attributes on specific node (s)-Else globally mod.

-E Enable

-D Disable

Pn-package (s) whose switching attributes is changed

Note:CN = cluster_name NN = node_name PN = package_name

Explainations: ... = multiple occurences | = OR [Descriptor] = optional

1.9 Location of dual-machine configuration files

#cd/etc/cmcluster/( configuration file for dual-machine daemon CLUSTER.ASCII)

#cd/etc/cmcluster/pkg_app/,#cd/etc/cmcluster/pkg_oracle/(pkg_apP. CTL,pkg _oracle_ctl is used to make a floating IP for a dual machine )

1.10 Dual-machine switching test

Executing on the host

#cmhaltpkg-V pkg_oracle---- Stop the package on the host

#cmrunpkg-V-n imana101 pkg_oracle---- Boot the package on the standby machine

#cmmodpkg-e-n imana100 pkg_oracle---- allow host failover

Note: When the package is enabled, if the following error is reported, you need to execute the above command to join the node failover

# cmrunpkg-n imana100 pkghlrdb

Cmrunpkg:node imana100 is currently unable to run package pkg_oracle.

Check the syslog on node imana100 and pkg log files for more detailed information.


Dual-Machine switching (NEWSTARTHA,SKYBILITY,HACMP,HP UNIX dual-machine)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.