Thursday, September 29, 2022

How to Create Additional SCAN

Note: This demo bases on the environment in previous post. You can check here.

1. Get current information
 
[grid@saigon-01 ~]$ oifcfg getif
enp0s3  192.168.56.0  global  public
enp0s8  192.168.89.0  global  cluster_interconnect,asm
 
[grid@saigon-01 ~]$ srvctl config network
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:
 
[grid@saigon-01 ~]$ srvctl config scan -all
SCAN name: saigon-scan, Network: 1
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.56.55
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.56.66
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.56.77
SCAN VIP is enabled.
 
[grid@saigon-01 ~]$ srvctl config scan_listener -all
SCAN Listeners for network 1:
Registration invited nodes:
Registration invited subnets:
Endpoints: TCP:1521
SCAN Listener LISTENER_SCAN1 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN2 exists
SCAN Listener is enabled.
SCAN Listener LISTENER_SCAN3 exists
SCAN Listener is enabled.
 
[grid@saigon-01 ~]$ srvctl config listener -all
Name: LISTENER
Type: Database Listener
Network: 1, Owner: grid
Home: <CRS home>
  /u01/app/21.0.0/grid on node(s) saigon-02,saigon-01
End points: TCP:1521
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:
 
[grid@saigon-01 ~]$ srvctl config vip -node saigon-01
VIP exists: network number 1, hosting node saigon-01
VIP Name: saigon-01-vip.south.com
VIP IPv4 Address: 192.168.56.33
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:

[grid@saigon-01 ~]$ srvctl config vip -node saigon-02
VIP exists: network number 1, hosting node saigon-02
VIP Name: saigon-02-vip.south.com
VIP IPv4 Address: 192.168.56.44
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:

2. Config /etc/hosts on 2 nodes
 
[grid@saigon-01 ~]$ oifcfg iflist
enp0s3  192.168.56.0
enp0s8  192.168.89.0
enp0s9  192.168.44.0
 
[root@saigon-01 ~]# vi /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
 
192.168.56.123  ntp-server.south.com    ntp-server
 
192.168.56.11   saigon-01.south.com     saigon-01
192.168.56.22   saigon-02.south.com     saigon-02
 
192.168.56.33   saigon-01-vip.south.com     saigon-01-vip
192.168.56.44   saigon-02-vip.south.com     saigon-02-vip
 
192.168.89.11   saigon-01-priv.south.com     saigon-01-priv
192.168.89.22   saigon-02-priv.south.com     saigon-02-priv
 
192.168.56.55   saigon-scan.south.com      saigon-scan
192.168.56.66   saigon-scan.south.com      saigon-scan
192.168.56.77   saigon-scan.south.com      saigon-scan

# Additional SCAN
192.168.44.33   saigon-01-vip2.south.com        saigon-01-vip2
192.168.44.44   saigon-02-vip2.south.com        saigon-02-vip2
 
192.168.44.55   saigon-scan2.south.com        saigon-scan2
192.168.44.66   saigon-scan2.south.com        saigon-scan2
192.168.44.77   saigon-scan2.south.com        saigon-scan2

 
3. Add 2nd network
 
[grid@saigon-01 ~]$ oifcfg iflist
enp0s3  192.168.56.0
enp0s8  192.168.89.0
enp0s8  169.254.0.0
enp0s9  192.168.44.0
 
[grid@saigon-01 ~]$ oifcfg getif
enp0s3  192.168.56.0  global  public
enp0s8  192.168.89.0  global  cluster_interconnect,as
 
As GRID user, execute the command:
[grid@saigon-01 ~]$ oifcfg setif -global enp0s9/192.168.44.0:public
[grid@saigon-01 ~]$ oifcfg getif

enp0s3  192.168.56.0  global  public
enp0s8  192.168.89.0  global  cluster_interconnect,asm
enp0s9  192.168.44.0  global  public
 
As ROOT user, execute the command:
[root@saigon-01 bin]# ./srvctl add network -netnum 2 -subnet 192.168.44.0/255.255.255.0/enp0s9 -nettype STATIC
[root@saigon-01 bin]# ./srvctl config network -netnum 2
Network 2 exists
Subnet IPv4: 192.168.44.0/255.255.255.0/enp0s9, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is individually enabled on nodes:
Network is individually disabled on nodes: 

4. Add node VIPs - as ROOT user
 
[root@saigon-01 bin]# ./srvctl add vip -node saigon-01 -netnum 2 -address 192.168.44.33/255.255.255.0
[root@saigon-01 bin]# ./srvctl add vip -node saigon-02 -netnum 2 -address 192.168.44.44/255.255.255.0
 
[grid@saigon-01 ~]$ srvctl config vip -node saigon-01
VIP exists: network number 1, hosting node saigon-01
VIP Name: saigon-01-vip.south.com
VIP IPv4 Address: 192.168.56.33
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 2, hosting node saigon-01
VIP IPv4 Address: 192.168.44.33
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:


[grid@saigon-01 ~]$ srvctl config vip -node saigon-02
VIP exists: network number 1, hosting node saigon-02
VIP Name: saigon-02-vip.south.com
VIP IPv4 Address: 192.168.56.44
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:
VIP exists: network number 2, hosting node saigon-02
VIP IPv4 Address: 192.168.44.44
VIP IPv6 Address:
VIP is enabled.
VIP is individually enabled on nodes:
VIP is individually disabled on nodes:


5. Add node listener on network number 2 - as GRID user
 
[grid@saigon-01 ~]$ srvctl add listener -listener LISTENER2 -netnum 2 -endpoints "TCP:1522"
[grid@saigon-01 ~]$ srvctl config listener

