오라클 2node RAC 에서 DB서버(노드)를 하나 더 추가해서 3node RAC 로 만드는 과정을 해보겠습니다.
RAC 노드를 추가하는 과정은 아래와 같이 3단계를 거칩니다.
단계1) GI S/W addnode
단계2) DB S/W addnode
단계3) DB Instance 추가
위 3단계를 진행하기 전에 이미 새로 추가할 서버가 준비되어 있어야 합니다.
해당 서버는 기존 RAC 서버들과 똑같은 상태여야 합니다.
RAC 설치할때 필요한 패키지들이 다 설치되어 있고, 필요한 Kernel 파라메타들도 세팅되어 있고, 클러스터 공유스토리지도 접근이 가능하도록 준비되어 있어야 합니다.
/etc/hosts 파일에 새로 추가하는 서버의 Public IP, Private IP, VIP 가 모두 등록되어 있어야 합니다.
또, 기존 1,2번 서버와 새로 추가되는 3번 서버간에 Passwordless SSH 도 세팅되어 있어야 합니다.
이게 안되어 있으면, 중간에 INS-06006 에러를 만납니다.
이렇게 다 준비가 되었으면 이제부터 단계별로 설치를 진행하면 됩니다.
단계1) GI S/W addnode
GI(Grid Infrastructure) S/W 의 Oracle Home 에 가면 addnode 디렉토리가 있습니다.
여기로 가서 addnode.sh 을 실행합니다.
addnode.sh 에 옵션으로 새로 추가할 노드의 Public IP, VIP 에 대한 hostname 을 넣어줍니다.
[oracle@ol7r1 addnode]$ ./addnode.sh -silent -ignoreSysPrereqs -ignorePrereqFailure \
> -waitForCompletion CLUSTER_NEW_NODES=ol7r3 CLUSTER_NEW_VIRTUAL_HOSTNAMES=ol7r3-vip
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /u01/app/oraInventory/logs/addNodeActions2021-10-11_06-40-04PM.log
ACTION: Identify the list of failed prerequisite checks from the log: /u01/app/oraInventory/logs/addNodeActions2021-10-11_06-40-04PM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
Copy Files to Remote Nodes in progress.
.................................................. 6% Done.
.................................................. 11% Done.
....................
Copy Files to Remote Nodes successful.
Prepare Configuration in progress.
Prepare Configuration successful.
.................................................. 21% Done.
You can find the log of this install session at:
/u01/app/oraInventory/logs/addNodeActions2021-10-11_06-40-04PM.log
Instantiate files in progress.
Instantiate files successful.
.................................................. 49% Done.
Saving cluster inventory in progress.
.................................................. 83% Done.
Saving cluster inventory successful.
The Cluster Node Addition of /u01/app/19.0.0/grid was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2021-10-11_06-40-04PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 90% Done.
Update Inventory in progress.
You can find the log of this install session at:
/u01/app/oraInventory/logs/addNodeActions2021-10-11_06-40-04PM.log
Update Inventory successful.
.................................................. 97% Done.
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/19.0.0/grid/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[ol7r3]
Execute /u01/app/19.0.0/grid/root.sh on the following nodes:
[ol7r3]
The scripts can be executed in parallel on all the nodes.
Successfully Setup Software with warning(s).
.................................................. 100% Done.
addnode.sh 이 성공적으로 수행되면, 위와같이 100% Done 메시지와 함께,
새로 추가된 노드에서 orainstRoot.sh 과 root.sh 을 수행하라고 메시지가 나옵니다. (root 유저에서 실행)
[root@ol7r3 ~]#
[root@ol7r3 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete.
[root@ol7r3 ~]#
[root@ol7r3 ~]#
[root@ol7r3 ~]# /u01/app/19.0.0/grid/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/19.0.0/grid
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Relinking oracle with rac_on option
Using configuration parameter file: /u01/app/19.0.0/grid/crs/install/crsconfig_params
The log of current session can be found at:
/u01/app/grid/crsdata/ol7r3/crsconfig/rootcrs_ol7r3_2021-10-11_07-14-35PM.log
2021/10/11 19:14:38 CLSRSC-594: Executing installation step 1 of 19: 'SetupTFA'.
2021/10/11 19:14:38 CLSRSC-594: Executing installation step 2 of 19: 'ValidateEnv'.
2021/10/11 19:14:38 CLSRSC-363: User ignored prerequisites during installation
2021/10/11 19:14:39 CLSRSC-594: Executing installation step 3 of 19: 'CheckFirstNode'.
2021/10/11 19:14:39 CLSRSC-594: Executing installation step 4 of 19: 'GenSiteGUIDs'.
2021/10/11 19:14:45 CLSRSC-594: Executing installation step 5 of 19: 'SetupOSD'.
2021/10/11 19:14:45 CLSRSC-594: Executing installation step 6 of 19: 'CheckCRSConfig'.
2021/10/11 19:14:46 CLSRSC-594: Executing installation step 7 of 19: 'SetupLocalGPNP'.
2021/10/11 19:14:48 CLSRSC-594: Executing installation step 8 of 19: 'CreateRootCert'.
2021/10/11 19:14:48 CLSRSC-594: Executing installation step 9 of 19: 'ConfigOLR'.
2021/10/11 19:14:57 CLSRSC-594: Executing installation step 10 of 19: 'ConfigCHMOS'.
2021/10/11 19:14:57 CLSRSC-594: Executing installation step 11 of 19: 'CreateOHASD'.
2021/10/11 19:14:58 CLSRSC-594: Executing installation step 12 of 19: 'ConfigOHASD'.
2021/10/11 19:14:58 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.service'
2021/10/11 19:15:03 CLSRSC-4002: Successfully installed Oracle Trace File Analyzer (TFA) Collector.
2021/10/11 19:16:07 CLSRSC-594: Executing installation step 13 of 19: 'InstallAFD'.
2021/10/11 19:16:08 CLSRSC-594: Executing installation step 14 of 19: 'InstallACFS'.
2021/10/11 19:17:19 CLSRSC-594: Executing installation step 15 of 19: 'InstallKA'.
2021/10/11 19:17:20 CLSRSC-594: Executing installation step 16 of 19: 'InitConfig'.
2021/10/11 19:17:29 CLSRSC-594: Executing installation step 17 of 19: 'StartCluster'.
2021/10/11 19:18:39 CLSRSC-343: Successfully started Oracle Clusterware stack
2021/10/11 19:18:39 CLSRSC-594: Executing installation step 18 of 19: 'ConfigNode'.
clscfg: EXISTING configuration version 19 detected.
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
2021/10/11 19:18:58 CLSRSC-594: Executing installation step 19 of 19: 'PostConfig'.
2021/10/11 19:19:05 CLSRSC-325: Configure Oracle Grid Infrastructure for a Cluster ... succeeded
이제 새로운 노드에 GI S/W 가 성공적으로 설치되었습니다.
crsctl stat res -t 커맨드로 새로 추가된 노드를 확인할 수 있습니다.
위에서 보면 ol7r3 라는 3번째 노드가 추가된 것을 확인할 수 있습니다.
하지만, 아직 DB는 1,2 번 2개만 나옵니다.
단계2) DB S/W addnode
앞에서 새로운 노드에 GI S/W 를 설치하고 CRS 에 등록까지 되었습니다.
이제 새로운 노드에 DB S/W 를 설치해 보겠습니다.
1번 노드에서 DB S/W Oracle Home 에 가보면, GI S/W Oracle Home 에서와 마찬가지로 addnode 디렉토리가 존재합니다.
여기로 가서 addnode.sh 을 실행합니다.
[oracle@ol7r1 addnode]$ ./addnode.sh -silent -ignoreSysPrereqs -ignorePrereqFailure \
> -waitForCompletion CLUSTER_NEW_NODES=ol7r3
Prepare Configuration in progress.
Prepare Configuration successful.
.................................................. 7% Done.
Copy Files to Remote Nodes in progress.
.................................................. 12% Done.
.................................................. 18% Done.
..............................
Copy Files to Remote Nodes successful.
You can find the log of this install session at:
/u01/app/oraInventory/logs/addNodeActions2021-10-11_08-05-41PM.log
Instantiate files in progress.
Instantiate files successful.
.................................................. 52% Done.
Saving cluster inventory in progress.
.................................................. 89% Done.
Saving cluster inventory successful.
The Cluster Node Addition of /u02/app/oracle/product/19.0.0/dbhome_1 was successful.
Please check '/u01/app/oraInventory/logs/silentInstall2021-10-11_08-05-41PM.log' for more details.
Setup Oracle Base in progress.
Setup Oracle Base successful.
.................................................. 96% Done.
As a root user, execute the following script(s):
1. /u02/app/oracle/product/19.0.0/dbhome_1/root.sh
Execute /u02/app/oracle/product/19.0.0/dbhome_1/root.sh on the following nodes:
[ol7r3]
Successfully Setup Software.
.................................................. 100% Done.
위와 같이 100% 성공 메시지가 나오면, 3번노드에 가서 root.sh 을 실행시켜 줍니다. (root 유저로 실행)
[root@ol7r3 ~]# /u02/app/oracle/product/19.0.0/dbhome_1/root.sh
Performing root user operation.
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u02/app/oracle/product/19.0.0/dbhome_1
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
이렇게 해서 DB S/W 도 설치되었습니다.
이제 마지막으로 인스턴스만 추가하면 됩니다.
단계3) DB Instance 추가
인스턴스 추가는 dbca 커맨드로 합니다.
[oracle@ol7r1 ~]$ dbca -silent -addInstance -gdbName ORA19 -nodeName ol7r3 -instanceName ORA193
Prepare for db operation
40% complete
Adding instance
48% complete
52% complete
56% complete
60% complete
64% complete
68% complete
72% complete
80% complete
Completing instance management.
86% complete
100% complete
Instance "ORA193" added successfully on node "ol7r3".
Look at the log file "/u02/app/oracle/cfgtoollogs/dbca/ORA19/ORA19.log" for further details.
-gdbName : Global DB명 (그냥 DB명)
-nodeName : 새로 추가한 DB노드 (여기서는 3번 노드)
-instanceName : 3번째 DB인스턴스명 (보통 인스턴스명은 DB명 뒤에 1,2,3... 을 붙이는 식)
crsctl stat res -t 커맨드로 새로 추가된 노드에 DB가 정상적으로 추가되고 구동된 것을 확인할 수 있습니다.
이렇게 해서 2노드 RAC 를 3노드 RAC 로 확장해봤습니다.
이 예제에서는 silent 모드로만 진행했는데, -silent 를 빼면 X-Window 에 GUI 모드로 수행할 수 있습니다.
'IT관련' 카테고리의 다른 글
VirtualBox 게스트 확장CD 설치 에러 : Kernel headers not found, modprobe vboxguest failed (0) | 2022.01.19 |
---|---|
Oracle Alert Log, Trace 파일 볼때 컬러풀하게 색깔넣어서 보는 방법 (vim 세팅) (0) | 2021.12.31 |
Oracle 11g DB에서 12c, 19c 로 업그레이드 할때 wm_concat 함수 listagg 로 변경 필요 (0) | 2021.10.01 |
Oracle RAC One Node vs Oracle Restart 차이점 (0) | 2021.09.16 |
오라클 RAC One Node Database 설치하기 (Oracle HA DB) (0) | 2021.09.16 |