Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

[Oracle 12c Flex Cluster Project]-failover of Leaf Node

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Zhou Tianpeng of Waldorf Technology

Oracle implements the function of Flex Cluster using hub-and-spoken technology in 12c (that is, each node in a RAC cluster no longer needs to run both ASM and DB instances, and each node can play different roles). Compared with previous versions of 12c, this feature makes the expansion and reduction of cluster size more reliable. The reasons are as follows:

The mutual interference between the nodes in the cluster becomes less.

There is less competition for key cluster components, such as OCR and VOTING DISK.

A Flex Cluster can contain two types of nodes, hub node and leaf node.

Hub Node

This node is almost completely equivalent to the traditional RAC node before 12c, where this node is the core of the cluster (why is it the core)? Because the non-core node in 12c flex cluster-leaf node) will be introduced later.

Each hub node is connected through a private network, and ssh peer needs to be configured.

Each node needs to access shared storage because ocr voting relies on shared storage.

Run both ASM and db instances on hub node.

Each flex cluster has at least one hub node and a maximum of 64 hub node.

Leaf Node

Compared with hub node, leaf node is less core to the cluster, less coupled to the cluster, and does not need to be interconnected between leaf node.

Each leaf node connects to the cluster and fetches data through a hub node.

Although leaf node does not require direct access to shared storage, it is best to connect to shared storage because it is impossible to say when the leaf node will be converted to hub node in the future.

(the translator added here: although leaf node does not rely on shared storage to launch clusterware, when leaf node opens a database with read-only, that is, when there is a database instance running on the leaf node, the leaf node becomes reader node. Officials have made it clear that reader node must connect to shared storage. Official connection: http://docs.oracle.com/database/122/RILIN/running-database-instances-on-leaf-nodes.htm#RILIN-GUID-35BDCD41-375D-4EB2-B0FC-49345AF6C572)

They are running lightweight clusterware.

You cannot run ASM instances or build libraries on leaf node, because the instances running above can only be opened in a read-only manner.

A variety of applications can be run on leaf node, such as middleware, EBS, IDM, etc. Applications on leaf node will automatically switch to other leaf node after leaf node is hung up.

A flex cluster can contain 0 or more leaf node.

Leaf node and hub node have the same public and private networks.

Even if there is no leaf node in the flex cluster, the hub node can work like a traditional rac node. But it is absolutely impossible if there is only leaf node without a hub node in the flex cluster, because the leaf node needs to obtain the data through the asm instance on the hub node.

When Clusterware starts on leaf node, leaf node looks for all the hub node based on the GNS information, and then selects one of the hub node to get the data (configuring GNS is an important prerequisite for using leaf node). A hub node may be connected by 0 or more leaf node at the same time, while a leaf node can only connect to one hub node at a time. Heartbeat information is also exchanged between hub node and leaf node so that leaf node can join the cluster and be part of the cluster.

A standard cluster can be painlessly converted to flex cluster, but flex cluster cannot be converted to a standard cluster unless you reconfigure it (approximately equal to reinstallation).

What happens when a hub node that is part of a cluster dies?

Hub node is removed from the cluster when the following occurs:

Be expelled

Server shutdown

Manually stop Oracle Clusterware

When this happens, the leaf node connected to the hub node automatically picks a living hub node as the data source. In this article, I will argue:

How do I know which hub node leaf node is connected to?

How does the leaf node fail over when the hub node connected to the leaf node is down?

Status quo:

To better illustrate, I built a 12.1.0.2c flex cluster with the following structure:

Hub node

Host01

Host02

Host03

Leaf node

Host04

Host05

Argument:

Make sure hub node host01 and leaf node host04 are alive:

[root@host01 log] # crsctl get node role status-all

Node 'host01' active role is' hub'

Node 'host04' active role is' leaf'

Because host01 is currently the only living hub node in the cluster, host04 must be connected to host01. Moreover, this fact can be proved in host04's warning log:

Start host02 and host05 at this point:

[root@host01 log] # crsctl get node role status-all

Node 'host01' active role is' hub'

Node 'host02' active role is' hub'

Node 'host04' active role is' leaf'

Node 'host05' active role is' leaf'

To determine which hub node the host05 is connected to, let's look at the trace file of the ocssdrim process:

[root@host05 trace] # export ORACLE_BASE=/u01/app/grid

[root@host05 ~] # cat $ORACLE_BASE/diag/crs/host05/crs/trace/ocssdrim.trc | grep 'Sending a ping msg to' | tail-1

2016-05-04 11 Sending a ping msg to host host01: CSSD:1086187840: clssbnmc_PeriodicPing_CB: Sending a ping msg to host host01, number 1, using handle (0x14055d0) last msg to hub at 4294948750, connection timeout at 11454, current time 4294951260]]

We can see that host05 is also host01.

Let's stop the clusterware on host01 to make sure that all leaf node can fail over to other surviving hub node in the cluster, which in this case is host02:

[root@host01 log] # crsctl stop crs

[root@host02 ~] # crsctl get node role status-all

Node 'host02' active role is' hub'

Node 'host04' active role is' leaf'

Node 'host05' active role is' leaf'

Make sure host04 cuts to host02:

[root@host04 ~] # cat $ORACLE_BASE/diag/crs/host04/crs/trace/ocssdrim.trc | grep 'Destroying connection' | tail-1

2016-05-04 11 Destroying connection object 1715 31.932770: CSSD:1085761856: clssbnmConnDestroy: Destroying connection object (0x1061200) for host host01

[root@host04 ~] # cat $ORACLE_BASE/diag/crs/host04/crs/trace/ocssdrim.trc | grep 'Sending a ping msg to' | tail-1

2016-05-04 11 Sending a ping msg to host host02: CSSD:1085761856: clssbnmc_PeriodicPing_CB: Sending a ping msg to host host02, number 2, using handle (0x17e2fe0) last msg to hub at 1404044, connection timeout at 1434044, current time 1405324

Make sure host05 cuts to host02:

[root@host05 ~] # cat $ORACLE_BASE/diag/crs/host05/crs/trace/ocssdrim.trc | grep 'Destroying connection' | tail-1

2016-05-04 11 Destroying connection object 1715 31.873993: CSSD:1086187840: clssbnmConnDestroy: Destroying connection object (0x16979f0) for host host01

[root@host05 ~] # cat $ORACLE_BASE/diag/crs/host05/crs/trace/ocssdrim.trc | grep 'Sending a ping msg to' | tail-1

2016-05-04 11 Sending a ping msg to host host02 1715 36.751628: CSSD:1086187840: clssbnmc_PeriodicPing_CB: Sending a ping msg to host host02, number 2, using handle (0x10950b0) last msg to hub at 318184, connection timeout at 348184, current time 319664

Total knot

Flex cluster introduced by 12c has two kinds of nodes, hub node and leaf node.

Given that hub node can access shared storage, leaf node does not access shared storage directly, but connects to the cluster through a hub node.

When the clusterware on leaf node starts, leaf node automatically uses GNS to discover all the hub node and then connects to the cluster through one of the hub node.

If the hub node fails, the leaf node accessing the cluster through this hub node will automatically switch to a surviving hub node to continue to access the cluster.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report