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

[RAC] RAC add Node

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

Share

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

I. Planning

Second, clear thinking

Step1: configure the rac3 operating system to keep it consistent with existing nodes

Step2: configure grid and oracle user trust

Step3: check cluster status and new node configuration

Step4: execute add node script

Step5: extending DB HOME

Step6: extending an instance

Step7: complete the check

Third, preparatory work 1. Turn off the firewall and selinux (rac3)

# systemctl stop firewall

# systemctl disable firewall

Close selinux

# vi / etc/selinux/config

SELINUX=disabled

two。 Modify / etc/hosts file (rac1/rac2/rac3)

Add information for rac3

172.16.70.170 rac1

172.16.70.171 rac2

172.16.70.190 rac3

10.0.0.100 rac1-priv

10.0.0.101 rac2-priv

10.0.0.102 rac3-priv

172.16.70.173 rac1-vip

172.16.70.174 rac2-vip

172.16.70.191 rac3-vip

172.16.70.175 cluster-scan-ip

3. Modify kernel parameters (rac3)

# vi / etc/sysctl.conf

Fs.aio-max-nr = 1048576

Fs.file-max = 6815744

Kernel.shmmax = 8589934591

Kernel.shmmni = 4096

Kernel.shmall = 2097152

Kernel.sem = 250 32000 100 128

Net.ipv4.ip_local_port_range = 9000 65500

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048576

Make the parameter effective

# sysctl-p

4. Modify user restrictions (rac3)

# vi / etc/security/limits.conf

Grid soft nproc 2047

Grid hard nproc 16384

Grid soft nofile 1024

Grid hard nofile 65536

Oracle soft nproc 2047

Oracle hard nproc 16384

Oracle soft nofile 1024

Oracle hard nofile 65536

5. Add users and groups (rac3)

(1) create a group

# groupadd-g 501 dba

# groupadd-g 50 2 oinstall

(2) create users

# useradd-u 50 1-g oinstall-G dba-d / home/oracle oracle

# useradd-u 600-g oinstall-G dba-d / home/grid grid (3) set passwords for oracle and grid users

# passwd oracle

# passwd grid

(4) check

# id oracle

# id grid

6. Create a directory (rac3)

# mkdir-p / u01/app/oracle

# mkdir-p / u01/app/oracle / product/11.2.0/db_1

# mkdir-p / u01/app/grid

# mkdir-p / u01/app/11.2.0/grid

# chown-R oracle:oinstall / U01

# chown-R grid:oinstall / U01 / app/grid

# chown-R grid:oinstall / u01/app/11.2.0 / grid

# chown-R oracle:oinstall / u01/app/oracle

# chmod-R 775 / U01

7. Modify environment variable (rac3)

(grid user) $vi .bash _ profile

Export ORACLE_SID= + ASM 3

Export ORACLE_BASE=/u01/app/grid

Export ORACLE_HOME=/u01/app/11.2.0/grid

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$ORACLE_HOME/bin:$PATH

(oracle users)

$vi / home/oracle/.bash_profile

Export ORACLE_SID= ORCL3

Export ORACLE_BASE=/u01/app/oracle

Export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

Export LD_LIBRARY_PATH=$ORACLE_HOME/lib

Export PATH=$PATH:$ORACLE_HOME/bin

8. Configure local yum source, install package (rac3)

Upload iso image to / u01/set/os directory

# mount-o loop / u01/setup/os/ rhel-server-7.2-x86_64-dvd.iso / mnt

# vi / etc/yum.repos.d/mnt.repo

[mnt]

Name=Yum Source

Baseurl= file:///mnt

Enabled=1

Gpgcheck=0

# yum makecache

Install the following packages:

# yum install-y binutils compat* elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel gcc gcc-c++ libaio libgcc libstdc++ libstdc++-devel make sysstat unixODBC-devel libaio-devel ksh

9. Configure ASM disk (rac3)

# vi / etc/udev/rules.d/ 99-oracle-asmdevices.rules

KERNEL== "sd* [! 0-9]", ENV {DEVTYPE} = = "disk", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d $devnode", RESULT== "14f504e46494c45524932494157712d763771782d30694f30", RUN+= "/ bin/sh-c 'mknod / dev/asm_ocr b $major $minor; chown grid:oinstall / dev/asm_ocr; chmod 0660 / dev/asm_ocr'"

