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

What is the method for Oracle to add and delete cluster nodes

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

Share

Shulou(Shulou.com)05/31 Report--

This article mainly introduces "what is the method of adding and deleting cluster nodes by Oracle". In the daily operation, I believe that many people have doubts about the method of adding and deleting cluster nodes by Oracle. The editor has consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts of "what is the method of adding and deleting cluster nodes by Oracle". Next, please follow the editor to study!

One: necessary steps to add a cluster node

Note:

Before adding nodes to the cluster, be sure to perform the Linux pre-installation tasks listed in the Oracle Grid Infrastructure installation and upgrade guide.

Do not install Oracle cluster software. When you add nodes to the cluster, the software replicates from the existing nodes.

Complete the following steps to prepare the nodes to be added to the cluster:

1. Establish a physical connection.

Connect the hardware of the node to the network infrastructure of the cluster. This includes establishing network connections, configuring network interconnections, configuring shared disk subsystem connections, and so on. For more information about this step, refer to the hardware vendor documentation.

two。 Install the operating system.

Installs a clone image of the operating system that matches the operating system on other nodes in the cluster. This includes installing the required service patches, updates, and drivers. For more information about this process, refer to the operating system vendor documentation.

Note:

Oracle recommends that you use a cloned image. However, if the installation meets the installation requirements, install the operating system according to the vendor documentation.

3. Create an Oracle user.

All Oracle users must be created on a new node on an existing node. For example, if you want to add nodes to a cluster with two nodes that have different owners for Oracle Grid Infrastructure home and Oracle home, you must create those owners on the new nodes, even if you do not plan to install Oracle home on the new nodes.

Note:

Perform this step only for Linux and UNIX systems.

As a root user, create Oracle users and groups with the same user ID and group ID as on the existing node.

4. Ensure that SSH is configured on the node.

5. Use the Cluster Verification Utility (CVU) to verify the hardware and operating system installation.

After you configure the hardware and operating system on the node you want to add, you can run the following command to verify that the node you want to add is accessible to other nodes in the cluster. You can also use this command to verify user equivalence to all given nodes in the local node, node connections between all given nodes, accessibility of all given nodes to shared storage, and so on.

From the Grid_home/bin directory on the existing node, run the CVU command to get a detailed comparison of the attributes of the referenced node with those of all other nodes in the current cluster environment. Replace ref_node with the name of the node in the existing cluster where you want to compare the node to be added with CVU. Specify a comma-separated list of nodes after the-n option. In the following example, orainventory_group is the name of Oracle Inventory group and osdba_group is the name of osdba group:

$cluvfy comp peer [- refnode ref_node]-n node_list [- orainv orainventory_group] [- osdba osdba_group] [- verbose]

B. Make sure that the grid infrastructure management repository provides at least 500 MB of additional space for each of the more than four added nodes, as follows:

$oclumon manage-get resize

If necessary, add additional space, as follows:

$oclumon manage-repos changerepossize total_in_MB

See also:

For more information about using OCLUMON, refer to the Oracle Autonomous Health Framework user Guide

Note:

For reference nodes, select the cluster node to which you want CVU to compare, for example, the node to be added, use the-n option to specify

After completing the procedures in this section, you can add nodes to the cluster.

Note:

After completing the Oracle Clusterware installation, avoid changing the hostname, including adding or removing domain qualifications. Nodes with changed hostnames must be removed from the cluster and re-added with a new name.

Add and delete cluster nodes on Linux and UNIX systems

Add or remove cluster nodes on Linux and UNIX systems.

The procedure in the add Node section assumes that you have performed the steps in the add Cluster Node prerequisite steps section.

The final step in the node addition process involves extending the Oracle Clusterware home from the Oracle Clusterware home on the existing node to the node to be added.

This section includes the following topics:

Add cluster nodes on Linux and UNIX systems

Delete cluster nodes on Linux and UNIX systems

Note:

Starting with Oracle Clusterware 11g release 2, the Oracle Universal installer defaults to silent mode when adding nodes.

2.1 add cluster nodes on Linux and UNIX systems

There are two ways to add nodes to the cluster.

2.1.1 add nodes using Fleet Patching and Provisioning

If you have a Fleet Patching and Provisioning server, you can use Fleet Patching and Provisioning to add nodes to the cluster with a single command, as shown in the following example:

$rhpctl addnode gihome-client rhpclient-newnodes clientnode2:clientnode2-vip-root

The previous example uses the root user login (the login name of the node to be added) to add a node named clientnode2 and VIP clientnode2 VIP to the Fleet Patching and Provisioning client named rhpclient.

2.1.2 add nodes using Oracle Grid Infrastructure Installer

