프린트 하기

OS환경 : Oracle Linux 6.8, 6.10 (64bit)

 

DB 환경 : Oracle Database 11.2.0.4 RAC

 

방법 : 오라클 11g R2 RAC OS 커널 패치시 작업 가이드

Oracle Linux 6.8을 6.10으로 패치할 때 Oracle database 2노드 RAC 의 작업 절차를 설명함
os 패치 작업이라도 작업전 grid home, db home을 백업해놓는것을 추천함

1
2
3
4
5
6
7
8
9
10
11
GRID 엔진 백업
# cd $GRID_HOME/../
# ls
grid
# tar -cvf grid_home_20211020.tar grid/
 
DB 엔진 백업
$ cd $ORACLE_HOME/../
$ ls 
db_1
$ tar -cvf db_home_20211020.tar db_1/

 

 

기존 커널 버전 확인(모든 노드)

1
2
3
4
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)
# uname -a
Linux rac1 4.1.12-37.4.1.el6uek.x86_64 #2 SMP Thu Jun 14 18:30:38 PDT 2016 x86_64 x86_64 x86_64 GNU/Linux

 

 

기존 grid 상태 확인(모든 노드)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.OCR_VOTE.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ORADATA.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ORAFRA.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.asm
               ONLINE  ONLINE       rac1                     Started             
               ONLINE  ONLINE       rac2                     Started             
ora.gsd
               OFFLINE OFFLINE      rac1                                         
               OFFLINE OFFLINE      rac2                                         
ora.net1.network
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ons
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac2                                         
ora.cvu
      1        ONLINE  ONLINE       rac2                                         
ora.oc4j
      1        ONLINE  ONLINE       rac2                                         
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                         
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                         
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open                
      2        ONLINE  ONLINE       rac2                     Open                
ora.scan1.vip
      1        ONLINE  ONLINE       rac2    

 

 

root 유저로 grid unlock 처리(모든 노드)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# cd $GRID_HOME/crs/install
# pwd
/oracle/app/11.2.0/grid/crs/install
# $GRID_HOME/perl/bin/perl ./rootcrs.pl -unlock
Using configuration parameter file: ./crsconfig_params
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.crsd' on 'rac1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'rac1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'rac1'
CRS-2673: Attempting to stop 'ora.OCR_VOTE.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.racdb.db' on 'rac1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.rac1.vip' on 'rac1'
CRS-2677: Stop of 'ora.racdb.db' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ORADATA.dg' on 'rac1'
CRS-2673: Attempting to stop 'ora.ORAFRA.dg' on 'rac1'
CRS-2677: Stop of 'ora.rac1.vip' on 'rac1' succeeded
CRS-2672: Attempting to start 'ora.rac1.vip' on 'rac2'
CRS-2677: Stop of 'ora.ORAFRA.dg' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ORADATA.dg' on 'rac1' succeeded
CRS-2676: Start of 'ora.rac1.vip' on 'rac2' succeeded
CRS-2677: Stop of 'ora.OCR_VOTE.dg' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'rac1'
CRS-2677: Stop of 'ora.ons' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'rac1'
CRS-2677: Stop of 'ora.net1.network' on 'rac1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'rac1' has completed
CRS-2677: Stop of 'ora.crsd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'rac1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-2673: Attempting to stop 'ora.evmd' on 'rac1'
CRS-2673: Attempting to stop 'ora.asm' on 'rac1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-2677: Stop of 'ora.crf' on 'rac1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'rac1' succeeded
CRS-2677: Stop of 'ora.asm' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'rac1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'
CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
Successfully unlock /oracle/app/11.2.0/grid

unlock 과 함께 grid, db 모두 종료됨

 

 

os 커널 패치(모든 노드)

1
2
3
4
5
6
# yum update -y
Loaded plugins: refresh-packagekit, security, ulninfo
Setting up Update Process
.
.
Complete!

 

 

패치 후 커널 버전 확인

1
2
3
4
# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.10 (Santiago)
# uname -a
Linux rac1 4.1.12-124.16.4.el6uek.x86_64 #2 SMP Thu Jun 14 18:55:52 PDT 2018 x86_64 x86_64 x86_64 GNU/Linux

정상적으로 커널 버전이 6.10으로 패치됨

 

 

grid owner로 grid relink(모든 노드)
(나의 경우 grid 설치시 별도의 유저없이 oracle 유저로 설치했기 때문에 oracle 유저로 relink)

1
2
3
4
5
6
7
8
9
# su - oracle
$ export ORACLE_HOME=$GRID_HOME
$ echo $ORACLE_HOME
/oracle/app/11.2.0/grid
$ cd $GRID_HOME/bin
$ pwd
/oracle/app/11.2.0/grid/bin
$ ./relink all
writing relink log to: /oracle/app/11.2.0/grid/install/relink.log

 

 

db owner로 db relink(모든 노드)

1
2
3
4
5
6
7
8
9
# su - oracle
$ export ORACLE_HOME=/oracle/app/oracle/product/11.2.0/db_1
$ echo $ORACLE_HOME
/oracle/app/oracle/product/11.2.0/db_1
$ cd $ORACLE_HOME/bin
$ pwd
/oracle/app/oracle/product/11.2.0/db_1/bin
$ ./relink all
writing relink log to: /oracle/app/oracle/product/11.2.0/db_1/install/relink.log

 

 

root 유저로 아래 스크립트 실행(모든 노드)

1
2
3
4
5
6
7
8
9
# cd $GRID_HOME/rdbms/install
# pwd
/oracle/app/11.2.0/grid/rdbms/install
# ./rootadd_rdbms.sh 
# cd $GRID_HOME/crs/install
# $GRID_HOME/perl/bin/perl ./rootcrs.pl -patch
Using configuration parameter file: ./crsconfig_params
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