KERNEL== "sd* [! 0-9]", ENV {DEVTYPE} = = "disk", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d $devnode", RESULT== "14f504e46494c45526d70325177442d616f33572d35686452", RUN+= "/ bin/sh-c 'mknod / dev/asm_data1 b $major $minor; chown grid:oinstall / dev/asm_data1; chmod 0660 / dev/asm_data1'"

KERNEL== "sd* [! 0-9]", ENV {DEVTYPE} = = "disk", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d $devnode", RESULT== "14f504e46494c455251726b30676d2d337842312d55375278", RUN+= "/ bin/sh-c 'mknod / dev/asm_data2 b $major $minor; chown grid:oinstall / dev/asm_data2; chmod 0660 / dev/asm_data2'"

KERNEL== "sd* [! 0-9]", ENV {DEVTYPE} = = "disk", SUBSYSTEM== "block", PROGRAM== "/ usr/lib/udev/scsi_id-g-u-d $devnode", RESULT== "14f504e46494c45527650634d78742d4a7664622d3276506e", RUN+= "/ bin/sh-c 'mknod / dev/asm_arch b $major $minor; chown grid:oinstall / dev/asm_arch; chmod 0660 / dev/asm_arch'"

Start udev

# / sbin/udevadm trigger-type=devices-action=change

View asm disk

# ll / dev/asm*

Brw-rw----. 1 grid oinstall 8, 64 Aug 6 10:54 / dev/asm_arch

Brw-rw----. 1 grid oinstall 8, 32 Aug 6 10:54 / dev/asm_data1

Brw-rw----. 1 grid oinstall 8, 48 Aug 6 10:54 / dev/asm_data2

Brw-rw----. 1 grid oinstall 8, 16 Aug 6 10:54 / dev/asm_ocr

Note: the steps 1-9 above need to be consistent with the rac1&rac2 configuration

Fourth, add node 1. Configure mutual trust between Oracle and grid users (rac1)

(oracle users)

$ORACLE_HOME/oui/bin/runSSHSetup.sh-user oracle-hosts' rac1 rac2 rac3'-advanced-exverify

(grid users)

$ORACLE_HOME/oui/bin/runSSHSetup.sh-user grid-hosts' rac1 rac2 rac3'-advanced-exverify

two。 Detect clusters and newly added nodes (rac1)

(grid users)

1) check rac3 connectivity and shared storage access

$cluvfy stage-post hwos-n rac3-verbose

2) compare node 2 and node 3 attributes

$cluvfy comp peer-refnode rac2-n rac3-verbose

3) check the integrity of clusters and newly added nodes

$cluvfy stage-pre nodeadd-n rac3-fixup-verbose

3. Perform add Node (rac1)

$export IGNORE_PREADDNODE_CHECKS=Y

$cd $ORACLE_HOME/oui/bin

$. / addNode.sh-silent "CLUSTER_NEW_NODES= {rac3}"CLUSTER_NEW_VIRTUAL_HOSTNAMES= {rac3-vip}"

Finally, under node 3, the root user executes the following two scripts

# / u01/app/oraInventory/orainstRoot.sh

# / u01/app/11.2.0/grid/root.sh

4. Extended DB HOME (rac1 execution)

(oracle users)

$export IGNORE_PREADDNODE_CHECKS=Y

$cd $ORACLE_HOME/oui/bin

$. / addNode.sh-silent "CLUSTER_NEW_NODES= {rac3}"

Finally, the root user is required to execute the following script in rac3:

# / u01/app/oracle/product/11.2.0/db_1/root.sh

5. Extended instance (rac1 execution)

(oracle users)

Method 1: silent mode

Execute the following command:

$dbca-silent-addInstance-nodeList rac3-gdbName ORCL-instanceName ORCL3-sysDBAUserName sys-sysDBAPassword oracle

Command reference:

$dbca-silent-addInstance-nodeList node_name-gdbName gdb_name-instanceName instance_name-sysDBAUserName sysdba-sysDBAPassword password

Parameter description:

Node_name: the node name you want to add to

Gdb_name: global database name

Instance_name: specify the instance name

Sysdba: a user with sysdba permission

Password: password

Method 2: DBCA graphical interface

6. Resource check

1) check cluster resources

$crsctl status res-t

2) instance check

SQL > select instance_number,instance_name,host_name from gv$instance

INSTANCE_NUMBER INSTANCE_NAME HOST_NAME

3 ORCL3 rac3

2 ORCL2 rac2

1 ORCL1 rac1

3) Log check

Check all node asm alert logs, db alert logs.

-end

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