Merhabalar,
bu makalede Oracle Exadata üzerindeki IB (private) ip adreslerinin tamamının değişim prosedürünü paylaşacağım. Defaultta 192.168.10.x networkünde bulunan infiniband ip adreslerini 192.168.20.x networküne alacağız.
Bu işlemi bir müşterimizde Exadata X7-2 (8 compute, 12 cell) üzerinde gerçekleştirdik. Prosedürün çok fazla adımı olduğu için biraz uzun sürecektir. Full Exadata için toplam 3 saat gibi bir sürede işlemi tamamlayabildik. Bu sürenin nerdeyse tamamı kesinti süresi diyebiliriz.
ocrconfig -showbackup
cp $Grid_home/gpnp/hostname/profiles/peer/profile.xml /tmp/org_profile.xml
SQL> SELECT inst_id, name,value FROM gv$parameter WHERE name = 'cluster_interconnects' order by 1;
INST_ID NAME
---------- -------------------------------
1 cluster_interconnects 192.168.10.1:192.168.10.2
2 cluster_interconnects 192.168.10.3:192.168.10.4
3 cluster_interconnects 192.168.10.5:192.168.10.6
4 cluster_interconnects 192.168.10.7:192.168.10.8
5 cluster_interconnects 192.168.10.9:192.168.10.10
6 cluster_interconnects 192.168.10.11:192.168.10.12
7 cluster_interconnects 192.168.10.13:192.168.10.14
8 cluster_interconnects 192.168.10.15:192.168.10.16
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.1:192.168.20.2' SCOPE=SPFILE SID='+ASM1';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.3:192.168.20.4' SCOPE=SPFILE SID='+ASM2';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.5:192.168.20.6' SCOPE=SPFILE SID='+ASM3';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.7:192.168.20.8' SCOPE=SPFILE SID='+ASM4';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.9:192.168.20.10' SCOPE=SPFILE SID='+ASM5';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.11:192.168.20.12' SCOPE=SPFILE SID='+ASM6';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.13:192.168.20.14' SCOPE=SPFILE SID='+ASM7';
ALTER SYSTEM SET CLUSTER_INTERCONNECTS='192.168.20.15:192.168.20.16' SCOPE=SPFILE SID='+ASM8';
srvctl stop home -o /u01/app18c -s /tmp/exadb01_dbhome -n exadb01
srvctl stop home -o /u01/app18c -s /tmp/exadb02_dbhome -n exadb02
srvctl stop home -o /u01/app18c -s /tmp/exadb03_dbhome -n exadb03
srvctl stop home -o /u01/app18c -s /tmp/exadb04_dbhome -n exadb04
srvctl stop home -o /u01/app18c -s /tmp/exadb05_dbhome -n exadb05
srvctl stop home -o /u01/app18c -s /tmp/exadb06_dbhome -n exadb06
srvctl stop home -o /u01/app18c -s /tmp/exadb07_dbhome -n exadb07
srvctl stop home -o /u01/app18c -s /tmp/exadb08_dbhome -n exadb08
srvctl status database -d EXA
Mevcut durum;
[grid@exadb01 ~]$ oifcfg iflist
eth0 10.87.0.0
eth2 10.162.142.0
ib0 192.168.8.0
ib1 192.168.8.0
bondeth0 10.86.112.0
[grid@exadb01 ~]$ oifcfg iflist -p -n
eth0 10.87.0.0 PRIVATE 255.255.252.0
eth2 10.162.142.0 PRIVATE 255.255.255.0
ib0 192.168.8.0 PRIVATE 255.255.252.0
ib1 192.168.8.0 PRIVATE 255.255.252.0
bondeth0 10.86.112.0 PRIVATE 255.255.255.0
[grid@exadb01 ~]$ oifcfg getif
bondeth0 10.86.112.0 global public
ib0 192.168.8.0 global cluster_interconnect,asm
ib1 192.168.8.0 global cluster_interconnect,asm
Değişiklik yapılır;
oifcfg setif -global ib0/192.168.20.0:cluster_interconnect,asm
oifcfg setif -global ib1/192.168.20.0:cluster_interconnect,asm
Kontrol edilir;
[grid@exadb01 ~]$ oifcfg getif
bondeth0 10.86.112.0 global public
ib0 192.168.8.0 global cluster_interconnect,asm
ib1 192.168.8.0 global cluster_interconnect,asm
ib0 192.168.20.0 global cluster_interconnect,asm
ib1 192.168.20.0 global cluster_interconnect,asm
[oracle@db01 ~]$ srvctl config listener -asmlistener
Name: ASMNETLSNR_ASM
Type: ASM Listener
Owner: oracle
Subnet: 192.168.8.0 <------ old network range
Home:
End points: TCP:1527
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:
srvctl add listener -asmlistener -l ASMNEWLSNR_ASM -subnet 192.168.20.0
srvctl update listener -listener ASMNETLSNR_ASM -asm -remove -force
[oracle@db01 ~]$ srvctl config listener -asmlistener
Name:ASMNEWLSNR_ASM
Type: ASM Listener
Owner: oracle
Subnet: 192.168.20.0 <------ new network range
Home:
End points: TCP:1527
Listener is enabled.
Listener is individually enabled on nodes:
Listener is individually disabled on nodes:
dcli -l root -g dbs_group "/u01/grid/bin/crsctl stop crs -f"
dcli -l root -g dbs_group "/u01/grid/bin/crsctl disable crs"
cellcli -e alter cell shutdown services all
ipconf
select interface adımında ib0 seçilir ve ib0 yeni ip adresi yazılır.
tekrar interface adımında bu sefer ib1 seçilir ve yeni ip adresi yazılır
shutdown -r now
cellcli -e alter cell restart services all
dcli -l root -g cellgroup "cellcli -e list cell detail | grep ipaddress"
[root@exadb01 ~]# dcli -l root -g cell_group "cellcli -e list cell detail | grep ipaddress"
exacel01: ipaddress1: 192.168.20.17/22
exacel01: ipaddress2: 192.168.20.18/22
exacel02: ipaddress1: 192.168.20.19/22
exacel02: ipaddress2: 192.168.20.20/22
exacel03: ipaddress1: 192.168.20.21/22
exacel03: ipaddress2: 192.168.20.22/22
exacel04: ipaddress1: 192.168.20.23/22
exacel04: ipaddress2: 192.168.20.24/22
exacel05: ipaddress1: 192.168.20.25/22
exacel05: ipaddress2: 192.168.20.26/22
exacel06: ipaddress1: 192.168.20.27/22
exacel06: ipaddress2: 192.168.20.28/22
exacel07: ipaddress1: 192.168.20.29/22
exacel07: ipaddress2: 192.168.20.30/22
exacel08: ipaddress1: 192.168.20.31/22
exacel08: ipaddress2: 192.168.20.32/22
exacel09: ipaddress1: 192.168.20.33/22
exacel09: ipaddress2: 192.168.20.34/22
exacel10: ipaddress1: 192.168.20.35/22
exacel10: ipaddress2: 192.168.20.36/22
exacel11: ipaddress1: 192.168.20.37/22
exacel11: ipaddress2: 192.168.20.38/22
exacel12: ipaddress1: 192.168.20.39/22
exacel12: ipaddress2: 192.168.20.40/22
Mecvut durum;
[root@exadb01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ib0
#### DO NOT REMOVE THESE LINES ####
#### %GENERATED BY CELL% ####
DEVICE=ib0
BOOTPROTO=none
ONBOOT=yes
HOTPLUG=no
MTU=65520
CONNECTED_MODE=yes
IPV6INIT=no
IPADDR=192.168.10.1
NETMASK=255.255.252.0
NETWORK=192.168.8.0
BROADCAST=192.168.11.255
[root@exadb01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ib1
#### DO NOT REMOVE THESE LINES ####
#### %GENERATED BY CELL% ####
DEVICE=ib0
BOOTPROTO=none
ONBOOT=yes
HOTPLUG=no
MTU=65520
CONNECTED_MODE=yes
IPV6INIT=no
IPADDR=192.168.10.1
NETMASK=255.255.252.0
NETWORK=192.168.8.0
BROADCAST=192.168.11.255
Değişim sonrası;
[root@exadb01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ib0
#### DO NOT REMOVE THESE LINES ####
#### %GENERATED BY CELL% ####
DEVICE=ib0
BOOTPROTO=none
ONBOOT=yes
HOTPLUG=no
MTU=65520
CONNECTED_MODE=yes
IPV6INIT=no
IPADDR=192.168.20.1
NETMASK=255.255.252.0
NETWORK=192.168.20.0
BROADCAST=192.168.23.255
[root@exadb01 ~]# cat /etc/sysconfig/network-scripts/ifcfg-ib1
#### DO NOT REMOVE THESE LINES ####
#### %GENERATED BY CELL% ####
DEVICE=ib1
BOOTPROTO=none
ONBOOT=yes
HOTPLUG=no
MTU=65520
CONNECTED_MODE=yes
IPV6INIT=no
IPADDR=192.168.20.2
NETMASK=255.255.252.0
NETWORK=192.168.20.0
BROADCAST=192.168.23.255
shutdown -r now
ip a
- Önce backup alınır;
dcli -l root -g dbs_group "cp /etc/oracle/cell/network-config/cellinit.ora /tmp/org_cellinit.ora"
dcli -l root -g dbs_group "cp /etc/oracle/cell/network-config/cellip.ora /tmp/org_cellip.ora"
- cellip.ora değiştirilir.
cd /etc/oracle/cell/network-config
Not: cellip.ora dosyası tüm node'larda aynı olacak. aşağıdaki ip'ler girilir.
cell="192.168.20.17;192.168.20.18"
cell="192.168.20.19;192.168.20.20"
cell="192.168.20.21;192.168.20.22"
cell="192.168.20.23;192.168.20.24"
cell="192.168.20.25;192.168.20.26"
cell="192.168.20.27;192.168.20.28"
cell="192.168.20.29;192.168.20.30"
cell="192.168.20.31;192.168.20.32"
cell="192.168.20.33;192.168.20.34"
cell="192.168.20.35;192.168.20.36"
cell="192.168.20.37;192.168.20.38"
cell="192.168.20.39;192.168.20.40"
- cellinit.ora'da ise her compute node'un local IB ipsi yazılıyor.
ipaddress2="192.168.20.2/22"
ipaddress1="192.168.20.1/22"
- cellinit.ora dosyası değiştirildikten sonra dbmcli ile dbserver alter edilir.
Not: syntax mutlaka aşağıdaki gibi olmalı. Oracle guide'da yanlış syntax kullanılmış.
dbmcli -e alter dbserver interconnect1 = "ib0", interconnect2 = "ib1"
dcli -l root -g dbs_group "cp /etc/hosts /tmp/org_hosts"
192.168.20.1 exadb01-priv1.customer.local exadb01-priv1
192.168.20.2 exadb01-priv2.customer.local exadb01-priv2
192.168.20.3 exadb02-priv1.customer.local exadb02-priv1
192.168.20.4 exadb02-priv2.customer.local exadb02-priv2
192.168.20.5 exadb03-priv1.customer.local exadb03-priv1
192.168.20.6 exadb03-priv2.customer.local exadb03-priv2
192.168.20.7 exadb04-priv1.customer.local exadb04-priv1
192.168.20.8 exadb04-priv2.customer.local exadb04-priv2
192.168.20.9 exadb05-priv1.customer.local exadb05-priv1
192.168.20.10 exadb05-priv2.customer.local exadb05-priv2
192.168.20.11 exadb06-priv1.customer.local exadb06-priv1
192.168.20.12 exadb06-priv2.customer.local exadb06-priv2
192.168.20.13 exadb07-priv1.customer.local exadb07-priv1
192.168.20.14 exadb07-priv2.customer.local exadb07-priv2
192.168.20.15 exadb08-priv1.customer.local exadb08-priv1
192.168.20.16 exadb08-priv2.customer.local exadb08-priv2
192.168.20.17 exacel01-priv1.customer.local exacel01-priv1
192.168.20.18 exacel01-priv2.customer.local exacel01-priv2
192.168.20.19 exacel02-priv1.customer.local exacel02-priv1
192.168.20.20 exacel02-priv2.customer.local exacel02-priv2
192.168.20.21 exacel03-priv1.customer.local exacel03-priv1
192.168.20.22 exacel03-priv2.customer.local exacel03-priv2
192.168.20.23 exacel04-priv1.customer.local exacel04-priv1
192.168.20.24 exacel04-priv2.customer.local exacel04-priv2
192.168.20.25 exacel05-priv1.customer.local exacel05-priv1
192.168.20.26 exacel05-priv2.customer.local exacel05-priv2
192.168.20.27 exacel06-priv1.customer.local exacel06-priv1
192.168.20.28 exacel06-priv2.customer.local exacel06-priv2
192.168.20.29 exacel07-priv1.customer.local exacel07-priv1
192.168.20.30 exacel07-priv2.customer.local exacel07-priv2
192.168.20.31 exacel08-priv1.customer.local exacel08-priv1
192.168.20.32 exacel08-priv2.customer.local exacel08-priv2
192.168.20.33 exacel09-priv1.customer.local exacel09-priv1
192.168.20.34 exacel09-priv2.customer.local exacel09-priv2
192.168.20.35 exacel10-priv1.customer.local exacel10-priv1
192.168.20.36 exacel10-priv2.customer.local exacel10-priv2
192.168.20.37 exacel11-priv1.customer.local exacel11-priv1
192.168.20.38 exacel11-priv2.customer.local exacel11-priv2
192.168.20.39 exacel12-priv1.customer.local exacel12-priv1
192.168.20.40 exacel12-priv2.customer.local exacel12-priv2
dcli -l root -g dbs_group "/u01/grid/bin/crsctl start crs"
dcli -l root -g dbs_group "$ORACLE_HOME/bin/skgxpinfo"
Not: çıktıda RDS görmemiz gerekli.
srvctl start home -o /u01/app18c -s /tmp/exadb01_dbhome -n exadb01
srvctl start home -o /u01/app18c -s /tmp/exadb02_dbhome -n exadb02
srvctl start home -o /u01/app18c -s /tmp/exadb03_dbhome -n exadb03
srvctl start home -o /u01/app18c -s /tmp/exadb04_dbhome -n exadb04
srvctl start home -o /u01/app18c -s /tmp/exadb05_dbhome -n exadb05
srvctl start home -o /u01/app18c -s /tmp/exadb06_dbhome -n exadb06
srvctl start home -o /u01/app18c -s /tmp/exadb07_dbhome -n exadb07
srvctl start home -o /u01/app18c -s /tmp/exadb08_dbhome -n exadb08
SQL> SELECT inst_id, name,value FROM gv$parameter WHERE name = 'cluster_interconnects' order by 1;
oifcfg delif -global ib0/192.168.8.0
oifcfg delif -global ib1/192.168.8.0
[grid@exadb01 ~]$ oifcfg getif
bondeth0 10.86.112.0 global public
ib0 192.168.20.0 global cluster_interconnect,asm
ib1 192.168.20.0 global cluster_interconnect,asm
dcli -l root -g dbs_group "/u01/grid/bin/crsctl enable crs"
Tüm adımların çok dikkatli yapılması gerekiyor. Eğer hata yapılmaz ise kolay bir prosedür diyebiliriz.
Umarım faydalı olur.