lock 과 함께 grid, db 모두 기동됨

 

 

grid 상태 확인(모든 노드)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# crsctl stat res -t
--------------------------------------------------------------------------------
NAME           TARGET  STATE        SERVER                   STATE_DETAILS       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.OCR_VOTE.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ORADATA.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ORAFRA.dg
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.asm
               ONLINE  ONLINE       rac1                     Started             
               ONLINE  ONLINE       rac2                     Started             
ora.gsd
               OFFLINE OFFLINE      rac1                                         
               OFFLINE OFFLINE      rac2                                         
ora.net1.network
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
ora.ons
               ONLINE  ONLINE       rac1                                         
               ONLINE  ONLINE       rac2                                         
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       rac1                                         
ora.cvu
      1        ONLINE  ONLINE       rac1                                         
ora.oc4j
      1        ONLINE  ONLINE       rac1                                         
ora.rac1.vip
      1        ONLINE  ONLINE       rac1                                         
ora.rac2.vip
      1        ONLINE  ONLINE       rac2                                         
ora.racdb.db
      1        ONLINE  ONLINE       rac1                     Open                
      2        ONLINE  ONLINE       rac2                     Open                
ora.scan1.vip
      1        ONLINE  ONLINE       rac1    

모두 정상

 

 

*참고

rootcrs.pl -patch 시 아래 에러 발생시

1
2
3
4
5
6
7
# cd $GRID_HOME/crs/install
# $GRID_HOME/perl/bin/perl ./rootcrs.pl -patch
Using configuration parameter file: ./crsconfig_params
Installing Trace File Analyzer
/oracle/app/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: /oracle/app/11.2.0/grid/lib/libclntsh.so.11.1: file too short
at /oracle/app/11.2.0/grid/crs/install/crsconfig_lib.pm line 1446.
Timed out waiting for the CRS stack to start.

 

 

해당 파일 확인

1
2
3
# cd /oracle/app/11.2.0/grid/lib/
# ls -al libclntsh.so.11.1 
-rw-r--r--. 1 oracle oinstall 0 Jan 15 22:02 libclntsh.so.11.1

현재 용량이 0임

 

 

unlock 후 relink 시 어떠한 문제때문에 해당 라이브러리 파일이 제대로 구성되지 못해서 

파일 사이즈가 0이 되어서 grid 기동이 실패함

 

 

정상적인 노드나 동일한 os, 동일한 db 버전이 있는 서버의 $GRID_HOME/lib에서

해당 libclntsh.so.11.1 파일을 복사해서 넣으면됨

1
2
3
4
5
6
7
# scp libclntsh.so.11.1 192.168.137.50:/oracle/app/11.2.0/grid/lib/
The authenticity of host '192.168.137.50 (192.168.137.50)' can't be established.
RSA key fingerprint is 71:d6:25:8b:0b:51:9a:8d:ff:73:76:03:8a:e1:2e:b4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.137.50' (RSA) to the list of known hosts.
root@192.168.137.50's password: 
libclntsh.so.11.1                                                                                                          100%   51MB  51.3MB/s   00:00  

 

 

파일 용량 확인

1
2
3
# cd $GRID_HOME/lib
# ls -al libclntsh.so.11.1 
-rw-r--r--. 1 root oinstall 53793658 Jan 15 22:22 libclntsh.so.11.1

용량이 0이 아닌 정상 용량임

 

 

rootcrs.pl -patch 재시도

1
2
3
4
# $GRID_HOME/perl/bin/perl $GRID_HOME/crs/install/rootcrs.pl -patch
Using configuration parameter file: /oracle/app/11.2.0/grid/crs/install/crsconfig_params
Installing Trace File Analyzer
CRS-4123: Oracle High Availability Services has been started.

정상적으로 기동됨

 

 

해당 파일을 복구하고도 또 비슷한 에러가 발생한다면 파일 복사를 더해보고 그래도 안된다면 SR을 진행해야함

(GRID 엔진 백업본이 없다면 GRID 재설치가 가장 빠른 방법일수있음)

 

 

참조 : 1467060.1, 1536057.1

https://positivemh.tistory.com/788

 

오라클 19c RAC OS 커널 패치시 작업 가이드

OS환경 : Oracle Linux 8.4, 8.5 (64bit) DB 환경 : Oracle Database 19.12.0.0 RAC 방법 : 오라클 19c RAC OS 커널 패치시 작업 가이드 Oracle Linux 8.4을 8.5로 패치할 때 Oracle database 2노드 RAC 의..

positivemh.tistory.com

https://positivemh.tistory.com/769

 

오라클 11g R2 RAC PSU 패치전 백업 가이드

OS환경 : Oracle Linux 7.4 (64bit) DB 환경 : Oracle Database 11.2.0.4 RAC 방법 : Oracle 11g R2 RAC PSU 패치전 백업 가이드 11gR2 RAC 환경에서 PSU 패치 전에 백업해야할 파일 목록을 정리함 백업 파일은 패..

positivemh.tistory.com

https://positivemh.tistory.com/805

 

/oracle/app/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: /oracle/app/11.2.0/grid/lib/libclntsh.so.11.1: fil

OS환경 : Oracle Linux 6.10 (64bit) DB 환경 : Oracle Database 11.2.0.4 RAC 에러 : /oracle/app/11.2.0/grid/bin/crsctl.bin: error while loading shared libraries: /oracle/app/11.2.0/grid/lib/libcl..

positivemh.tistory.com