RAC-Related Basics

Source: Internet
Author: User
Tags failover
RAC-related Basics

1.CRS Introduction

starting with Oracle 10G, Oracle introduced a complete cluster management solution--cluster-ready Services, It includes cluster connectivity. Messages and locks-load management frameworks. This allows the RAC to be detached from the third party cluster, and of course, CRS can be used in conjunction with Third-party cluster components.

(1). CRS Process

CRS consists mainly of three parts, all of which appear as daemons

<1>CRSD: The primary engine for resource availability maintenance. It is used to perform high availability recovery and management operations, such as maintaining OCR and managing application resources, which hold the information state of the cluster and the configuration of OCR, which runs as root.

<2>EVMD: Event Management daemon. This process is also responsible for starting the RACGEVT process to manage Fan server-side calls, which run with root permissions

<3>OCSSD: Cluster synchronization Service process. Manages the membership of a cluster node and it starts in a fatal manner, so a failure of the process causes the cluster to reboot to prevent data necrosis. At the same time, CSS also maintains the basic lock function within the cluster and is responsible for monitoring the voting The brain crack failure of disk. It runs with Oracle permissions

In addition, there is a process oprcd, which is the process monitor in the cluster, only occurs when CRS on the platform does not use vendor groupware, and no matter how many instances are run, there is only one set of background processes per node.

Take a look at these daemon processes:

Rac1-> Cat/etc/inittab

..................................

# Run XDm in RunLevel 5

X:5:respawn:/etc/x11/prefdm–nodaemon

H1:35:RESPAWN:/ETC/INIT.D/INIT.EVMD Run >/dev/null 2>&1 </dev/null

H2:35:RESPAWN:/ETC/INIT.D/INIT.CSSD Fatal >/dev/null 2>&1 </dev/null

H3:35:RESPAWN:/ETC/INIT.D/INIT.CRSD Run >/dev/null 2>&1 </dev/null

(2). Virtual IP Address

Oracle 10G RAC, there are 3 important IP.

①public ip②private ip③vitual IP

Public IP for the host of the database Ip,private IP is used for private high-speed interconnection, and Oracle earlier version, the addition of a virtual IP, for nodes in the event of a faster failover, Oracle use the Lisnter of each node to listen to VIP, In the event of a failure, the VIP will make a real failover to stay online on other available nodes, reducing the time required for the client application to realize the node failure.

VIP and public IP must be in the same network segment.

(3). ocr,voting Disk
OCR (Oracle Cluster Registry) and voting disk (voting disks) are two important components under CRS that must be placed on a shared disk to ensure that each node is accessible to them.

OCR contains some configuration information for the cluster, such as the list of nodes in the cluster database. The CRS application. resource files and the authorization information for the event manager. He is responsible for tracking resources within the cluster to find out where the resources are running and where they should be run.

Voting disk is used to troubleshoot split-brain failures: If a node loses a network connection to other nodes in the cluster, these conflicts are resolved by the information in the voting disk

2.ASM Related

ASM (Automated Storage Management) is a file type introduced by Oracle 10G, which provides direct I/O reading and writing, and is a good solution to data file storage planning in the RAC system. ASM can automate the management of disk groups and provide data redundancy and optimization. The following sections explain the management of ASM and RAC management under ASM separately.

3.RAC Storage/Network Requirements

(1). Storage Requirements

Shared memory is one of the most important components of RAC. It requires that nodes within a cluster can read and write physical disks at the same time. Currently, there are a number of file types that support shared storage, such as the ASM,OCFS2 provided by Oracle itself and the cluster file system provided by the three Parties, which is a selectable type.

Table 1.1.1 shows the types of storage that are supported by the various parts of the RAC architecture (three-party clustered file systems are not considered, Asm/raw DEVICE/OCFS2 and normal file systems)

Table 1.1.1 The types of storage supported by the RAC sections

Category

Types of storage supported

Storage location

Note

Cluster Software

OCFS2, common File system

Shared disk/Local Disk

ocr,voting disk

Ocfs2,raw Device

Shared disks

Database software

OCFS2, common File system

Shared disk/Local Disk

Database files

Ocfs2,raw device,asm

Shared disks

Archive log files

Ocfs2,asm, common File system

Shared disk/Local Disk

Backup/Restore Files

Ocfs2,asm, common File system

Shared disk/Local Disk

Flash back log file

Ocfs2,asm

Shared disks

(2). Network Requirements

At least 2 physical network adapters are required on each node host to allocate both public and private IP addresses. For private IP connections, each cluster node connects to all other nodes through a dedicated high-speed network, with the aim of exchanging information status (lock information, global cache information, etc.) on the nodes and instances on the cluster. Through high-speed interconnection, cache fusion can be realized.

In a real-world environment, high-speed interconnection requires at least GB Ethernet, and it is best not to use a crossover direct connection.

A better solution is to configure a dedicated switch between nodes, so as not to affect the normal work of another node because one node on the cluster is down.

4. Other

(1). Background process

Figure 1.4.1 Backgroud Process in RAC 10g

Because it is necessary to maintain the locks required for multiple instances to access the resource at the same time, additional processes are added under the RAC compared to single instance. There are several processes dedicated to RAC:

1. LMS (global cache service) Globally caching services process

The LMS is responsible for passing blocks between instances for cache fusion requests. When a consistency request is made, the LMS first rolls back the block, creates a read-consistent image (CR) of the block, and then passes the consistency version over the high-speed interconnect to the foreground process in the remote instance that handles the request, which guarantees that only one instance is allowed to update the block at the same time.

The number of LMS processes is controlled by the initialization parameter gcs_server_processes. Oracle supports up to 36 LMS processes (0–9 and a–z) with the default value of 2 for this initialization parameter.

2. LMD (Global Enqueue service Daemon)

LMD is responsible for managing global queues and global resource access and updating the status of the corresponding queues, as well as requesting and deadlock detection for remote node resources. LMD with the LMS process to work together to maintain GRD.

3. Lmon (Global Enqueue Service monitor)

Lmon is the global Queue Service monitor that checks the death of instances in the cluster and initiates reconfiguration, which is responsible for reconfiguring locks and resources when an instance joins or leaves the cluster.

4. LCK (lock process) lock processes

LCK manages requests that are not cache fusion, such as library Cahe, row cache. Because the LMS process provides the primary lock management functionality, there is only one LCK process per node instance.

DIAG (the diagnostic Daemon) Diagnostics daemon

DIAG is responsible for monitoring the health of the instance and capturing information about the process failure, and writes the failure information to the failure analysis, which starts automatically and does not need to be artificially adjusted, and restarts automatically if it fails.

(2). Cache Fusion/Cache consistency

Cache Fusion is a central link in the work principle of RAC. His essence is through the Internet in the cluster of nodes between the SGA block transfer, so as to avoid the first push block to disk, and then reread into other instances of the cache, so as to minimize I/O. When a block is read into the cache of an instance in a RAC environment, the block is assigned a lock resource (unlike row-level locks) to ensure that other instances know that the block is being used. Then, if another instance requests a copy of the block that is already in the cache of the previous instance, the block is passed directly to the SGA of another instance via the Internet. If the block in memory has been changed, but the change has not yet been committed, a CR copy will be passed. This means that, whenever possible, a block of data can be moved between instances of the cache without having to write back to the disk, thus avoiding the extra I/O for synchronizing multiple instances of caching, which requires the speed of the Internet to be fast and faster than disk access.

GCS is responsible for maintaining cache consistency within the global buffer, which is the main component of the LMS process. GCS ensures that only processes from one instance can be modified on a block at the same time, and that the current and previous images of the block, as well as the state of the block (null,,shared, Exclusive), pattern (Local/gobal), are obtained.

The GES is responsible for maintaining the dictionary cache and library caching caches consistency (this is different from lck). Because of the existence of modifications to the data dictionary on a node (such as the DDL and DCL modification of the object attribute), GES is responsible for synchronizing the dictionary cache on each node to eliminate the differences. GES ensures that no deadlock occurs between multiple instances of the same object being requested for access.

The

     GRD contains current state information for all shared resources, which are maintained by GES and GCs,

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.