If you do not want to use Fleet Patching and Provisioning to add nodes to the cluster, you can use Oracle Grid Infrastructure Installer to accomplish this task.

Note:

You can use $Oracle_home/install/response/gridSetup. The rsp template creates a response file to add nodes and uses Oracle Grid Infrastructure Installer for non-interactive (silent mode) operations.

Add nodes to the cluster using the Oracle Grid Infrastructure installer

1. Run. / gridSetup.sh to start the installer.

two。 On the Select configuration options page, select Add more nodes to the cluster.

3. On the cluster node information page, click Add... Provide information for the node to be added.

4. When the verification process is complete on the perform prerequisite check page, review the summary, and then click install.

5. If prompted, run the orainstRoot.sh script as root to populate the / etc/oraInst.loc file with the location of the central inventory. For example:

# / opt/oracle/oraInventory/orainstRoot.sh

6. If the Oracle RAC or Oracle RAC single-node database is configured on the cluster and there is a local Oracle home, extend the Oracle database home to node 3 by doing the following:

Log in to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user who installed Oracle RAC using the following syntax:

$. / addnode.sh "CLUSTER_NEW_NODES= {node3}"

Run the Oracle_home/root.sh script on node3 as root, where Oracle_home is Oracle RAC home.

If you have an Oracle home that uses Oracle automatic Storage Management Cluster File system (Oracle ACFS) shares, extend the Oracle database home to node 3 by doing the following:

Run the Grid_home/root.sh script on node3 as root, where Grid_home is the home of the Oracle grid infrastructure.

Run the following command to add Oracle RAC database home as the user who installed Oracle RAC from the Oracle_home/oui/bin directory on the node you want to add:

$. / runInstaller-attachHome ORACLE_HOME= "ORACLE_HOME"CLUSTER_NODES= {node3}" LOCAL_NODE= "node3" ORACLE_HOME_NAME= "home_name"-cfs

C. Log in to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user who installed Oracle RAC using the following syntax:

$. / addnode.sh-noCopy "CLUSTER_NEW_NODES= {node3}"

Note:

Use the-noCopy option because the Oracle home on the target node is completely populated by the software.

"if you have a shared Oracle home on a shared file system that is not Oracle ACFS, you must first create a mount point for the Oracle RAC database home on the target node, mount and attach the Oracle RAC database home, and then update the Oracle Inventory, as follows:"

Run the srvctl config database-db db_name command on an existing node in the cluster to get mount point information.

Run the following command on node3 as root to create a mount point:

# mkdir-p mount_point_path

C. Mount the file system that hosts the home directory of the Oracle RAC database.

Run the following command to add Oracle RAC database home as the user who installed Oracle RAC from the Oracle_home/oui/bin directory on the node you want to add:

$. / runInstaller-attachHome ORACLE_HOME= "ORACLE_HOME"CLUSTER_NODES= {local_node_name}" LOCAL_NODE= "node_name" ORACLE_HOME_NAME= "home_name"-cfs

Log in to the Oracle_home/addnode directory on node1 and run the addnode.sh script as the user who installed Oracle RAC using the following syntax:

$. / addnode.sh-noCopy "CLUSTER_NEW_NODES= {node3}"

Note:

After running addnode.sh, make sure that the permissions of the Grid_home/network/admin/samples directory are set to 750.

7. Run the Grid_home/root.sh script on node3 as root and follow the instructions to run the subsequent script.

Note:

If you ran the root.sh script in the previous step, you don't need to run it again.

If you have a policy-managed database, you must ensure that the Oracle home is cloned to the new node before running the root.sh script.

If any administrator-managed database instance is configured on the node that you want to add to the cluster, you must extend Oracle home to the new node before running the root.sh script.

Alternatively, use the srvctl remove instance command to delete the database instance managed by the administrator.

8. Run the following command from the Grid_home/bin directory as root to start the Oracle ACFS resource on the new node:

# srvctl start filesystem-device volume_device_name-node node3

Note:

Ensure that Oracle ACFS resources, including the Oracle ACFS registry resource and the Oracle ACFS file system resource where Oracle home resides, are online on the newly added node.

9. Run the following CVU command as the user who installed Oracle Clusterware to check the cluster integrity. This command verifies that any number of specified nodes have been successfully added to the cluster at the network, shared storage, and cluster software levels:

$cluvfy stage-post nodeadd-n node3 [- verbose]

2.2 remove cluster nodes on Linux and UNIX systems

Note:

You can remove the Oracle RAC database instance from the node before removing the node from the cluster, but you do not need to perform this step. If you do not delete the instance, the instance is still configured but has never been run. Removing a node from a cluster does not remove the configuration information of the node from the cluster. The remaining configuration information does not interfere with the operation of the cluster.

See also: Oracle Real Application Clusters Administration and Deployment Guide for more information about deleting the Oracle RAC database instance

If you delete the last node of a cluster served by GNS, you must delete the entry for that cluster from GNS.

If there are unpinned nodes in the cluster, Oracle Clusterware ignores them after a period of time and does not need to delete them.

If you create a node-specific configuration for a node (such as disabling services on a specific node, or adding that node to the candidate list of server pools), the node-specific configuration is not deleted when the node is deleted from the cluster. You must manually delete such node-specific configurations.

After any changes are made to the cluster, the voting files are automatically backed up to OCR.

If you want to remove non-hub nodes from the Oracle Flex cluster, you only need to complete steps 1 through 4 of this procedure.

To remove a node from a cluster:

1. Ensure that Grid_home correctly specifies the full directory path for Oracle Clusterware home on each node, where Grid_home is the location where the Oracle Clusterware software is installed.

two。 Run the following command as the root user or the user who installed Oracle Clusterware to determine whether the node to be deleted is active and pinned:

$olsnodes-s-t

If the node is pinned, run the crsctl unpin css command. Otherwise, proceed to the next step.

3. "on the node you want to delete, complete one of the following procedures as the user who installed the Oracle home, depending on whether you have a shared or local Oracle Clusterware:"

For the local primary node, uninstall the Oracle Clusterware home from the node you want to delete by running the following command, where Grid_home is the path defined for the Oracle Clusterware primary node:

$Grid_home/deinstall/deinstall-local

Note:

"if the-local flag is not specified, the command removes the Oracle Grid Infrastructure home from each node in the cluster."

-if you cut and paste the previous command, paste it into a text editor, and then paste it into the command line to remove any formatting that this document may contain.

Note:

Alternatively, if you want to remove any nodes from the grid infrastructure after configuring Oracle Grid Infrastructure, you can do so by running Grid_home/gridSetup.sh, choosing to remove the nodes from the cluster, and following the prompts.

If you have a shared home, run the following commands on the nodes you want to delete in the following order.

Run the following command to unconfigure Oracle Clusterware:

$Grid_home/crs/install/rootcrs.sh-deconfig-force

Run the following command from the Grid_home/oui/bin directory to detach the Grid home:

$. / runInstaller-detachHome ORACLE_HOME=Grid_home-silent-local

Follow the prompts from the installation utility to manually delete any configuration files.

4. "on any node that has never been deleted, run the following command from the Grid_home/bin directory as root to remove the node from the cluster:"

# crsctl delete node-n node_to_be_deleted

5. Run the following CVU command to verify that the specified node has been successfully removed from the cluster:

$cluvfy stage-post nodedel-n node_list [- verbose]

6. If you delete a cluster node that is closed by Oracle Clusterware, determine if the VIP of the deleted node still exists, as follows:

$srvctl config vip-node deleted_node_name

If VIP still exists, delete it as follows:

$srvctl stop vip-node deleted_node_name

$srvctl remove vip-vip deleted_vip_name

Delete a node using Fleet Patching and Provisioning

Alternatively, you can use Fleet Patching and Provisioning to remove nodes from the cluster with a single command, as shown in the following example:

$rhpctl deletenode gihome-client rhpclient-node clientnode2-root

The previous example uses the root user (the login name of the node to be deleted) to remove the node named clientnode2 from the Fleet Patching and Provisioning client named rhpclient.

Add and remove cluster nodes on the Windows system

This section describes adding and removing cluster nodes on Windows systems. This section includes the following topics:

Add nodes to the cluster on the Windows system

Delete a cluster node on a Windows system

See also:

Oracle Grid Infrastructure installation and upgrade Guide for Microsoft Windows x64 (64-bit) for more information on deleting the entire cluster

3.1 add nodes to the cluster on the Windows system

Before adding nodes, be sure to complete the prerequisites listed in the prerequisites for adding Cluster nodes.

This procedure describes how to add nodes to a cluster. This procedure assumes that:

There are two nodes in the existing cluster, named node1 and node2

You are adding a node named node3

You have successfully installed Oracle Clusterware on your local node1 and node2, where Grid_home represents the successfully installed home

Note:

Do not use the procedure described in this section to add cluster nodes in a configuration where the Oracle database has been upgraded from Oracle database 10g version 1 (10.1) on the Windows system.

Add a node:

1. Verify the integrity of the cluster and node 3:

C:\ > cluvfy stage-pre nodeadd-n node3 [- fixup] [- verbose]

You can specify the-fixup option and a directory to which CVU prints instructions to repair the cluster or node if validation fails.

two。 On node1, change to the Grid_home\ addnode directory and run the addnode.bat script, as follows:

C:\ > addnode.bat "CLUSTER_NEW_NODES= {node3}"CLUSTER_NEW_VIRTUAL_HOSTNAMES= {node3-vip}"