Name: LISTENER
Type: Database Listener
Network: 1, Owner: grid
Home: <CRS home>
End points: TCP:1521
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:
Name: LISTENER2
Type: Database Listener
Network: 2, Owner: grid
Home: <CRS home>
End points: TCP:1522
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:

 
6. Add SCAN on network number 2 - as ROOT user
 
[root@saigon-01 bin]# ./srvctl add scan -scanname saigon-scan2 -netnum 2
[root@saigon-01 bin]# ./srvctl config scan -all

SCAN name: saigon-scan, Network: 1
Subnet IPv4: 192.168.56.0/255.255.255.0/enp0s3, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.56.55
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.56.66
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.56.77
SCAN VIP is enabled.
SCAN name: saigon-scan2, Network: 2
Subnet IPv4: 192.168.44.0/255.255.255.0/enp0s9, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.44.55
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.44.66
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.44.77
SCAN VIP is enabled.

 
7. START node VIPs - as ROOT user
 
[root@saigon-01 bin]# ./srvctl start vip -vip saigon-01-vip2
[root@saigon-01 bin]# ./srvctl start vip -vip saigon-02-vip2

 
8. START new listener on network number 2 - as GRID user
 
[grid@saigon-01 ~]$ srvctl start listener -listener LISTENER2
[grid@saigon-01 ~]$ srvctl status listener -listener LISTENER2

Listener LISTENER2 is enabled
Listener LISTENER2 is running on node(s): saigon-01,saigon-02
 
9. START SCAN on network number 2 - as ROOT user
 
[root@saigon-01 bin]# ./srvctl start scan -netnum 2
 
[grid@saigon-01 ~]$ srvctl config scan -netnum 2
SCAN name: saigon-scan2, Network: 2
Subnet IPv4: 192.168.44.0/255.255.255.0/enp0s9, static
Subnet IPv6:
SCAN 1 IPv4 VIP: 192.168.44.55
SCAN VIP is enabled.
SCAN 2 IPv4 VIP: 192.168.44.66
SCAN VIP is enabled.
SCAN 3 IPv4 VIP: 192.168.44.77
SCAN VIP is enabled.
 
10. Add and start a new SCAN listener on network 2 - as GRID user
 
[grid@saigon-01 ~]$ srvctl add scan_listener -netnum 2 -listener LISTENER2 -endpoints "TCP:1522"
[grid@saigon-01 ~]$ srvctl start scan_listener -netnum 2


[grid@saigon-01 ~]$ srvctl status scan -netnum 2
SCAN VIP scan1_net2 is enabled
SCAN VIP scan1_net2 is running on node saigon-02
SCAN VIP scan2_net2 is enabled
SCAN VIP scan2_net2 is running on node saigon-01
SCAN VIP scan3_net2 is enabled
SCAN VIP scan3_net2 is running on node saigon-02
 
11. Check configuration and status for SCAN
 
[grid@saigon-01 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details      
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.LISTENER.lsnr
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE
ora.LISTENER2.lsnr
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE

ora.chad
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE
ora.net1.network
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE
ora.net2.network
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE

ora.ons
               ONLINE  ONLINE       saigon-01                STABLE
               ONLINE  ONLINE       saigon-02                STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                STABLE
      2        ONLINE  ONLINE       saigon-02                STABLE
ora.DATA.dg(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                STABLE
      2        ONLINE  ONLINE       saigon-02                STABLE
ora.LISTENER2_SCAN1_NET2.lsnr
      1        ONLINE  ONLINE       saigon-02                STABLE
ora.LISTENER2_SCAN2_NET2.lsnr
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.LISTENER2_SCAN3_NET2.lsnr
      1        ONLINE  ONLINE       saigon-02                STABLE

ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       saigon-02                STABLE
ora.OCR.dg(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                STABLE
      2        ONLINE  ONLINE       saigon-02                STABLE
ora.RECO.dg(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                STABLE
      2        ONLINE  ONLINE       saigon-02                STABLE
ora.asm(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                Started,STABLE
      2        ONLINE  ONLINE       saigon-02                Started,STABLE
ora.asmnet1.asmnetwork(ora.asmgroup)
      1        ONLINE  ONLINE       saigon-01                STABLE
      2        ONLINE  ONLINE       saigon-02                STABLE
ora.cdp1.cdp
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.cdp2.cdp
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.cdp3.cdp
      1        ONLINE  ONLINE       saigon-02                STABLE
ora.cvu
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.qosmserver
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.saigon-01.vip
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.saigon-01_2.vip
      1        ONLINE  ONLINE       saigon-01                STABLE

ora.saigon-02.vip
      1        ONLINE  ONLINE       saigon-02                STABLE
ora.saigon-02_2.vip
      1        ONLINE  ONLINE       saigon-02                STABLE

ora.saigon.binhthanh.pdb
      1        ONLINE  ONLINE       saigon-02                STABLE
      3        ONLINE  ONLINE       saigon-01                STABLE
ora.saigon.db
      1        ONLINE  ONLINE       saigon-01                Open,HOME=/u01/app/o
                                                                                            racle/product/21.0.0
                                                                                            /db_1,STABLE
      2        ONLINE  ONLINE       saigon-02                Open,HOME=/u01/app/o
                                                                                            racle/product/21.0.0
                                                                                            /db_1,STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.scan1_net2.vip
      1        ONLINE  ONLINE       saigon-02                STABLE

ora.scan2.vip
      1        ONLINE  ONLINE       saigon-01                STABLE
ora.scan2_net2.vip
      1        ONLINE  ONLINE       saigon-01                STABLE

ora.scan3.vip
      1        ONLINE  ONLINE       saigon-02                STABLE
ora.scan3_net2.vip
      1        ONLINE  ONLINE       saigon-02                STABLE

--------------------------------------------------------------------------------

Ref: