본문 바로가기
DBMS/ORACLE

RAC VIP 변경

by 드바 2023. 6. 20.
OS : oracle linux 7.5
DBMS : oracle 19.3

 

RAC 환경에서 svr2-vip  192.168.56.65 -> 192.168.56.67  변경

 

[목차여기]

 

순서

1. 변경대상 노드 vip 서비스 중지

2. 모든노드 /etc/hosts 파일 변경

3. 변경대상 노드 vip 서비스 시작

 

0. 작업 전 현황

-- RAC 네트워크 확인
[root@svr1 ~]# oifcfg getif
enp0s3  192.168.56.0  global  public
enp0s8  192.168.57.0  global  cluster_interconnect,asm

-- hosts 파일 확인
IP 정보
[root@svr1 ~]# cat /etc/hosts
##Public
192.168.56.61 svr1
192.168.56.62 svr2
 
##Private
192.168.57.61 svr1-priv
192.168.57.62 svr2-priv
 
##Virtual
192.168.56.64 svr1-vip
192.168.56.65 svr2-vip
 
##SCAN
192.168.56.63 svr-scan


-- vip 정보 확인
[root@svr1 ~]# srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node svr1
VIP Name: svr1-vip
VIP IPv4 Address: 192.168.56.64
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node svr2
VIP Name: svr2-vip
VIP IPv4 Address: 192.168.56.65
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:


-- vip 상태 확인
[root@svr1 ~]# crsctl stat res -t | grep -A1 vip
ora.scan1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr2.vip
      1        ONLINE  ONLINE       svr2                     STABLE

 

1. vip 리소스 stop

-- svr2 노드 vip stop
[root@svr1 ~]# srvctl stop vip -n svr2 -f

-- stop 확인
[root@svr1 ~]# crsctl stat res -t | grep -A1 vip
ora.scan1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr2.vip
      1        OFFLINE OFFLINE                               STABLE

 

2. 모든 노드 /etc/hosts 파일 변경

[root@svr1 ~]# vi /etc/hosts
[root@svr1 ~]#
[root@svr1 ~]# cat /etc/hosts
##Public
192.168.56.61 svr1
192.168.56.62 svr2

##Private
192.168.57.61 svr1-priv
192.168.57.62 svr2-priv

##Virtual
192.168.56.64 svr1-vip
#192.168.56.65 svr2-vip
192.168.56.67 svr2-vip

##SCAN
192.168.56.63 svr-scan

 

3. vip 리소스 start

-- vip 정보 확인
[root@svr1 ~]# srvctl config nodeapps -a
Network 1 exists
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes:
VIP exists: network number 1, hosting node svr1
VIP Name: svr1-vip
VIP IPv4 Address: 192.168.56.64
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 1, hosting node svr2
VIP Name: svr2-vip
VIP IPv4 Address: 192.168.56.67
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
[root@svr1 ~]#

-- vip start
-- svr2 노드 vip start
[root@svr1 ~]# srvctl start vip -n svr2
[root@svr1 ~]#

-- vip 상태 확인
[root@svr1 ~]# crsctl stat res -t | grep -A1 vip
ora.scan1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr1.vip
      1        ONLINE  ONLINE       svr1                     STABLE
ora.svr2.vip
      1        ONLINE  ONLINE       svr2                     STABLE

 

-- vip 리소스명으로 서비스 start

더보기

[root@svr1 ~]# crsctl stat res -t

ora.scan1.vip

      1        ONLINE  ONLINE       svr1                     STABLE

ora.svr1.vip

      1        OFFLINE OFFLINE                               STABLE

ora.svr2.vip

      1        OFFLINE OFFLINE                               STABLE

 

-- svr1 vip 리소스 start

[root@svr1 ~]# srvctl start vip -vip svr1

[root@svr1 ~]# crsctl stat res -t

ora.svr1.vip

      1        ONLINE  ONLINE       svr1                     STABLE

ora.svr2.vip

      1        OFFLINE OFFLINE                               STABLE

 

'DBMS > ORACLE' 카테고리의 다른 글

ASM, spfile 환경 control file 다중화  (0) 2023.07.01
DBCA delete database 작업 시 목록 안보이는 경우  (0) 2023.06.22
RAC 환경 VIP Failover 테스트  (0) 2023.06.19
RAC 노드 추가(OUI)  (0) 2023.06.18
RAC 노드 제거(GUI)  (0) 2023.06.10

댓글