3. Run the following command on the new node:

C:\ > Grid_home\ crs\ config\ gridconfig.bat

4. The following steps are required only if you are configuring your database system to use Oracle ACFS:

a. For each database configured to use Oracle ACFS, run the following command from the Oracle RAC database home:

C:\ > ORACLE_HOME/bin/srvctl stop database-db database_unique_name

Note:

Run the srvctl config database command to list all databases configured with Oracle Clusterware. Use srvctl config database-db database_unique_name to find database details. If the ORACLE_HOME path points to the ORACLE ACFS mount path, the database uses ORACLE ACFS. Use the command output to find the name of the database instance configured to run on the newly added node.

B. Use the Windows Server Manager control to stop and delete services.

C. For each database and database home collected in the first part of this step, run the following command:

C:\ > ORACLE_HOME/bin/srvctl start database-db database_unique_name

5. Run the following command to verify the integrity of the Oracle Clusterware component on all configured nodes, including pre-existing and added nodes:

C:\ > cluvfy stage-post crsinst-n all [- verbose]

After completing the process of adding nodes in this section, you can choose to extend Oracle databases with Oracle RAC components to new nodes, making them members of existing Oracle RAC databases.

Create an OraMTS service for the Microsoft transaction server

The Oracle service for the Microsoft transaction server (OraMTS) allows the use of Oracle databases as resource managers in transactions coordinated by Microsoft applications. OraMTS acts as an agent from the Oracle database to the Microsoft distributed transaction Coordinator (MSDTC). Therefore, OraMTS provides client connection pooling and allows client components that leverage Oracle to participate in initiatable and distributed transactions. In addition, oramt can run the Oracle database on any operating system, as long as the service itself runs on Windows.

In versions prior to Oracle Database 12c, OraMTS services were created as part of a pure software installation. Starting with Oracle Database 12c, you must use the configuration tool to create this service.

Create the OraMTS service after adding a node for Oracle RAC or performing a software installation, as follows:

1. Open the command window.

two。 Change the directory to% ORACLE_HOME%\ bin.

3. Run the OraMTSCtl utility to create the OraMTS service, where host_name is the list of nodes on which the service should be created:

C:\.. bin > oramtsctl.exe-new-host host_name

3.2 Delete a cluster node on a Windows system

Delete a cluster node on a Windows system

Remove the cluster node from the Windows system.

This procedure assumes that Oracle Clusterware is installed on node1, node2, and node3, and that you are removing node3 from the cluster.

Note:

Oracle does not support the use of Oracle Enterprise Manager to delete nodes on Windows systems.

If you delete the last node of a cluster served by GNS, you must delete the entry for that cluster from GNS.

You can remove the Oracle RAC database instance from the node before removing the node from the cluster, but you do not need to perform this step. If you do not delete the instance, the instance is still configured but has never been run. Removing a node from a cluster does not remove the configuration information of the node from the cluster. The remaining configuration information does not interfere with the operation of the cluster.

See also: Oracle Real Application Clusters Administration and Deployment Guide for more information about deleting the Oracle RAC database instance

To delete a cluster node on a Windows system:

1. "only if you have local home, on the node you want to delete, run the following command with the-local option to update the node list:"

C:\ > Grid_home\ oui\ bin\ setup.exe-updateNodeList ORACLE_HOME=Grid_home "CLUSTER_NODES= {node_to_be_deleted}" CRS=TRUE-local

Note:

If you want to remove a non-hub node from an Oracle Flex cluster, you do not run this command.

two。 Run the deinstall tool on the node you want to delete to uninstall and unconfigure Oracle Clusterware home, as follows:

C:\ Grid_home\ deinstall\ > deinstall.bat-local

Note:

If the-local flag is not specified, the command removes the OracleGrid infrastructure master node from each node in the cluster.

If you cut and paste the previous command, paste it into a text editor before pasting it to the command line to remove any formatting that this document may contain.

3. On the undeleted node, run the following command:

C:\ > Grid_home\ bin\ crsctl delete node-n node_to_be_deleted

4. Run the following CVU command to verify that the specified node has been successfully removed from the cluster:

C:\ > cluvfy stage-post nodedel-n node_list [- verbose]

5. If you delete a cluster node that is closed by Oracle Clusterware, determine whether the VIP of the deleted node still exists, as follows:

C:\ > ORACLE_HOME/bin/srvctl config vip-node deleted_node_name

If VIP still exists, delete it as follows:

C:\ > ORACLE_HOME/bin/srvctl stop vip-node deleted_node_name

C:\ > ORACLE_HOME/bin/srvctl remove vip-node deleted_node_name

At this point, the study on "what is the method of adding and deleting cluster nodes by Oracle" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

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