In this Post we are going to learn how to the change public IP's of RAC infrastructure . We will be changing the Public IP's when we are physically moving the RAC servers from one datacenter to another data center where will get new set of IP's assigned to the servers to plug in to new data center .we are required to add the new subnet of the public network before unplugging the server from current datacenter .
Get nodeapps configuration
From the above output we can see that we have two public interfaces eth1 and eth2 . We can delete the old subnet after successful addition of the new subnet .
Now its time to modify the VIP's associated with the public network . From the below output we can observe that the VIP are still old VIP's
[root@rac1 bin]#
./srvctl stop database -d cdbrac
We need to stop the VIP's using force option .
Update the /etc/hosts file withe the new set of Public IP's ,VIP's . I have commented all the previous IP's and added new IP's for Public and VIP .
To know the current subnet of the public network use the
below commands .
[root@rac1 bin]#
./oifcfg getif
eth1 192.168.56.0
global public
eth3 172.16.10.0
global cluster_interconnect,asm
[root@rac1 bin]#
[root@rac1 bin]#
./srvctl config nodeapps -a
Network 1 exists
Subnet IPv4:
192.168.56.0/255.255.255.0/eth1, 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 rac1
VIP Name:
rac1-vip.localdomain
VIP IPv4 Address:
192.168.56.91
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 rac2
VIP Name:
rac2-vip.localdomain
VIP IPv4 Address:
192.168.56.92
VIP IPv6 Address:
VIP is enabled.
VIP is individually
enabled on nodes:
VIP is individually
disabled on nodes:
Modify the subnet of public network to new subnet . Here we are updating the subnet of public
network from 192.168.56.0 to 10.15.20.0
and also changing the network interface to eth2 from eth1 .
NOTE : Below command should be run from any one node
[root@rac1 bin]#
./oifcfg setif -global eth2/10.15.20.0:public
[root@rac1 bin]#
./oifcfg getif
eth1 192.168.56.0
global public
eth3 172.16.10.0
global cluster_interconnect,asm
eth2 10.15.20.0
global public
From the above output we can see that we have two public interfaces eth1 and eth2 . We can delete the old subnet after successful addition of the new subnet .
[root@rac1 bin]#
./oifcfg delif -global eth1
[root@rac1 bin]#
./oifcfg getif
eth3 172.16.10.0
global cluster_interconnect,asm
eth2 10.15.20.0
global public
Now its time to modify the VIP's associated with the public network . From the below output we can observe that the VIP are still old VIP's
[root@rac1 bin]#
./srvctl config nodeapps -a
Network 1 exists
Subnet IPv4:
192.168.56.0/255.255.255.0/eth1, 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 rac1
VIP Name:
rac1-vip.localdomain
VIP IPv4 Address:
192.168.56.91
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 rac2
VIP Name: rac2-vip.localdomain
VIP IPv4 Address:
192.168.56.92
VIP IPv6 Address:
VIP is enabled.
VIP is individually
enabled on nodes:
VIP is individually
disabled on nodes:
[root@rac1 bin]#
./srvctl status vip -n rac1
VIP 192.168.56.91 is
enabled
VIP 192.168.56.91 is
running on node: rac1
[root@rac1 bin]#
./srvctl status vip -n rac2
VIP 192.168.56.92 is
enabled
VIP 192.168.56.92 is
running on node: rac2
We need to stop the VIP's using force option .
[root@rac1 bin]#
./srvctl stop vip -n rac1
PRCR-1065 : Failed
to stop resource ora.rac1.vip
CRS-2974: unable to
act on resource 'ora.rac1.vip' on server 'rac1' because that would require
stopping or relocating resource 'ora.LISTENER.lsnr' but the -force option was
not specified
[root@rac1 bin]#
./srvctl stop vip -n rac1 –f
[root@rac1 bin]#
./srvctl status vip -n rac1
VIP 192.168.56.91 is
enabled
VIP 192.168.56.91 is
not running
[root@rac1 bin]#
[root@rac1 bin]#
./srvctl stop vip -n rac2 -f
[root@rac1 bin]#
[root@rac1 bin]# ./srvctl
status vip -n rac2
VIP 192.168.56.92 is
enabled
VIP 192.168.56.92 is
not running
[root@rac1 bin]#
Update the /etc/hosts file withe the new set of Public IP's ,VIP's . I have commented all the previous IP's and added new IP's for Public and VIP .
[root@rac1 bin]# cat
/etc/hosts
127.0.0.1 localhost.localdomain localhost.localdomain rac1
localhost
::1 localhost.localdomain localhost.localdomain localhost6 localhost6.localdomain6 localhost rac1
#hosts public
#192.168.56.161
rac1.localdomain rac1
#192.168.56.162
rac2.localdomain rac2
#192.168.56.163
rac3.localdomain rac3
10.15.20.10
rac1.localdomain rac1
10.15.20.11
rac2.localdomain rac2
#hosts public vip
#192.168.56.91
rac1-vip.localdomain rac1-vip
#192.168.56.92
rac2-vip.localdomain rac2-vip
#192.168.56.93
rac3-vip.localdomain rac3-vip
10.15.20.20
rac1-vip.localdomain rac1-vip
10.15.20.21
rac2-vip.localdomain rac2-vip
#hosts private
192.168.10.103
rac1-priv.localdomain rac1-priv
192.168.10.102
rac2-priv.localdomain rac2-priv
#192.168.10.103
rac3-priv.localdomain rac3-priv
Update VIP's .
[root@rac1 bin]#
./srvctl modify nodeapps -n rac1 -A rac1-vip/255.255.255.0/eth2
[root@rac1 bin]#
./srvctl modify nodeapps -n rac2 -A rac2-vip/255.255.255.0/eth2
[root@rac1 bin]#
[root@rac1 bin]#
./srvctl config nodeapps
Network 1 exists
Subnet IPv4:
10.15.20.0/255.255.255.0/eth2, 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 rac1
VIP Name:
rac1-vip.localdomain
VIP IPv4 Address:
10.15.20.20
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 rac2
VIP Name:
rac2-vip.localdomain
VIP IPv4 Address:
10.15.20.21
VIP IPv6 Address:
VIP is enabled.
VIP is individually
enabled on nodes:
VIP is individually
disabled on nodes:
ONS exists: Local
port 6100, remote port 6200, EM port 2016, Uses SSL true
ONS is enabled
ONS is individually
enabled on nodes:
ONS is individually
disabled on nodes:
[root@rac1 bin]#
[root@rac1 bin]#
./srvctl config network
Network 1 exists
Subnet IPv4:
10.15.20.0/255.255.255.0/eth2, static
Subnet IPv6:
Ping Targets:
Network is enabled
Network is
individually enabled on nodes:
Network is
individually disabled on nodes:
[root@rac1 bin]#
[root@rac1 bin]#
./srvctl start vip -n rac1
[root@rac1 bin]#
./srvctl start vip -n rac2
[root@rac1 bin]#
./srvctl status vip -n rac1
VIP 10.15.20.20 is
enabled
VIP 10.15.20.20 is
running on node: rac1
[root@rac1 bin]#
./srvctl status vip -n rac2
VIP 10.15.20.21 is
enabled
VIP 10.15.20.21 is
running on node: rac2
[root@rac1 bin]#
[oracle@rac1 bin]$ ./srvctl config scan
SCAN name: rac-scan,
Network: 1
Subnet IPv4:
10.15.20.0/255.255.255.0/eth2, static
Subnet IPv6:
SCAN 1 IPv4 VIP:
192.168.56.95
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 2 IPv4 VIP:
192.168.56.96
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 3 IPv4 VIP:
192.168.56.94
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
[oracle@rac1 bin]$
nslookup rac-scan
Server: 192.168.56.160
Address: 192.168.56.160#53
Name: rac-scan.localdomain
Address: 10.15.20.30
Name: rac-scan.localdomain
Address: 10.15.20.31
Name: rac-scan.localdomain
Address: 10.15.20.32
[oracle@rac1 bin]$ ./srvctl stop scan_listener
[oracle@rac1 bin]$
./srvctl stop scan
[root@rac1 bin]# ./srvctl modify scan -n
rac-scan
[root@rac1 bin]#
./srvctl config scan
SCAN name: rac-scan,
Network: 1
Subnet IPv4:
10.15.20.0/255.255.255.0/eth2, static
Subnet IPv6:
SCAN 1 IPv4 VIP:
10.15.20.30
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 2 IPv4 VIP:
10.15.20.31
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 3 IPv4 VIP:
10.15.20.32
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
[root@rac1 bin]#
./srvctl start scan
[root@rac1 bin]#
./srvctl start scan_listener
[root@rac1 bin]#
./srvctl status scan
SCAN VIP scan1 is
enabled
SCAN VIP scan1 is
running on node rac2
SCAN VIP scan2 is
enabled
SCAN VIP scan2 is
running on node rac1
SCAN VIP scan3 is
enabled
SCAN VIP scan3 is
running on node rac1
[root@rac1 bin]#
./srvctl status scan_listener
SCAN Listener
LISTENER_SCAN1 is enabled
SCAN listener
LISTENER_SCAN1 is running on node rac2
SCAN Listener
LISTENER_SCAN2 is enabled
SCAN listener
LISTENER_SCAN2 is running on node rac1
SCAN Listener
LISTENER_SCAN3 is enabled
SCAN listener
LISTENER_SCAN3 is running on node rac1
[root@rac1 bin]# ./srvctl config scan
SCAN name: rac-scan,
Network: 1
Subnet IPv4:
10.15.20.0/255.255.255.0/eth2, static
Subnet IPv6:
SCAN 1 IPv4 VIP:
10.15.20.30
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 2 IPv4 VIP:
10.15.20.31
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
SCAN 3 IPv4 VIP:
10.15.20.32
SCAN VIP is enabled.
SCAN VIP is
individually enabled on nodes:
SCAN VIP is
individually disabled on nodes:
[root@rac1 bin]#
./srvctl config scan_listener
SCAN Listener
LISTENER_SCAN1 exists. Port: TCP:1521
Registration invited
nodes:
Registration invited
subnets:
SCAN Listener is
enabled.
SCAN Listener is
individually enabled on nodes:
SCAN Listener is
individually disabled on nodes:
SCAN Listener
LISTENER_SCAN2 exists. Port: TCP:1521
Registration invited
nodes:
Registration invited
subnets:
SCAN Listener is
enabled.
SCAN Listener is
individually enabled on nodes:
SCAN Listener is
individually disabled on nodes:
SCAN Listener LISTENER_SCAN3
exists. Port: TCP:1521
Registration invited
nodes:
Registration invited
subnets:
SCAN Listener is
enabled.
SCAN Listener is
individually enabled on nodes:
SCAN Listener is
individually disabled on nodes:
[root@rac1 bin]#
[root@rac1 bin]# ifconfig
-a
eth1 Link encap:Ethernet HWaddr 08:00:27:44:E1:5E
inet addr:192.168.56.161 Bcast:192.168.56.255 Mask:255.255.255.0
inet6 addr:
fe80::a00:27ff:fe44:e15e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:3087 errors:0 dropped:0
overruns:0 frame:0
TX packets:1808 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:393393 (384.1 KiB) TX bytes:328476 (320.7 KiB)
eth2 Link encap:Ethernet HWaddr 08:00:27:DC:F8:FA
inet addr:10.15.20.10 Bcast:10.15.20.255 Mask:255.255.255.0
inet6 addr:
fe80::a00:27ff:fedc:f8fa/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:184704 errors:0 dropped:0
overruns:0 frame:0
TX packets:18935 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:173274128 (165.2 MiB) TX bytes:13294408 (12.6 MiB)
eth2:1 Link encap:Ethernet HWaddr 08:00:27:DC:F8:FA
inet addr:10.15.20.31 Bcast:10.15.20.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
eth2:2 Link encap:Ethernet HWaddr 08:00:27:DC:F8:FA
inet addr:10.15.20.32 Bcast:10.15.20.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
eth2:4 Link encap:Ethernet HWaddr 08:00:27:DC:F8:FA
inet addr:10.15.20.20 Bcast:10.15.20.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
eth3 Link encap:Ethernet HWaddr 08:00:27:C6:F8:07
inet addr:172.16.10.11 Bcast:172.16.10.255 Mask:255.255.255.0
inet6 addr:
fe80::a00:27ff:fec6:f807/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:26229 errors:0 dropped:0
overruns:0 frame:0
TX packets:128376 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:9733384 (9.2 MiB) TX bytes:74556747 (71.1 MiB)
eth3:1 Link encap:Ethernet HWaddr 08:00:27:C6:F8:07
inet addr:169.254.93.115 Bcast:169.254.255.255 Mask:255.255.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
eth4 Link encap:Ethernet HWaddr 08:00:27:6D:AD:3B
inet6 addr:
fe80::a00:27ff:fe6d:ad3b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500
Metric:1
RX packets:130102 errors:0 dropped:0
overruns:0 frame:0
TX packets:232 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:74811309 (71.3 MiB) TX bytes:71754 (70.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436
Metric:1
RX packets:138478 errors:0 dropped:0
overruns:0 frame:0
TX packets:138478 errors:0 dropped:0
overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:139356639 (132.9 MiB) TX bytes:139356639 (132.9 MiB)
[root@rac1 bin]#
No comments:
Post a Comment