- 资讯首页 > 数据库 >
- Oracle RAC修改网络配置知识点汇总
Oracle RAC修改网络配置知识点汇总 发布时间:2021-08-23 14:56 来源:ITPUB博客 阅读:0 作者: 栏目: 数据库 欢迎投稿:712375056
本文参考:
How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1) How to Modify Private Network Information in Oracle Clusterware (文档 ID 283684.1) How to Modify SCAN Setting or SCAN Listener Port after Installation (文档 ID 972500.1) How to Update the IP Address of the SCAN VIP Resources (ora.scan{n}.vip) (文档 ID 952903.1)
场景一:修改public公共网卡对应主机名 场景二:仅更改public公共IP或VIP(而不更改接口、子网或网络掩码,或仅更改MAC地址而不更改任何其他内容) 场景三:更改public公共网络网卡、子网或网络掩码 场景四:更改VIP IP或hostname 场景五:更改SCAN VIP配置及端口 场景六:修改私有网卡主机名 场景七:仅更改私有IP(而不更改网络接口、子网和网络掩码或者只更改专用IP MAC地址而不更改其他任何内容) 场景八:仅更改私有网络MTU 场景九:更改私有网络接口名称、子网或网络掩码 场景十:使用HAIP为11gR2及以上版本添加或删除cluster_interconnect
场景一:修改公共网卡对应主机名
公共主机名记录在OCR中,在安装阶段输入,安装后很难对其进行修改。
修改公共主机名方法如下:
方法1:删除节点,然后使用新主机名重新添加节点,或者重新安装clusterware,或者按照克隆过程重新配置clusterware。
方法2:重新运行CRS的配置文件rootconfig,重新格式化OCR和Voting disk,然后重新创建CRS的资源。
方法2来自:https://blog.csdn.net/xujinyang/article/details/6833717
(1)关闭crs
crsctl stop crs
(2)修改主机名
hostnamectl set-hostname <newname>
(3)修改/etc/hosts和/etc/sysconfig/network等配置
(4)修改$ORA_CRS_HOME/install/rootconfig配置文件
当我们安装完Clusterware的时候,需要执行root.sh 脚本,该脚本就会调用$ORA_CRS_HOME/install/rootconfig。
当我们修改了hostname时,也必须修改这个脚本。
(5)清空OCR 和 Voting Disks
dd if=/dev/zero of=/dev/raw/raw1 bs=1M count=200 ---危险操作,谨慎执行
(6)删除配置信息
rootconfig 脚本会检查Clusterware 是否已经配置,如果已经配置,就不会执行,所以在执行rootconfig之前,我们要写删除这个配置信息。
在Linux 下,删除文件:/etc/oracle/ocr.loc,/etc/oracle/ocr.loc,
Unix下位置不一样,HP-Unix 是:/var/opt/oracle/ocr.log
(7)运行 $ORA_CRS_HOME/install/rootconfig
用root 用户分别在2个节点执行,一个节点一个节点顺序执行,不要同时执行,在最后一个节点执行时,会配置VIPs。
(8)验证Clusterware
[root@rac1 bin]# ./crs_stat -t
(9)添加Listener Resource到CRS
调用netca命令,会把监听的信息注册到OCR中。
(10)检查修改listener.ora 和 tnsnames.ora 文件
(11)添加其他资源到OCR
ASM
语法:srvctl add asm -n <node_name> -i <asm_instance_name> -o <oracle_home>
[oracle@racdb1 bin]$ srvctl add asm -n racdb1 -i ASM1 -o /u01/app/oracle/product/10.2.0/db_1
[oracle@racdb1 bin]$ srvctl add asm -n racdb2 -i ASM2 -o /u01/app/oracle/product/10.2.0/db_1
DATABASE
语法:srvctl add database -d <db_unique_name> -o <oracle_home>
[oracle@racdb1 bin]$ srvctl add database -d orcl -o /u01/app/oracle/product/10.2.0/db_1
INSTANCE
语法:srvctl add instance -d <db_unique_name> -i <instance_name> -n <node_name>
[oracle@racdb1 bin]$ srvctl add instance -d orcl -i orcl1 -n racdb1
[oracle@racdb1 bin]$ srvctl add instance -d orcl -i orcl2 -n racdb2
SERVICE
语法:srvctl add service -d <db_unique_name> -s <service_name> -r <preferred_list> -P <TAF_policy>
-r preferred_list 是首先使用的实例的列表,还可是用-a 表示备用实例
TAF_policy可设置为NONE,BASIC,PRECONNECT
[oracle@racdb1 bin]$ srvctl add service -d orcl -s oltp -r orcl1,orcl2 -P BASIC
场景二:仅更改公共IP或VIP(而不更改网卡名、子网或网络掩码,或仅更改MAC地址而不更改任何其他内容)
如果更改仅为公共IP或VIP地址,且新地址仍在同一子网、同一接口中,或者如果更改仅为公共IP MAC地址、IP/接口/子网/网络掩码均保持不变,则无需在clusterware层执行任何操作,所有更改都需要在OS层执行以反映更改。
1.停止CRS
crsctl stop crs
2.修改网络层的IP地址、DNS和/etc/hosts文件以反映更改或修改网络层的MAC地址
3.启动CRS
crsctl start crs
注意:上述更改可以滚动方式完成,例如:一次一个节点顺序执行。
场景三:更改公共网络网卡、子网或网络掩码
如果更改涉及不同的子网(网络掩码)或接口,请从OCR中删除现有接口信息,并使用正确的信息重新添加。
在此示例中,通过两个单独的命令将子网从10.2.156.0更改为10.2.166.0,首先执行"delif",然后执行"setif":
% $CRS_HOME/bin/oifcfg/oifcfg delif -global <if_name>[/<subnet>]
% $CRS_HOME/bin/oifcfg/oifcfg setif -global <if_name>/<subnet>:public
For example:
1.删除接口信息
% $CRS_HOME/bin/oifcfg delif -global eth0/10.X.156.0
2.添加接口ixnx
% $CRS_HOME/bin/oifcfg setif -global eth0/10.X.166.0:public
3.在操作系统层进行更改。
注意:
(1)除非操作系统更改需要重新启动节点,否则不需要重新启动Oracle clusterware。
(2)这可以通过滚动方式完成。
(3)对于11gR2,上述命令要求clusterware在所有节点上运行,否则将报告PRIF-33和PRIF-32,即:
Note: for 11gR2, above command requires clusterware RUNNING on ALL nodes, otherwise PRIF-33 and PRIF-32 will be reported, i.e.
[grid@racnode1 bin]$ ./oifcfg delif -global <if_name>/192.168.1.0
PRIF-33: Failed to set or delete interface because hosts could not be discovered
CRS-02307: No GPnP services on requested remote hosts.
PRIF-32: Error in checking for profile availability for host <nodename>2
CRS-02306: GPnP service on host "<nodename>2" not found.
场景四:更改VIP IP或hostname
修改VIP地址或VIP HOSTNAME
注意:
1.一般来说,只有在10.2.0.3版本之前的版本中才需要完全停机。
2.从10.2.0.3开始,ASM/数据库实例对VIP资源的依赖关系将被删除,因此可以在不必关闭ASM/数据库实例的情况下修改VIP,当VIP关闭时,只有到数据库的客户端连接将受到影响。
3.如果修改是特定于节点的,那么在更改期间,只有与该节点的连接才会受到影响。
收集当前VIP配置
1.收集现有设置
对于10g和11gR1,作为Oracle Clusterware所有者:
$ srvctl config nodeapps -n <nodename> -a
eg:
$ srvctl config nodeapps -n <nodename>1 -a
VIP exists.: /<nodename>1-vip/101.XX.XX.184/255.255.254.0/<if_name>
对于11gR2,作为Oracle Clusterware所有者:
$ srvctl config nodeapps -a
eg:
$ srvctl config nodeapps -a
Network exists: 1/101.17.80.0/255.255.254.0/<if_name>, type static
VIP exists: /racnode1-vip/101.17.XX.184/101.17.80.0/255.255.254.0/<if_name>, hosting node <nodename>1
VIP exists: /racnode2-vip/101.17.XX.186/101.17.80.0/255.255.254.0/<if_name>, hosting node <nodename>2
2.验证VIP状态
10.2 and 11.1:
$ crs_stat -t
11.2:
$ crsctl stat res -t
-它应该显示VIPs在线
$ ifconfig -a
(netstat -in for HP and ipconfig /all for Windows)
-VIP逻辑接口绑定到公共网络接口
停止资源
3.停止nodeapps资源(以及所有从属资源ASM/DB,仅在需要时):
10g and 11gR1, as Oracle Clusterware owner:
$ srvctl stop instance -d <db_name> -i <inst_name> (optional for 10.2.0.3+)
$ srvctl stop asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl stop nodeapps -n <node_name>
eg,
$ srvctl stop instance -d <DBNAME> -i <INSTANCENAME>
$ srvctl stop asm -n <nodename>1
$ srvctl stop nodeapps -n <nodename>1
11gR2, as Grid Infrastructure owner:
$ srvctl stop instance -d <db_name> -n <node_name> (optional)
$ srvctl stop vip -n <node_name> -f
eg,
$ srvctl stop instance -d <DBNAME> -n <nodename>1
$ srvctl stop vip -n <nodename>1 -f
注1:11gR2需要-f选项来停止侦听器资源,否则将发生以下错误:
Note 1: The -f option is required for 11gR2 to stop listener resource, otherwise following error will occur:
PRCR-1014 : Failed to stop resource ora.<nodename>1.vip
PRCR-1065 : Failed to stop resource ora.<nodename>1.vip
CRS-2529: Unable to act on 'ora.<nodename>1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
...
4.验证VIP现在处于脱机状态,并且该接口不再绑定到公共网络接口
$ crs_stat -t (or $ crsctl stat res -t for 11gR2)
$ ifconfig -a
(netstat -in for HP and ipconfig /all for windows)
修改VIP及其关联属性
5.确定新的VIP IP/子网/网络掩码或VIP主机名,首先在操作系统上更改网络,
确保新VIP已在DNS中注册或在/etc/hosts(对于Unix/Linux)和\WINDOWS\System32\drivers\etc\hosts文件(对于WINDOWS)中修改。
如果网络接口已更改,请确保新接口在服务器上可用,然后再继续修改。
For example:
New VIP is: 110.XX.XX.11 <nodename>1-nvip
new subnet is 110.11.70.0
new netmask is 255.255.255.0
new interface is <if_name>
6.以root用户身份修改VIP资源:
# srvctl modify nodeapps -n <node> -A <new_vip_address or new_vip_hostname>/<netmask>/<[if1[if2...]]>
eg:
# srvctl modify nodeapps -n <nodename>1 -A <nodename>1-nvip/255.255.255.0/<if_name>
注1:从11.2开始,VIP取决于网络资源(ora.net1.network),OCR仅记录VIP主机名或与VIP资源关联的IP地址。
网络属性(子网/网络掩码/接口)与网络资源一起记录。
修改nodeapps资源时,网络资源(ora.net1.network)属性也会隐式修改。
从11.2.0.2开始,如果只需要更改子网/网络掩码/接口,则可以通过srvctl modify网络命令直接修改网络资源。
From 11.2.0.2 onwards, if only subnet/netmask/interface change is required, network resource can be modified directly via srvctl modify network command.
as root user:
# srvctl modify network -k <network_number>] [-S <subnet>/<netmask>[/if1[|if2...]]
eg:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>
如果其他属性未更改,则无需修改VIP或SCAN。
注2:对于12.1.0.1版本,由于未发布的BUG 16608577-无法在ORACLE 12.1中添加第二个公共接口,srvctl modify网络命令失败,原因是:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>
PRCT-1305 : The specified interface name "<if_name>2" does not match the existing network interface name "<if_name>1"
解决方法是使用空接口名称修改网络资源,然后使用所需的接口名称再次修改它,例如:
Workaround is to modify network resource with an empty interface name, then modify it again with the desired interface name, eg:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>2
该错误已在12.1.0.2及更高版本中修复。
The bug has been fixed in 12.1.0.2 and above.
*11gR2仅修改VIP主机名而不更改IP地址的特殊情况。
* A special case for 11gR2 modifying the VIP hostname only without changing the IP address.
例如:只有VIP主机名从<nodename>1-VIP更改为<nodename>1-nvip,IP和其他属性保持不变。
For example: only VIP hostname changes from <nodename>1-vip to <nodename>1-nvip, IP and other attributes remain the same.
如果IP地址未更改,上述修改命令将不会更改“crsctl stat res ORA.<nodename>.VIP-p”输出中的USR_ORA_VIP值。
请使用以下命令:
# crsctl modify res ora.<nodename>.vip -attr USR_ORA_VIP=<nodename>1-nvip
验证USR_ORA_VIP字段的更改:
# crsctl stat res ora.<nodename>1.vip -p |grep USR_ORA_VIP
注意:对于Windows平台,如果中间有空格,则接口名称需要在引号(")中,例如:
作为管理员用户或软件安装用户:
> srvctl modify nodeapps -n <nodename> -A 110.XX.XX.11/255.255.255.0/"Local Area Connection 1"
7.验证更改
$ srvctl config nodeapps -n <node> -a (10g and 11gR1)
$ srvctl config nodeapps -a (11gR2)
eg:
$ srvctl config nodeapps -n <nodename>1 -a
VIP exists.: /<nodename>1-nvip/110.11.70.11/255.255.255.0/<if_name>2
重启资源
8.启动nodeapps和其他资源
10g and 11gR1, as Oracle Clusterware owner:
$ srvctl start nodeapps -n <node_name>
$ srvctl start asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl start instance -d <dbanme> -i <inst> (optional for 10.2.0.3+)
eg:
$ srvctl start nodeapps -n <nodename>1
$ srvctl start asm -n <nodename>1
$ srvctl start instance -d <DBNAME> -i <INSTANCENAME>1
11gR2, as Grid Infrastructure owner:
$ srvctl start vip -n <node_name>
$ srvctl start listener -n <node_name>
$ srvctl start instance -d <db_name> -n <node_name> (optional)
eg,
$ srvctl start vip -n <nodename>1
$ srvctl start listener -n <nodename>1
$ srvctl start instance -d <DBNAME> -n <nodename>1
注意:如果更改了网络属性,即更改了网络掩码,请重新启动nodeapps
9.验证新VIP是否在线并绑定到公共网络接口
$ crs_stat -t (or $ crsctl stat res -t for 11gR2)
$ ifconfig -a
(netstat -in for HP or ipconfig /all for windows)
10.仅当需要进行类似更改时,才对群集中的rest节点重复相同的步骤。
其他
11.如有必要,修改listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER参数以反映VIP更改。
注意,ASM和DB的LOCAL_LISTENER由Grid Infrastructure自动设置。
LOCAL_LISTENER中的VIP更改应自动生效。
由于Bug 22824602,在某些条件下,ASM实例的LOCAL_LISTENER可能无法反映VIP更改。
解决方法是在受影响的节点上重新启动Clusterware。
场景五:更改SCAN VIP配置及端口
在Grid Infrastructure 11gR2中,为客户端连接引入了SCAN和SACN VIP。要修改SCAN VIP,请参阅:
Note 952903.1 How to update the IP address of the SCAN VIP resources (ora.scan<n>.vip)
Note 972500.1 How to Modify SCAN Setting or SCAN Listener Port after Installation
在更改SCAN VIP之前,需要使用新的IP地址更新域名服务器(DNS)上的scan name条目。
这通常由网络管理员完成。要检查当前设置,可以使用以下命令:
nslookup <scan_name>
要检查SCAN VIP的当前IP地址,请以root用户身份运行以下命令:
$GRID_HOME/bin/srvctl config scan
停止SCAN listeners和SCAN
$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl stop scan
接下来使用DNS条目中的新IP地址刷新SCAN VIP:
$GRID_HOME/bin/srvctl modify scan -n <scan_name>
要检查SCAN VIP是否已更改,请运行以下命令,它现在应显示新的IP地址。
$GRID_HOME/bin/srvctl config scan
重新启动SCAN和SCAN listener
$GRID_HOME/bin/srvctl start scan
$GRID_HOME/bin/srvctl start scan_listener
如果SCAN VIPs的数量已更改,则需要更新SCAN listener:
$GRID_HOME/bin/srvctl modify scan_listener -u
下面是使用以下配置的示例:
1.SCAN的名称为sales-SCAN.example.com
2.公网子网为10.XXX.XXX.0
3.公网子网掩码为255.XXX.XXX.0
4.public接口名称为eth1
5.旧IP addresses: 10.XXX.XXX.81, 10.XXX.XXX.82 & 10.XXX.XXX.83
6.新IP addresses: 10.XXX.XXX.121, 10.XXX.XXX.122 & 10.XXX.XXX.123
停止和启动SCAN VIPs/listeners可以由grid用户完成,但是"srvctl modify SCAN"命令必须由root用户执行,因此作为root用户执行所有步骤是可行的。
DNS服务器上的SCAN查找显示条目已使用新IP地址更新:
$ nslookup sales-scan.example.com
Server: dns1.example.com
Address: 10.XXX.XXX.70#53
Name: sales-scan.example.com
Address: 10.XXX.XXX.123
Name: sales-scan.example.com
Address: 10.XXX.XXX.122
Name: sales-scan.example.com
Address: 10.XXX.XXX.121
停止SCAN listener 和 the SCAN VIP 资源:
# $GRID_HOME/bin/srvctl stop scan_listener
# $GRID_HOME/bin/srvctl stop scan
# $GRID_HOME/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
# $GRID_HOME/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
SCAN VIP resources仍然显示旧的地址
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.XXX.XXX.0/255.XXX.XXX.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.XXX.XXX.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.XXX.XXX.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.XXX.XXX.83
现在通知CRS更新SCAN VIP resources
# $GRID_HOME/bin/srvctl modify scan -n sales-scan.example.com
验证更改已成功,再次检查SCAN配置:
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.XXX.XXX.0/255.XXX.XXX.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.XXX.XXX.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.XXX.XXX.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.XXX.XXX.123
启动SCAN和SCAN监听:
# $GRID_HOME/bin/srvctl start scan
# $GRID_HOME/bin/srvctl start scan_listener
注意:如果需要回滚更改,请重复已运行的命令,用原始值替换新值以恢复原始配置。
B.修改SCAN监听端口
grid用户执行:
1.修改SCAN监听端口
$GRID_HOME/bin/srvctl modify scan_listener -p <new-SCAN-port>
更新11gR2数据库init.ora参数:
alter system set remote_listener='<SCAN-name>:<new-port-number>' scope=both;
2.重启SCAN listener,使得新端口生效
$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl start scan_listener
3.确认更改
$GRID_HOME/bin/srvctl config scan_listener
场景六:修改心跳网卡主机名
在11.2之前的Oracle Clusterware中,心跳主机名记录在OCR中,无法更新。通常,不需要更改心跳主机名。
更改私有主机名的唯一方法是删除/添加节点,或重新安装Oracle Clusterware。
在11.2 Grid Infrastructure中,心跳主机名不再记录在OCR中,并且不依赖于心跳主机名。
它可以在/etc/hosts中自由更改。
场景七:仅更改私有IP(而不更改网络接口、子网和网络掩码或者只更改专用IP MAC地址而不更改其他任何内容)
例如,私有IP从192.XXX.X.10更改为192.XXX.X.21,网络接口名称和子网保持不变,或者MAC地址更改,专用IP地址/接口名称/子网/网络都保持不变。
1.在需要更改的节点上关闭Oracle Clusterware堆栈。
crsctl stop crs
2.根据需要在操作系统层(例如:/etc/hosts、操作系统网络配置等)对私有网络进行IP或MAC修改。
3.重新启动Oracle Clusterware堆栈即可完成任务。
crsctl start crs
场景八:仅更改私有网络MTU
例如,私有网络MTU从1500更改为9000(启用巨型帧),网络接口名称和子网保持不变。
1.关闭所有节点上的Oracle Clusterware堆栈
crsctl stop crs
2.在操作系统网络层对MTU大小进行所需的网络更改,确保心跳网络具有所需的MTU大小,在所有群集节点上使用所需的MTU大小进行ping
3.在所有节点上重新启动Oracle Clusterware堆栈
crsctl start crs
场景九:更改私有网络接口名称、子网或网络掩码
注意:更改网络掩码,但子网ID不变时,例如:
网络掩码从255.255.0.0更改为255.255.255.0,心跳IP为192.168.0.x,子网ID与192.168.0.0相同,网络接口名称不变。
(1)在需要更改的所有群集节点上关闭Oracle Clusterware堆栈
(2)在操作系统层(例如:操作系统网络配置等)对心跳网络进行IP修改
(3)在所有节点上重新启动Oracle Clusterware堆栈将完成任务。
请注意,此更改不能以滚动方式进行。
更改网络掩码时,关联的子网ID通常会更改。
Oracle仅在OCR中存储网络接口名称和子网ID,而不是网络掩码。
Oifcfg命令可用于此类更改,Oifcfg命令只需要在集群节点的1个节点上运行,而不需要在所有节点上运行。
A.对于11gR2之前的Oracle Clusterware
1.使用oifcfg添加新的专用网络信息,删除旧的专用网络信息:
% $ORA_CRS_HOME/bin/oifcfg/oifcfg setif -global <if_name>/<subnet>:cluster_interconnect
% $ORA_CRS_HOME/bin/oifcfg/oifcfg delif -global <if_name>[/<subnet>]]
For example:
% $ORA_CRS_HOME/bin/oifcfg setif -global <interfacename>3/192.168.2.0:cluster_interconnect
% $ORA_CRS_HOME/bin/oifcfg delif -global <interfacename>1/192.168.1.0
验证更改
% $ORA_CRS_HOME/bin/oifcfg getif
eth0 10.X.XXX.0 global public
eth3 192.XXX.2.0 global cluster_interconnect
2.关闭Oracle Clusterware堆栈
As root user: # crsctl stop crs
3.在操作系统级别进行所需的网络更改,应在所有节点上修改/etc/hosts文件以反映更改。
确保新网络在所有群集节点上可用:
% ping <private hostname/IP>
% ifconfig -a on Unix/Linux
or
% ipconfig /all on windows
4.重启Oracle Clusterware堆栈
As root user: # crsctl start crs
注意:如果在Linux上运行OCFS2,可能还需要更改OCFS2用于与其他节点通信的心跳IP地址。
有关更多信息,请参阅Note 604958.1
B.适用于不带Flex ASM的11gR2 Oracle Clusterware和12c群集
从11.2 Grid Infrastructure,心跳网络配置不仅存储在OCR中,还存储在gpnp profile文件中。
如果心跳网络不可用或其定义不正确,CRSD过程将不会启动,OCR的任何后续更改将不可能进行。
因此,在修改心跳网络的配置时需要小心。
以正确的顺序执行更改非常重要。
还请注意,不支持手动修改gpnp profile文件。
在继续之前,请在所有群集节点上备份profile.xml,已grid用户执行:
$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk
1.确保Oracle Clusterware正在群集中的所有群集节点上运行
2.已grid用户执行:
获取现有信息。例如:
$ oifcfg getif
<interfacename>1 100.17.10.0 global public
<interfacename>0 192.168.0.0 global cluster_interconnect
添加新的cluster_interconnect信息:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect
For example:
A.添加具有相同子网的新接口bond0
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
B.添加具有相同接口名称但不同子网或新接口名称的新子网
$ oifcfg setif -global eth0/192.65.0.0:cluster_interconnect
or
$ oifcfg setif -global eth3/192.168.1.96:cluster_interconnect
1.即使接口还不可用,也可以使用-global选项完成此操作,但如果接口不可用,则无法使用-node选项完成此操作,这将导致节点逐出。
2.如果服务器上有接口,子网地址可以通过命令识别:
$ oifcfg iflist
它列出了网络接口及其子网地址。
即使Oracle Clusterware未运行,也可以运行此命令。
请注意,子网地址的格式可能不是x.y.z.0,它可以是x.y.z.24、x.y.z.64或x.y.z.128等。例如,
$ oifcfg iflist
lan1 18.1.2.0
lan2 10.2.3.64 << this is the private network subnet address associated with private network IP: 10.2.3.XX
3.如果是为了添加第二个专用网络,而不是替换现有的专用网络,请确保两个接口的MTU大小相同,否则实例启动会报告错误:
ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:if MTU failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: skgxpcini2
ORA-27303: additional information: requested interface lan1:801 has a different MTU (1500) than lan3:801 (9000), which is not supported. Check output from ifconfig command
4.对于11gR2及更高版本,不建议在ASM或数据库spfile或pfile中设置cluster_interconnects。
如果出于任何原因设置了此参数,则需要在clusterware关闭之前将其更改为spfile或pfile中的新私有IP,否则会由于互连不匹配而导致重新启动期间出现故障。
验证更改:
Verify the change:
$ oifcfg getif
3.关闭所有节点上的Oracle Clusterware并用root用户禁用Oracle Clusterware自动启动:
# crsctl stop crs
# crsctl disable crs
4.根据需要在操作系统级别更改网络配置,确保更改后所有节点都可以使用新接口。
$ ifconfig -a
$ ping <private hostname>
5.启用Oracle Clusterware自启动并以root用户身份在所有节点上重新启动Oracle Clusterware:
# crsctl enable crs
# crsctl start crs
6.如果需要,移除旧接口:
$ oifcfg delif -global <interfacename>[/<subnet>]
eg:
$ oifcfg delif -global eth0/192.168.0.0
C.适用于带Flex ASM的12c和18c Oracle Clusterware
C. For 12c and 18c Oracle Clusterware with Flex ASM
请复习以上B部分,注意备注部分,备份如下:
在继续之前,请在所有群集节点上备份profile.xml,已grid用户执行:
$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk
1.确保Oracle Clusterware正在群集中的所有群集节点上运行
获取现有信息。例如:
$ oifcfg getif
<interfacename>1 100.17.10.0 global public
<interfacename>0 192.168.0.0 global cluster_interconnect,asm
上面的示例显示网络eth0用于cluster_interconnect和ASM网络。
添加新的cluster_interconnect信息:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect[,asm]
For example:
A.添加具有相同子网的新接口bond0
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect,asm
B.添加具有相同接口名称但不同子网或新接口名称的新子网
$ oifcfg setif -global eth0/192.68.10.0:cluster_interconnect,asm
or
$ oifcfg setif -global eth3/192.168.1.96:cluster_interconnect,asm
如果心跳网络和ASM网络使用不同的网络,则相应地修改它们。
3.由于ASMLISTENER正在使用心跳网络,修改心跳网络将影响ASMLISTENER。
需要使用新的网络配置添加新的ASMLISTENER。
如果ASM网络的子网未更改,请跳过此步骤。
3.1. 使用新子网添加新的ASMLISTENER(例如:ASMNEWLSNR_ASM),已grid用户执行:
$ srvctl add listener -asmlistener -l <new ASM LISTENER NAME> -subnet <new subnet>
eg:
$ srvctl add listener -asmlistener -l ASMNEWLSNR_ASM -subnet 192.168.10.0
3.2. 删除现有的ASMLISTENER(本例中为ASMLSNR_ASM)并删除依赖项,已grid用户执行:
$ srvctl update listener -listener ASMLSNR_ASM -asm -remove -force
$ lsnrctl stop ASMLSNR_ASM
注意-force选项是必需的,否则将发生以下错误:
$ srvctl update listener -listener ASMLSNR_ASM -asm -remove
PRCR-1025 : Resource ora.ASMLSNR_ASM.lsnr is still running
$ srvctl stop listener -l ASMLSNR_ASM
PRCR-1065 : Failed to stop resource ora.ASMLSNR_ASM.lsnr
CRS-2529: Unable to act on 'ora.ASMLSNR_ASM.lsnr' because that would require stopping or relocating 'ora.asm', but the force option was not specified
3.3 验证配置
$ srvctl config listener -asmlistener
$ srvctl config asm
4.所有节点停止Oracle Clusterware并禁用自动启动,已root用户执行:
# crsctl stop crs
# crsctl disable crs
5.根据需要在操作系统级别更改网络配置,确保更改后所有节点都可以使用新接口。
$ ifconfig -a
$ ping <private hostname>
4.所有节点停止Oracle Clusterware并启用自动启动并重启Clusterware,已root用户执行:
# crsctl enable crs
# crsctl start crs
7.如果需要,删除旧的网络接口。
$ oifcfg delif -global <interfacename>[/<subnet>]
eg:
$ oifcfg delif -global <interfacename>0/192.168.0.0
11gR2+需要注意的:
1.如果基础网络配置已更改,但尚未运行oifcfg进行相同的更改,则在Oracle Clusterware重新启动时,CRSD将无法启动。
crsd.log日志显示如下:
2010-01-30 09:22:47.234: [ default][2926461424] CRS Daemon Starting .. 2010-01-30 09:22:47.273: [ GPnP][2926461424]clsgpnp_Init: [at clsgpnp0.c:837] GPnP client pid=7153, tl=3, f=0 2010-01-30 09:22:47.282: [ OCRAPI][2926461424]clsu_get_private_ip_addresses: no ip addresses found. 2010-01-30 09:22:47.282: [GIPCXCPT][2926461424] gipcShutdownF: skipping shutdown, count 2, from [ clsinet.c : 1732], ret gipcretSuccess (0) 2010-01-30 09:22:47.283: [GIPCXCPT][2926461424] gipcShutdownF: skipping shutdown, count 1, from [ clsgpnp0.c : 1021], ret gipcretSuccess (0) [ OCRAPI][2926461424]a_init_clsss: failed to call clsu_get_private_ip_addr (7) 2010-01-30 09:22:47.285: [ OCRAPI][2926461424]a_init:13!: Clusterware init unsuccessful : [44] 2010-01-30 09:22:47.285: [ CRSOCR][2926461424] OCR context init failure. Error: PROC-44: Error in network address and interface operations Network address and interface operations error [7] 2010-01-30 09:22:47.285: [ CRSD][2926461424][PANIC] CRSD exiting: Could not init OCR, code: 44 2010-01-30 09:22:47.285: [ CRSD][2926461424] Done.
上述错误表明操作系统设置(oifcfg iflist)和gpnp profile setting profile.xml之间不匹配。
解决方法:将操作系统网络配置恢复到原始状态,启动Oracle Clusterware。然后按照上述步骤再次进行更改。
如果基础网络尚未更改,但oifcfg setif使用错误的子网地址或接口名称运行,则会发生相同的问题。
2.如果集群中的任何一个节点停机,oifcfg命令将失败并出现错误:
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
PRIF-26: Error in update the profiles in the cluster
解决方法:在Oracle Clusterware未运行的节点上启动Oracle Clusterware。确保所有群集节点上的Oracle Clusterware都已启动。
如果节点因任何操作系统原因关闭,请在执行专用网络更改之前从群集中删除该节点。
3.如果 Grid Infrastructure所有者以外的用户发出上述命令,它将失败,并出现相同的错误:
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
PRIF-26: Error in update the profiles in the cluster
4.从11.2.0.2开始,如果尝试删除最后一个专用接口(群集_互连),而不首先添加新接口,则会发生以下错误:
PRIF-31: Failed to delete the specified network interface because it is the last private interface
解决方法:在删除旧的私有接口之前,先添加新的私有接口。.
5.如果节点上的Oracle Clusterware已关闭,则可能会出现以下错误:
$ oifcfg getif
PRIF-10: failed to initialize the cluster registry
解决方法:在节点上启动Oracle Clusterware
Windows系统的注意事项:
在Windows/RAC集群上更改接口的语法与在Unix/Linux上相同,但接口名称略有不同。在Windows系统上,分配给接口的默认名称通常命名为:
Local Area Connection
Local Area Connection 1
Local Area Connection 2
如果使用的接口名称中有空格,则该名称必须用引号括起来。
另外,请注意它是区分大小写的。例如,在Windows上,要设置cluster_interconnect:
C:\oracle\product\10.2.0\crs\bin\oifcfg setif -global "Local Area Connection 1"/192.168.1.0:cluster_interconnect
但是,Windows上的最佳做法是将接口重命名为更有意义的接口,例如将其重命名为"ocwpublic"和"ocwprivate"。
如果在安装Oracle Clusterware后重命名接口名称,则需要运行"oifcfg"来添加新接口并删除旧接口,如上所述。
通过运行以下命令,可以查看每个节点上可用的接口名称:
oifcfg iflist -p -n
必须在每个节点上运行此命令,以验证定义的接口名称是否相同。
使用oifcfg更改接口名称的后果:
对于心跳接口,数据库将使用存储在OCR中的接口,该接口被定义为缓存融合通信的'cluster_interconnect'。
cluster_interconnect信息在启动时可在警报日志中的参数列表之后获得,例如:
For pre 11.2.0.2:
Cluster communication is configured to use the following interface(s) for this instance
192.XXX.X.1
For 11.2.0.2+: (HAIP address will show in alert log instead of private IP)
Cluster communication is configured to use the following interface(s) for this instance
169.XXX.XX.97
如果这是不正确的,则需要在更正OCR条目后重新启动实例。
这同样适用于ASM实例和数据库实例。
在Windows系统上,关闭实例后,在重新读取OCR之前,还需要停止/重新启动OracleService<SID>(或OracleSMService<ASMSID>)。
Oifcfg Usage
要查看oifcfg的完整选项,只需执行:
To see the full options of oifcfg, simply type:
$ <CRS_HOME>/bin/oifcfg
场景十:使用HAIP为11gR2及以上版本添加或删除cluster_interconnect
1.grid执行,使用HAIP将另一个专用网络添加到现有集群中:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect
For example:
$ oifcfg setif -global <interfacename>/192.XXX.XX.0:cluster_interconnect
关闭所有节点上的CRS,然后重新启动所有节点上的CRS,以便HAIP拾取新接口。
crsctl stop crs
crsctl start crs
不能以滚动方式重新启动CRS。
2.要以grid用户身份使用HAIP从集群中删除心跳网络,请执行以下操作:
$ oifcfg delif -global <interfacename>
For example:
$ oifcfg delif -global <interfacename>
HAIP将故障切换到剩余接口,并且clusterware/database在删除接口后继续运行。
要删除额外的HAIP接口,需要关闭所有节点上的CRS,然后重新启动所有节点上的CRS。
crsctl stop crs
crsctl start crs
不能以滚动方式重新启动CRS。
如下是MOS相关文章原文及翻译:
###########################################################################################################33
How to Modify Public Network Information including VIP in Oracle Clusterware (文档 ID 276434.1)
目的
PURPOSE
本说明旨在说明如何在Oracle Clusterware/Grid Infrastructure环境中更改公共主机名、公共IP、虚拟IP地址(VIP)、VIP主机名或其他VIP属性。
The purpose of this note is to illustrate how to change a public hostname, public IP, a Virtual IP Address (VIP), VIP hostname or other VIP attributes in an Oracle Clusterware/Grid Infrastructure environment.
范围
SCOPE
Oracle Database 10g和11g在群集环境中使用VIP(虚拟IP)让客户端连接到数据库。
Oracle Database 10g and 11g use VIPs (Virtual IP) in clustered environments for clients to connect to the database.
这些VIP是与(虚拟)主机名关联并通过DNS解析的静态IP地址(使用11gR2 GNS时除外)。
These VIPs are static IP addresses associated with (virtual) hostnames and resolved through DNS (except when using 11gR2 GNS).
在安装Oracle Clusterware期间,系统会提示用户为群集中的每个节点输入虚拟IP和虚拟主机名。
During the installation of the Oracle Clusterware users are prompted to enter a Virtual IP and Virtual hostname for each of the node in the cluster.
它们存储在OCR(Oracle群集注册表)中,HA框架中的不同组件依赖于这些VIP。
These are stored within the OCR (Oracle Cluster Registry) and different components within the HA framework depend on these VIPs.
如果出于某种原因需要更改VIP、VIP主机名或子网、网络掩码等,则应遵循此过程。
If for some reason the need arises to change either the VIP, the VIP hostname, or the subnet, netmask etc, this procedure should be followed.
有关与专用网络/群集互连相关的更改,请参阅注释283684.1
For changes associated with private network/cluster interconnect, please refer to Note 283684.1
场景一:修改公共主机名
Case I. Changing public hostname
场景二:仅更改公共IP或VIP而不更改接口、子网或网络掩码,或仅更改MAC地址而不更改任何其他内容
Case II. Changing public IP or VIP only without changing interface, subnet or netmask or changing MAC address only without changing anything else
场景三:更改公共网络接口、子网或网络掩码
Case III. Changing public network interface, subnet or netmask
场景四:与公共网络变更相关的VIP变更
Case IV. Changing VIPs associated with public network change
场景五:更改与公用网络更改关联的SCAN VIP
Case V. Change SCAN VIP associated with public network change
场景一:修改公共主机名
Case I. Changing public hostname
公共主机名记录在OCR中,在安装阶段输入。
Public hostname is recorded in OCR, it is entered during installation phase.
安装后无法对其进行修改。
It can not be modified after the installation.
修改公共主机名的唯一方法是删除节点,然后使用新主机名重新添加节点,或者重新安装clusterware,或者按照克隆过程重新配置clusterware。
The only way to modify public hostname is by deleting the node, then adding the node back with a new hostname, or reinstalling the clusterware or following the clone procedure to reconfigure the clusterware.
场景二:仅更改公共IP或VIP而不更改接口、子网或网络掩码,或仅更改MAC地址而不更改任何其他内容
Case II. Changing public IP or VIP only without changing interface, subnet or netmask or changing MAC address only without changing anything else
如果更改仅为公共IP或VIP地址,且新地址仍在同一子网、同一接口中,或者如果更改仅为公共IP MAC地址、IP/接口/子网/网络掩码均保持不变,则无需在clusterware层执行任何操作,所有更改都需要在OS层执行以反映更改。
If the change is only public IP or VIP address and the new ones are still in the same subnet, same interface, or if the change is only for public IP MAC address, IP/interface/subnet/netmask all remain the same, nothing needs to be done at clusterware layer, all changes need to be done at OS layer to reflect the change.
1.关闭Oracle Clusterware堆栈
1. Shutdown Oracle Clusterware stack
2.修改网络层的IP地址、DNS和/etc/hosts文件以反映更改或修改网络层的MAC地址
2. Modify the IP address at network layer, DNS and /etc/hosts file to reflect the change or modify the MAC address at network layer
3.重新启动Oracle Clusterware堆栈
3. Restart Oracle Clusterware stack
上述更改可以滚动方式完成,例如:一次一个节点。
Above change can be done in rolling fashion, eg: one node at a time.
场景三:更改公共网络接口、子网或网络掩码
Case III. Changing public network interface, subnet or netmask
如果更改涉及不同的子网(网络掩码)或接口,请从OCR中删除现有接口信息,并使用正确的信息重新添加。
If the change involves different subnet(netmask) or interface, delete the existing interface information from OCR and add it back with the correct information is required.
在此示例中,通过两个单独的命令将子网从10.2.156.0更改为10.2.166.0,首先执行"delif",然后执行"setif":
In the example here, the subnet is changed from 10.2.156.0 to 10.2.166.0 via two separate commands - first a 'delif' followed by a 'setif':
% $CRS_HOME/bin/oifcfg/oifcfg delif -global <if_name>[/<subnet>]
% $CRS_HOME/bin/oifcfg/oifcfg setif -global <if_name>/<subnet>:public
For example:
% $CRS_HOME/bin/oifcfg delif -global eth0/10.X.156.0
% $CRS_HOME/bin/oifcfg setif -global eth0/10.X.166.0:public
然后在操作系统层进行更改。
Then make the change at OS layer.
除非操作系统更改需要重新启动节点,否则不需要重新启动Oracle clusterware。
There is no requirement to restart Oracle clusterware unless OS change requires a node reboot.
这可以通过滚动方式完成。
This can be done in rolling fashion.
一旦public网络发生变更,其关联VIP和SCN VIP也需要变更,参见案例四和案例五。
Once public network is changed, its associated VIP and SCAN VIP are also required to change, refer to CASE IV and CASE V.
注意:对于11gR2,上述命令要求clusterware在所有节点上运行,否则将报告PRIF-33和PRIF-32,即:
Note: for 11gR2, above command requires clusterware RUNNING on ALL nodes, otherwise PRIF-33 and PRIF-32 will be reported, i.e.
[grid@racnode1 bin]$ ./oifcfg delif -global <if_name>/192.168.1.0
PRIF-33: Failed to set or delete interface because hosts could not be discovered
CRS-02307: No GPnP services on requested remote hosts.
PRIF-32: Error in checking for profile availability for host <nodename>2
CRS-02306: GPnP service on host "<nodename>2" not found.
场景四:与公共网络变更相关的VIP变更
Case IV. Changing VIPs associated with public network change
VIP变更计划
Planning for VIP changes
一般来说,只有在10.2.0.3版本之前的版本中才需要完全停机。
In general, a complete outage is only required for pre-10.2.0.3 release.
从10.2.0.3开始,ASM/数据库实例对VIP资源的依赖关系将被删除,因此可以在不必关闭ASM/数据库实例的情况下修改VIP,当VIP关闭时,只有到数据库的客户端连接将受到影响。
From 10.2.0.3 onwards, the ASM/database instance dependency on the VIP resource is removed, so the VIP could be modified without having to take down the ASM/database instance, only client connections to the database will be affected when VIP is down.
如果修改是特定于节点的,那么在更改期间,只有与该节点的连接才会受到影响。
If the modification is a node specific, then only connection to that node will be affected during the time of change.
请遵循案例三,以确保公共网络已更改。
Please follow Case III to ensure public network changes are made first.
如果操作系统网络更改后节点重新启动或Clusterware重新启动,vip将不会启动,请跳到"Modifying VIP and its Associated Attributes"步骤。
If there is a node reboot or Clusterware restart after the OS network change, vip will not start, please skip to step "Modifying VIP and its Associated Attributes".
收集当前VIP配置
Gathering Current VIP Configuration
1.收集现有设置
1.Gather the existing setup
对于10g和11gR1,作为Oracle Clusterware所有者:
for 10g and 11gR1, as Oracle Clusterware owner:
$ srvctl config nodeapps -n <nodename> -a
eg:
$ srvctl config nodeapps -n <nodename>1 -a
VIP exists.: /<nodename>1-vip/101.XX.XX.184/255.255.254.0/<if_name>
对于11gR2,作为Oracle Clusterware所有者:
for 11gR2, as Grid Infrastructure owner:
$ srvctl config nodeapps -a
eg:
$ srvctl config nodeapps -a
Network exists: 1/101.17.80.0/255.255.254.0/<if_name>, type static
VIP exists: /racnode1-vip/101.17.XX.184/101.17.80.0/255.255.254.0/<if_name>, hosting node <nodename>1
VIP exists: /racnode2-vip/101.17.XX.186/101.17.80.0/255.255.254.0/<if_name>, hosting node <nodename>2
2.验证VIP状态
2. Verify VIP status
10.2 and 11.1:
$ crs_stat -t
11.2:
$ crsctl stat res -t
-它应该显示VIPs在线
- it should show VIPs are ONLINE
$ ifconfig -a
(netstat -in for HP and ipconfig /all for Windows)
-VIP逻辑接口绑定到公共网络接口
- VIP logical interface is bound to the public network interface
停止资源
Stopping Resources
3.停止nodeapps资源(以及所有从属资源ASM/DB,仅在需要时):
3. Stop the nodeapps resources (and all dependent resources ASM/DB only if required):
10g and 11gR1, as Oracle Clusterware owner:
$ srvctl stop instance -d <db_name> -i <inst_name> (optional for 10.2.0.3+)
$ srvctl stop asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl stop nodeapps -n <node_name>
eg,
$ srvctl stop instance -d <DBNAME> -i <INSTANCENAME>
$ srvctl stop asm -n <nodename>1
$ srvctl stop nodeapps -n <nodename>1
11gR2, as Grid Infrastructure owner:
$ srvctl stop instance -d <db_name> -n <node_name> (optional)
$ srvctl stop vip -n <node_name> -f
eg,
$ srvctl stop instance -d <DBNAME> -n <nodename>1
$ srvctl stop vip -n <nodename>1 -f
注1:11gR2需要-f选项来停止侦听器资源,否则将发生以下错误:
Note 1: The -f option is required for 11gR2 to stop listener resource, otherwise following error will occur:
PRCR-1014 : Failed to stop resource ora.<nodename>1.vip
PRCR-1065 : Failed to stop resource ora.<nodename>1.vip
CRS-2529: Unable to act on 'ora.<nodename>1.vip' because that would require stopping or relocating 'ora.LISTENER.lsnr', but the force option was not specified
...
4.验证VIP现在处于脱机状态,并且该接口不再绑定到公共网络接口
4. Verify VIP is now OFFLINE and the interface is no longer bound to the public network interface
$ crs_stat -t (or $ crsctl stat res -t for 11gR2)
$ ifconfig -a
(netstat -in for HP and ipconfig /all for windows)
修改VIP及其关联属性
Modifying VIP and Its Associated Attributes
5.确定新的VIP IP/子网/网络掩码或VIP主机名,首先在操作系统上更改网络,确保新VIP已在DNS中注册或在/etc/hosts(对于Unix/Linux)和\WINDOWS\System32\drivers\etc\hosts文件(对于WINDOWS)中修改。
5. Determine the new VIP IP/subnet/netmask or VIP hostname, make the network change on OS first, ensure the new VIP is registered in DNS or modified in /etc/hosts (for Unix/Linux) and \WINDOWS\System32\drivers\etc\hosts file (for Windows).
如果网络接口已更改,请确保新接口在服务器上可用,然后再继续修改。
If the network interface is changed, ensure the new interface is available on the server before proceeding with the modification.
For example:
New VIP is: 110.XX.XX.11 <nodename>1-nvip
new subnet is 110.11.70.0
new netmask is 255.255.255.0
new interface is <if_name>
6.以root用户身份修改VIP资源:
6. Modify the VIP resource, as root user:
# srvctl modify nodeapps -n <node> -A <new_vip_address or new_vip_hostname>/<netmask>/<[if1[if2...]]>
eg:
# srvctl modify nodeapps -n <nodename>1 -A <nodename>1-nvip/255.255.255.0/<if_name>
注1:从11.2开始,VIP取决于网络资源(ora.net1.network),OCR仅记录VIP主机名或与VIP资源关联的IP地址。
Note 1: Starting with 11.2, the VIPs depend on the network resource (ora.net1.network), the OCR only records the VIP hostname or the IP address associated with the VIP resource.
网络属性(子网/网络掩码/接口)与网络资源一起记录。
The network attributes (subnet/netmask/interface) are recorded with the network resource.
修改nodeapps资源时,网络资源(ora.net1.network)属性也会隐式修改。
When the nodeapps resource is modified, the network resoure(ora.net1.network) attributes are also modified implicitly.
从11.2.0.2开始,如果只需要更改子网/网络掩码/接口,则可以通过srvctl modify网络命令直接修改网络资源。
From 11.2.0.2 onwards, if only subnet/netmask/interface change is required, network resource can be modified directly via srvctl modify network command.
as root user:
# srvctl modify network -k <network_number>] [-S <subnet>/<netmask>[/if1[|if2...]]
eg:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>
如果其他属性未更改,则无需修改VIP或SCAN。
There is no need to modify VIP or SCAN if other attributes are not changed.
注2:对于12.1.0.1版本,由于未发布的BUG 16608577-无法在ORACLE 12.1中添加第二个公共接口,srvctl modify网络命令失败,原因是:
Note 2: For 12.1.0.1 release, due to unpublished Bug 16608577 - CANNOT ADD SECOND PUBLIC INTERFACE IN ORACLE 12.1, the srvctl modify network command fails with:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>
PRCT-1305 : The specified interface name "<if_name>2" does not match the existing network interface name "<if_name>1"
解决方法是使用空接口名称修改网络资源,然后使用所需的接口名称再次修改它,例如:
Workaround is to modify network resource with an empty interface name, then modify it again with the desired interface name, eg:
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0
# srvctl modify network -k 1 -S 110.XX.XX.0/255.255.255.0/<if_name>2
该错误已在12.1.0.2及更高版本中修复。
The bug has been fixed in 12.1.0.2 and above.
*11gR2仅修改VIP主机名而不更改IP地址的特殊情况。
* A special case for 11gR2 modifying the VIP hostname only without changing the IP address.
例如:只有VIP主机名从<nodename>1-VIP更改为<nodename>1-nvip,IP和其他属性保持不变。
For example: only VIP hostname changes from <nodename>1-vip to <nodename>1-nvip, IP and other attributes remain the same.
如果IP地址未更改,上述修改命令将不会更改“crsctl stat res ORA.<nodename>.VIP-p”输出中的USR_ORA_VIP值。
If IP address is not changed, above modify command will not change the USR_ORA_VIP value in 'crsctl stat res ora.<nodename>.vip -p' output.
请使用以下命令:
Please use the following command:
# crsctl modify res ora.<nodename>.vip -attr USR_ORA_VIP=<nodename>1-nvip
验证USR_ORA_VIP字段的更改:
Verify the changes for USR_ORA_VIP field:
# crsctl stat res ora.<nodename>1.vip -p |grep USR_ORA_VIP
注意:对于Windows平台,如果中间有空格,则接口名称需要在引号(“)中,例如:
Note: For Windows platform, the interface name needs to be in quote (") if there is a space in between, eg:
作为管理员用户或软件安装用户:
As administrator user or software install user:
> srvctl modify nodeapps -n <nodename> -A 110.XX.XX.11/255.255.255.0/"Local Area Connection 1"
7.验证更改
7. Verify the change
$ srvctl config nodeapps -n <node> -a (10g and 11gR1)
$ srvctl config nodeapps -a (11gR2)
eg:
$ srvctl config nodeapps -n <nodename>1 -a
VIP exists.: /<nodename>1-nvip/110.11.70.11/255.255.255.0/<if_name>2
重启资源
Restarting Resources
8.启动nodeapps和其他资源
8. Start the nodeapps and the other resources
10g and 11gR1, as Oracle Clusterware owner:
$ srvctl start nodeapps -n <node_name>
$ srvctl start asm -n <node_name> (optional for 10.2.0.3+)
$ srvctl start instance -d <dbanme> -i <inst> (optional for 10.2.0.3+)
eg:
$ srvctl start nodeapps -n <nodename>1
$ srvctl start asm -n <nodename>1
$ srvctl start instance -d <DBNAME> -i <INSTANCENAME>1
11gR2, as Grid Infrastructure owner:
$ srvctl start vip -n <node_name>
$ srvctl start listener -n <node_name>
$ srvctl start instance -d <db_name> -n <node_name> (optional)
eg,
$ srvctl start vip -n <nodename>1
$ srvctl start listener -n <nodename>1
$ srvctl start instance -d <DBNAME> -n <nodename>1
注意:如果更改了网络属性,即更改了网络掩码,请重新启动nodeapps
Note: if the network attributes are changed, i.e. netmask changed, restart the nodeapps
9.验证新VIP是否在线并绑定到公共网络接口
9. Verify the new VIP is ONLINE and bind to the public network interface
$ crs_stat -t (or $ crsctl stat res -t for 11gR2)
$ ifconfig -a
(netstat -in for HP or ipconfig /all for windows)
仅当需要进行类似更改时,才对群集中的rest节点重复相同的步骤。
10. Repeat the same steps for the rest nodes in the cluster only if the similar change is required.
其他
Others
11.如有必要,修改listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER参数以反映VIP更改。
11. Modify listener.ora, tnsnames.ora and LOCAL_LISTENER/REMOTE_LISTENER parameter to reflect the VIP change if necessary.
注意,ASM和DB的LOCAL_LISTENER由Grid Infrastructure自动设置。
Note, LOCAL_LISTENER for ASM and DB are set automatically by Grid Infrastructure.
LOCAL_LISTENER中的VIP更改应自动生效。
The VIP change in LOCAL_LISTENER should take effect automatically.
由于Bug 22824602,在某些条件下,ASM实例的LOCAL_LISTENER可能无法反映VIP更改。
Due to Bug 22824602, under some race condition, the LOCAL_LISTENER for ASM instance might not reflect the VIP change.
解决方法是在受影响的节点上重新启动Clusterware。
The workaround is to restart the Clusterware on the affected node.
场景五:更改与公用网络更改关联的SCAN VIP
Case V. Change SCAN VIP associated with public network change
在Grid Infrastructure 11gR2中,为客户端连接引入了SCAN和SACN VIP。要修改SCAN VIP,请参阅:
With Grid Infrastructure 11gR2, SCAN and SCAN VIP are introduced for client connections. To modify the SCAN VIP, please refer to
Note 952903.1 How to update the IP address of the SCAN VIP resources (ora.scan<n>.vip)
Note 972500.1 How to Modify SCAN Setting or SCAN Listener Port after Installation
注意:如果需要回滚更改,请重复已运行的命令,用原始值替换新值以恢复原始配置。
Note: if rolling back the change is required, repeat the commands which have been run, replace the new value with original value to restore the original configuration.
##########################################
How to Modify Private Network Information in Oracle Clusterware (文档 ID 283684.1)
场景一:修改私有网卡主机名
Case I. Changing private hostname
场景二:仅更改私有IP而不更改网络接口、子网和网络掩码或者只更改专用IP MAC地址而不更改其他任何内容
Case II. Changing private IP only without changing network interface, subnet and netmask or changing private IP MAC address only without changing anything else
场景三:仅更改私有网络MTU
Case III. Changing private network MTU only
场景四:更改私有网络接口名称、子网或网络掩码
场景五:使用HAIP为11gR2及以上版本添加或删除cluster_interconnect
Case V. Add or remove cluster_interconnect for 11gR2 and above with HAIP
目标:
GOAL
本说明的目的是描述如何更改或更新Oracle Clusterware中的心跳网络(群集互连)信息。
The purpose of this note is to describe how to change or update the private network (cluster_interconnect) information in Oracle Clusterware.
如果存在影响服务器的网络更改,或者如果在安装过程中输入的原始信息不正确,则可能需要更改或更新接口名称或与接口关联的子网。
It may be necessary to change or update interface names, or subnet associated with an interface if there is a network change affecting the servers, or if the original information that was input during the installation was incorrect.
也可能是由于某种原因,Oracle Interface Configuration Assistant(“oifcfg”)在安装过程中未成功。
It may also be the case that for some reason, the Oracle Interface Configuration Assistant ('oifcfg') did not succeed during the installation.
有关修改公共网络和VIP相关信息,请参阅注释276434.1;有关IPv4子网和Oracle Clusterware的基本信息,请参阅注释1386709.1。
Please refer to Note 276434.1 for modifying public network and VIP associated information and refer to Note 1386709.1 for basics of IPv4 subnet and Oracle Clusterware.
注意:对于Oracle Engineered system(Exadata)和Oracle Database Appliance(ODA),请不要在本说明之后进行此类更改。
Note: for Oracle Engineered system (Exadata) and Oracle Database Appliance (ODA), please do not make such changes following this note.
解决方案:
SOLUTION
Oracle Clusterware的网络信息(接口、子网和每个接口的角色)由"oifcfg"管理,但每个接口的实际IP地址不是,"oifcfg"无法更新IP地址信息。
Network information(interface, subnet and role of each interface) for Oracle Clusterware is managed by 'oifcfg', but actual IP address for each interfaces are not, 'oifcfg' can not update IP address information.
"oifcfg getif"可用于查找OCR中当前配置的接口:
'oifcfg getif' can be used to find out currently configured interfaces in OCR:
% $CRS_HOME/bin/oifcfg getif
<interfacename>0 10.X.XXX.0 global public
<interfacename>1 192.XXX.X.0 global cluster_interconnect
在Unix/Linux系统上,接口名称通常由操作系统分配,标准名称因平台而异。
On Unix/Linux systems, the interface names are generally assigned by the OS, and standard names vary by platform.
对于Windows系统,请参阅下面的附加说明。
For Windows systems, see additional notes below.
上面的示例显示当前接口<interfacename>0用于子网10.2.156.0的公用,而<interfacename>1用于子网192.168.0.0的群集互连/专用。
Above example shows currently interface <interfacename>0 is used for public with subnet 10.2.156.0, and <interfacename>1 for cluster_interconnect/private with subnet 192.168.0.0.
"public"网络用于数据库客户端通信(VIP也使用相同的网络,尽管它作为单独条目存储在OCR中),而"cluster_interconnect"网络用于RDBMS/ASM缓存融合。
The 'public' network is for database client communication (VIP also uses the same network though it's stored in OCR as separate entry), whereas the 'cluster_interconnect' network is for RDBMS/ASM cache fusion.
从11gR2开始,cluster_interconnect还用于clusterware心跳-与之前的版本相比,这是一个重大变化,因为11gR2之前的版本使用了在安装clusterware心跳时指定的专用节点名。
Starting with 11gR2, cluster_interconnect is also used for clusterware heartbeats - this is significant change compare to prior release as pre-11gR2 uses the private nodename that were specified at installation time for clusterware heartbeats.
如果"cluster_interconnect"接口的子网或接口名称不正确,则需要将其更改为crs/grid user。
If the subnet or interface name for 'cluster_interconnect' interface is incorrect, it needs to be changed as crs/grid user.
场景一:修改私有网卡主机名
Case I. Changing private hostname
在11.2版之前的Oracle Clusterware中,心跳主机名记录在OCR中,无法更新。通常,不需要更改心跳主机名。
In pre-11.2 Oracle Clusterware, private hostname is recorded in OCR, it can not be updated. Generally private hostname is not required to change.
可以更改其关联的IP。更改私有主机名的唯一方法是删除/添加节点,或重新安装Oracle Clusterware。
Its associated IP can be changed. The only way to change private hostname is by deleting/adding nodes, or reinstall Oracle Clusterware.
在11.2网格基础设施中,心跳主机名不再记录在OCR中,并且不依赖于心跳主机名。
In 11.2 Grid Infrastructure, private hostname is no longer recorded in OCR and there is no dependency on the private hostname.
它可以在/etc/hosts中自由更改。
It can be changed freely in /etc/hosts.
场景二:仅更改私有IP而不更改网络接口、子网和网络掩码或者只更改专用IP MAC地址而不更改其他任何内容
Case II. Changing private IP only without changing network interface, subnet and netmask or changing private IP MAC address only without changing anything else
例如,私有IP从192.XXX.X.10更改为192.XXX.X.21,网络接口名称和子网保持不变,或者MAC地址更改,专用IP地址/接口名称/子网/网络都保持不变。
For example, private IP is changed from 192.XXX.X.10 to 192.XXX.X.21, network interface name and subnet remain the same, or MAC address is changed, private IP address/interface name/subnet/network all remain the same.
只需在需要更改的节点上关闭Oracle Clusterware堆栈,根据需要在操作系统层(例如:/etc/hosts、操作系统网络配置等)对私有网络进行IP或MAC修改,重新启动Oracle Clusterware堆栈即可完成任务。
Simply shutdown Oracle Clusterware stack on the node where change required, make IP or MAC modification at OS layer as required (eg: /etc/hosts, OS network config etc) for private network, restart Oracle Clusterware stack will complete the task.
场景三:仅更改私有网络MTU
Case III. Changing private network MTU only
例如,私有网络MTU从1500更改为9000(启用巨型帧),网络接口名称和子网保持不变。
For example, private network MTU is changed from 1500 to 9000 (enable jumbo frame), network interface name and subnet remain the same.
1.关闭所有节点上的Oracle Clusterware堆栈
1. Shutdown Oracle Clusterware stack on all nodes
2.在操作系统网络层对MTU大小进行所需的网络更改,确保心跳网络具有所需的MTU大小,在所有群集节点上使用所需的MTU大小进行ping
2. Make the required network change of MTU size at OS network layer, ensure private network is available with the desired MTU size, ping with the desired MTU size works on all cluster nodes
3.在所有节点上重新启动Oracle Clusterware堆栈
3. Restart Oracle Clusterware stack on all nodes
场景四:更改私有网络接口名称、子网或网络掩码
Case IV. Changing private network interface name, subnet or netmask
注意:更改网络掩码但子网ID不变时,例如:
Note: When the netmask is changed but the subnet ID doesn't change, for example:
网络掩码从255.255.0.0更改为255.255.255.0,心跳IP为192.168.0.x,子网ID与192.168.0.0相同,网络接口名称不变。
The netmask is changed from 255.255.0.0 to 255.255.255.0 with private IP like 192.168.0.x, the subnet ID remains the same as 192.168.0.0, the network interface name is not changed.
在需要更改的所有群集节点上关闭Oracle Clusterware堆栈,在操作系统层(例如:操作系统网络配置等)对心跳网络进行IP修改,在所有节点上重新启动Oracle Clusterware堆栈将完成任务。
Shutdown Oracle Clusterware stack on all cluster nodes where change required, make IP modification at OS layer (eg: OS network config etc) for private network, restart Oracle Clusterware stack on all nodes will complete the task.
请注意,此更改不能以滚动方式进行。
Please note, this change can not be done in rolling manner.
更改网络掩码时,关联的子网ID通常会更改。
When the netmask is changed, the associated subnet ID is often changed.
Oracle仅在OCR中存储网络接口名称和子网ID,而不是网络掩码。
Oracle only store network interface name and subnet ID in OCR, not the netmask.
Oifcfg命令可用于此类更改,Oifcfg命令只需要在集群节点的1个节点上运行,而不需要在所有节点上运行。
Oifcfg command can be used for such change, oifcfg commands only require to run on 1 of the cluster node, not all.
A.对于11gR2之前的Oracle Clusterware
A. For pre-11gR2 Oracle Clusterware
1.使用oifcfg添加新的专用网络信息,删除旧的专用网络信息:
1. Use oifcfg to add the new private network information, delete the old private network information:
% $ORA_CRS_HOME/bin/oifcfg/oifcfg setif -global <if_name>/<subnet>:cluster_interconnect
% $ORA_CRS_HOME/bin/oifcfg/oifcfg delif -global <if_name>[/<subnet>]]
For example:
% $ORA_CRS_HOME/bin/oifcfg setif -global <interfacename>3/192.168.2.0:cluster_interconnect
% $ORA_CRS_HOME/bin/oifcfg delif -global <interfacename>1/192.168.1.0
验证更改
To verify the change
% $ORA_CRS_HOME/bin/oifcfg getif
eth0 10.X.XXX.0 global public
eth3 192.XXX.2.0 global cluster_interconnect
2.关闭Oracle Clusterware堆栈
2. Shutdown Oracle Clusterware stack
As root user: # crsctl stop crs
3.在操作系统级别进行所需的网络更改,应在所有节点上修改/etc/hosts文件以反映更改。
3. Make required network change at OS level, /etc/hosts file should be modified on all nodes to reflect the change.
确保新网络在所有群集节点上可用:
Ensure the new network is available on all cluster nodes:
% ping <private hostname/IP>
% ifconfig -a on Unix/Linux
or
% ipconfig /all on windows
4.重启Oracle Clusterware堆栈
4. restart the Oracle Clusterware stack
As root user: # crsctl start crs
注意:如果在Linux上运行OCFS2,可能还需要更改OCFS2用于与其他节点通信的心跳IP地址。
Note: If running OCFS2 on Linux, one may also need to change the private IP address that OCFS2 is using to communicate with other nodes.
有关更多信息,请参阅Note 604958.1
For more information, please refer to Note 604958.1
B.适用于不带Flex ASM的11gR2 Oracle Clusterware和12c群集
B. For 11gR2 Oracle Clusterware and 12c Cluster without Flex ASM
从11.2 Grid Infrastructure,心跳网络配置不仅存储在OCR中,还存储在gpnp profile文件中。
As of 11.2 Grid Infrastructure, the private network configuration is not only stored in OCR but also in the gpnp profile.
如果心跳网络不可用或其定义不正确,CRSD过程将不会启动,OCR的任何后续更改将不可能进行。
If the private network is not available or its definition is incorrect, the CRSD process will not start and any subsequent changes to the OCR will be impossible.
因此,在修改心跳网络的配置时需要小心。
Therefore care needs to be taken when making modifications to the configuration of the private network.
以正确的顺序执行更改非常重要。
It is important to perform the changes in the correct order.
还请注意,不支持手动修改gpnp profile文件。
Please also note that manual modification of gpnp profile is not supported.
在继续之前,请在所有群集节点上备份profile.xml,已grid用户执行:
Please take a backup of profile.xml on all cluster nodes before proceeding, as grid user:
$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk
1.确保Oracle Clusterware正在群集中的所有群集节点上运行
1. Ensure Oracle Clusterware is running on ALL cluster nodes in the cluster
2.已grid用户执行:
2. As grid user:
获取现有信息。例如:
Get the existing information. For example:
$ oifcfg getif
<interfacename>1 100.17.10.0 global public
<interfacename>0 192.168.0.0 global cluster_interconnect
添加新的cluster_interconnect信息:
Add the new cluster_interconnect information:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect
For example:
A.添加具有相同子网的新接口bond0
a. add a new interface bond0 with the same subnet
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
B.添加具有相同接口名称但不同子网或新接口名称的新子网
b. add a new subnet with the same interface name but different subnet or new interface name
$ oifcfg setif -global eth0/192.65.0.0:cluster_interconnect
or
$ oifcfg setif -global eth3/192.168.1.96:cluster_interconnect
1.即使接口还不可用,也可以使用-global选项完成此操作,但如果接口不可用,则无法使用-node选项完成此操作,这将导致节点逐出。
1. This can be done with -global option even if the interface is not available yet, but this can not be done with -node option if the interface is not available, it will lead to node eviction.
2.如果服务器上有接口,子网地址可以通过命令识别:
2. If the interface is available on the server, subnet address can be identified by command:
$ oifcfg iflist
它列出了网络接口及其子网地址。即使Oracle Clusterware未运行,也可以运行此命令。
It lists the network interface and its subnet address. This command can be run even if Oracle Clusterware is not running.
请注意,子网地址的格式可能不是x.y.z.0,它可以是x.y.z.24、x.y.z.64或x.y.z.128等。例如,
Please note, subnet address might not be in the format of x.y.z.0, it can be x.y.z.24, x.y.z.64 or x.y.z.128 etc. For example,
$ oifcfg iflist
lan1 18.1.2.0
lan2 10.2.3.64 << this is the private network subnet address associated with private network IP: 10.2.3.XX
3.如果是为了添加第二个专用网络,而不是替换现有的专用网络,请确保两个接口的MTU大小相同,否则实例启动会报告错误:
3. If it is for adding a 2nd private network, not replacing the existing private network, please ensure MTU size of both interfaces are the same, otherwise instance startup will report error:
ORA-27504: IPC error creating OSD context
ORA-27300: OS system dependent operation:if MTU failed with status: 0
ORA-27301: OS failure message: Error 0
ORA-27302: failure occurred at: skgxpcini2
ORA-27303: additional information: requested interface lan1:801 has a different MTU (1500) than lan3:801 (9000), which is not supported. Check output from ifconfig command
4.对于11gR2及更高版本,不建议在ASM或数据库spfile或pfile中设置cluster_interconnects。
4. For 11gR2 and higher, it is not recommended to set cluster_interconnects in ASM or Database spfile or pfile.
如果出于任何原因设置了此参数,则需要在clusterware关闭之前将其更改为spfile或pfile中的新私有IP,否则会由于互连不匹配而导致重新启动期间出现故障。
If this parameter is set for any reason, it needs to be changed to the new private IP in spfile or pfile prior to clusterware shutdown, otherwise it will result a failure during restart due to the interconnect mismatch.
验证更改:
Verify the change:
$ oifcfg getif
3.关闭所有节点上的Oracle Clusterware并用root用户禁用Oracle Clusterware自动启动:
3. Shutdown Oracle Clusterware on all nodes and disable the Oracle Clusterware as root user:
# crsctl stop crs
# crsctl disable crs
4.根据需要在操作系统级别更改网络配置,确保更改后所有节点都可以使用新接口。
4. Make the network configuration change at OS level as required, ensure the new interface is available on all nodes after the change.
$ ifconfig -a
$ ping <private hostname>
5.启用Oracle Clusterware自启动并以root用户身份在所有节点上重新启动Oracle Clusterware:
5. Enable Oracle Clusterware and restart Oracle Clusterware on all nodes as root user:
# crsctl enable crs
# crsctl start crs
6.如果需要,移除旧接口:
6. Remove the old interface if required:
$ oifcfg delif -global <interfacename>[/<subnet>]
eg:
$ oifcfg delif -global eth0/192.168.0.0
C.适用于带Flex ASM的12c和18c Oracle Clusterware
C. For 12c and 18c Oracle Clusterware with Flex ASM
请复习以上B部分,注意备注部分,备份如下:
Please review above section B and pay attention to the Note section, take a backup as follows:
在继续之前,请在所有群集节点上备份profile.xml,已grid用户执行:
Please take a backup of profile.xml on all cluster nodes before proceeding, as grid user:
$ cd $GRID_HOME/gpnp/<hostname>/profiles/peer/
$ cp -p profile.xml profile.xml.bk
1.确保Oracle Clusterware正在群集中的所有群集节点上运行
1. Ensure Oracle Clusterware is running on ALL cluster nodes in the cluster
2. As grid user:
获取现有信息。例如:
Get the existing information. For example:
$ oifcfg getif
<interfacename>1 100.17.10.0 global public
<interfacename>0 192.168.0.0 global cluster_interconnect,asm
上面的示例显示网络eth0用于cluster_interconnect和ASM网络。
Above example shows network eth0 is used for both cluster_interconnect and ASM network.
添加新的cluster_interconnect信息:
Add the new cluster_interconnect information:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect[,asm]
For example:
A.添加具有相同子网的新接口bond0
a. add a new interface bond0 with the same subnet
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect,asm
B.添加具有相同接口名称但不同子网或新接口名称的新子网
b. add a new subnet with the same interface name but different subnet or new interface name
$ oifcfg setif -global eth0/192.68.10.0:cluster_interconnect,asm
or
$ oifcfg setif -global eth3/192.168.1.96:cluster_interconnect,asm
如果心跳网络和ASM网络使用不同的网络,则相应地修改它们。
If different network is used for private network and ASM network, then modify them accordingly.
3.由于ASMLISTENER正在使用心跳网络,修改心跳网络将影响ASMLISTENER。
3. As ASMLISTENER is using the private network, modifying the private network will affect ASMLISTENER.
需要使用新的网络配置添加新的ASMLISTENER。
It is required to add a new ASMLISTENER with the new network configuration.
如果ASM网络的子网未更改,请跳过此步骤。
Skip this step if the subnet for the ASM network is not changed.
3.1. 使用新子网添加新的ASMLISTENER(例如:ASMNEWLSNR_ASM),已grid用户执行:
3.1. Add a new ASMLISTENER (for example: ASMNEWLSNR_ASM) with the new subnet, as grid user:
$ srvctl add listener -asmlistener -l <new ASM LISTENER NAME> -subnet <new subnet>
eg:
$ srvctl add listener -asmlistener -l ASMNEWLSNR_ASM -subnet 192.168.10.0
3.2. 删除现有的ASMLISTENER(本例中为ASMLSNR_ASM)并删除依赖项,已grid用户执行:
3.2. Drop the existing ASMLISTENER (ASMLSNR_ASM in this example) and remove the dependency, as grid user:
$ srvctl update listener -listener ASMLSNR_ASM -asm -remove -force
$ lsnrctl stop ASMLSNR_ASM
注意-force选项是必需的,否则将发生以下错误:
Note. -force option is required, otherwise the following error will occur:
$ srvctl update listener -listener ASMLSNR_ASM -asm -remove
PRCR-1025 : Resource ora.ASMLSNR_ASM.lsnr is still running
$ srvctl stop listener -l ASMLSNR_ASM
PRCR-1065 : Failed to stop resource ora.ASMLSNR_ASM.lsnr
CRS-2529: Unable to act on 'ora.ASMLSNR_ASM.lsnr' because that would require stopping or relocating 'ora.asm', but the force option was not specified
3.3 验证配置
3.3 Verify the configuration
$ srvctl config listener -asmlistener
$ srvctl config asm
4.所有节点停止Oracle Clusterware并禁用自动启动,已root用户执行:
4. Shutdown Oracle Clusterware on ALL nodes and disable the Oracle Clusterware as root user:
# crsctl stop crs
# crsctl disable crs
5.根据需要在操作系统级别更改网络配置,确保更改后所有节点都可以使用新接口。
5. Make the network configuration change at OS level as required, ensure the new interface is available on all nodes after the change.
$ ifconfig -a
$ ping <private hostname>
4.所有节点停止Oracle Clusterware并启用自动启动并重启Clusterware,已root用户执行:
6. Enable Oracle Clusterware and restart Oracle Clusterware on all nodes as root user:
# crsctl enable crs
# crsctl start crs
7.如果需要,删除旧的网络接口。
7. Remove the old interface if required:
$ oifcfg delif -global <interfacename>[/<subnet>]
eg:
$ oifcfg delif -global <interfacename>0/192.168.0.0
11gR2+需要注意的:
Something to note for 11gR2+
1.如果基础网络配置已更改,但尚未运行oifcfg进行相同的更改,则在Oracle Clusterware重新启动时,CRSD将无法启动。
1. If underlying network configuration has been changed, but oifcfg has not been run to make the same change, then upon Oracle Clusterware restart, the CRSD will not be able to start.
crsd.log日志显示如下:
The crsd.log will show:
2010-01-30 09:22:47.234: [ default][2926461424] CRS Daemon Starting
..
2010-01-30 09:22:47.273: [ GPnP][2926461424]clsgpnp_Init: [at clsgpnp0.c:837] GPnP client pid=7153, tl=3, f=0
2010-01-30 09:22:47.282: [ OCRAPI][2926461424]clsu_get_private_ip_addresses: no ip addresses found.
2010-01-30 09:22:47.282: [GIPCXCPT][2926461424] gipcShutdownF: skipping shutdown, count 2, from [ clsinet.c : 1732], ret gipcretSuccess (0)
2010-01-30 09:22:47.283: [GIPCXCPT][2926461424] gipcShutdownF: skipping shutdown, count 1, from [ clsgpnp0.c : 1021], ret gipcretSuccess (0)
[ OCRAPI][2926461424]a_init_clsss: failed to call clsu_get_private_ip_addr (7)
2010-01-30 09:22:47.285: [ OCRAPI][2926461424]a_init:13!: Clusterware init unsuccessful : [44]
2010-01-30 09:22:47.285: [ CRSOCR][2926461424] OCR context init failure. Error: PROC-44: Error in network address and interface operations Network address and interface operations error [7]
2010-01-30 09:22:47.285: [ CRSD][2926461424][PANIC] CRSD exiting: Could not init OCR, code: 44
2010-01-30 09:22:47.285: [ CRSD][2926461424] Done.
上述错误表明操作系统设置(oifcfg iflist)和gpnp profile setting profile.xml之间不匹配。
Above errors indicate a mismatch between OS setting (oifcfg iflist) and gpnp profile setting profile.xml.
解决方法:将操作系统网络配置恢复到原始状态,启动Oracle Clusterware。然后按照上述步骤再次进行更改。
Workaround: restore the OS network configuration back to the original status, start Oracle Clusterware. Then follow above steps to make the changes again.
如果基础网络尚未更改,但oifcfg setif使用错误的子网地址或接口名称运行,则会发生相同的问题。
If the underlying network has not been changed, but oifcfg setif has been run with a wrong subnet address or interface name, same issue will happen.
2.如果集群中的任何一个节点停机,oifcfg命令将失败并出现错误:
2. If any one node is down in the cluster, oifcfg command will fail with error:
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
PRIF-26: Error in update the profiles in the cluster
解决方法:在Oracle Clusterware未运行的节点上启动Oracle Clusterware。确保所有群集节点上的Oracle Clusterware都已启动。
Workaround: start Oracle Clusterware on the node where it is not running. Ensure Oracle Clusterware is up on all cluster nodes.
如果节点因任何操作系统原因关闭,请在执行专用网络更改之前从群集中删除该节点。
If the node is down for any OS reason, please remove the node from the cluster before performing private network change.
3.如果 Grid Infrastructure所有者以外的用户发出上述命令,它将失败,并出现相同的错误:
3. If a user other than Grid Infrastructure owner issues above command, it will fail with same error:
$ oifcfg setif -global bond0/192.168.0.0:cluster_interconnect
PRIF-26: Error in update the profiles in the cluster
Workaround: ensure to login as Grid Infrastructure owner to perform such command.
4.从11.2.0.2开始,如果尝试删除最后一个专用接口(群集_互连),而不首先添加新接口,则会发生以下错误:
4. From 11.2.0.2 onwards, if attempt to delete the last private interface (cluster_interconnect) without adding a new one first, following error will occur:
PRIF-31: Failed to delete the specified network interface because it is the last private interface
解决方法:在删除旧的私有接口之前,先添加新的私有接口。
Workaround: Add new private interface first before deleting the old private interface.
5.如果节点上的Oracle Clusterware已关闭,则可能会出现以下错误:
5. If Oracle Clusterware is down on the node, the following error is expected:
$ oifcfg getif
PRIF-10: failed to initialize the cluster registry
解决方法:在节点上启动Oracle Clusterware
Workaround: Start the Oracle Clusterware on the node
Windows系统的注意事项
Notes for Windows Systems
在Windows/RAC集群上更改接口的语法与在Unix/Linux上相同,但接口名称略有不同。在Windows系统上,分配给接口的默认名称通常命名为:
The syntax for changing the interfaces on Windows/RAC clusters is the same as on Unix/Linux, but the interface names will be slightly different. On Windows systems, the default names assigned to the interfaces are generally named such as:
Local Area Connection
Local Area Connection 1
Local Area Connection 2
如果使用的接口名称中有空格,则该名称必须用引号括起来。
If using an interface name that has space in it, the name must be enclosed in quotes.
另外,请注意它是区分大小写的。例如,在Windows上,要设置cluster_interconnect:
Also, be aware that it is case sensitive. For example, on Windows, to set cluster_interconnect:
C:\oracle\product\10.2.0\crs\bin\oifcfg setif -global "Local Area Connection 1"/192.168.1.0:cluster_interconnect
但是,Windows上的最佳做法是将接口重命名为更有意义的接口,例如将其重命名为"ocwpublic"和"ocwprivate"。
However, it is best practice on Windows to rename the interfaces to be more meaningful, such as renaming them to 'ocwpublic' and 'ocwprivate'.
如果在安装Oracle Clusterware后重命名接口名称,则需要运行"oifcfg"来添加新接口并删除旧接口,如上所述。
If interface names are renamed after Oracle Clusterware is installed, then you will need to run 'oifcfg' to add the new interface and delete the old one, as described above.
通过运行以下命令,可以查看每个节点上可用的接口名称:
You can view the available interface names on each node by running the command:
oifcfg iflist -p -n
必须在每个节点上运行此命令,以验证定义的接口名称是否相同。
This command must be run on each node to verify the interface names are defined the same.
使用oifcfg更改接口名称的后果
Ramifications of Changing Interface Names Using oifcfg
对于心跳接口,数据库将使用存储在OCR中的接口,该接口被定义为缓存融合通信的'cluster_interconnect'。
For the Private interface, the database will use the interface stored in the OCR and defined as a 'cluster_interconnect' for cache fusion traffic.
cluster_interconnect信息在启动时可在警报日志中的参数列表之后获得,例如:
The cluster_interconnect information is available at startup in the alert log, after the parameter listing - for example:
For pre 11.2.0.2:
Cluster communication is configured to use the following interface(s) for this instance
192.XXX.X.1
For 11.2.0.2+: (HAIP address will show in alert log instead of private IP)
Cluster communication is configured to use the following interface(s) for this instance
169.XXX.XX.97
如果这是不正确的,则需要在更正OCR条目后重新启动实例。
If this is incorrect, then instance is required to restart once the OCR entry is corrected.
这同样适用于ASM实例和数据库实例。在Windows系统上,关闭实例后,在重新读取OCR之前,还需要停止/重新启动OracleService<SID>(或OracleSMService<ASMSID>)。
This applies to ASM instances and Database instances alike. On Windows systems, after shutting down the instance, it is also required to stop/restart the OracleService<SID> (or OracleASMService<ASMSID> before the OCR will be re-read.
Oifcfg Usage
要查看oifcfg的完整选项,只需执行:
To see the full options of oifcfg, simply type:
$ <CRS_HOME>/bin/oifcfg
场景五:使用HAIP为11gR2及以上版本添加或删除cluster_interconnect
Case V. Add or remove cluster_interconnect for 11gR2 and above with HAIP
1.grid执行,使用HAIP将另一个专用网络添加到现有集群中:
1. To add another private network into existing cluster using HAIP, as grid user:
$ oifcfg setif -global <interface>/<subnet>:cluster_interconnect
For example:
$ oifcfg setif -global <interfacename>/192.XXX.XX.0:cluster_interconnect
关闭所有节点上的CRS,然后重新启动所有节点上的CRS,以便HAIP拾取新接口。
Shutdown CRS on ALL nodes, then restart CRS on ALL nodes for HAIP to pick up the new interface.
不能以滚动方式重新启动CRS。
It is insufficient to restart CRS in rolling manner.
2.要以grid用户身份使用HAIP从集群中删除心跳网络,请执行以下操作:
2. To remove a private network from a cluster with HAIP, as grid user:
$ oifcfg delif -global <interfacename>
For example:
$ oifcfg delif -global <interfacename>
HAIP将故障切换到剩余接口,并且clusterware/database在删除接口后继续运行。
HAIP will failover to the remaining interface and clusterware/database continue to function after the interface removal.
要删除额外的HAIP接口,需要关闭所有节点上的CRS,然后重新启动所有节点上的CRS。
To remove the extra HAIP interface, it is required to shutdown CRS on ALL nodes, then restart CRS on ALL nodes.
不能以滚动方式重新启动CRS。
It is insufficient to restart CRS in rolling manner.
##########################################
How to Modify SCAN Setting or SCAN Listener Port after Installation (文档 ID 972500.1)
目标:
GOAL
本说明提供了更新11gR2 Grid Infrastructure(CRS)Single Client Access(SCAN)设置或SCAN listener port设置的步骤,如果设置不正确或在设置后更改了该设置。
This note provides steps to update 11gR2 Grid Infrastructure (CRS) Single Client Access Name (SCAN) setting or SCAN listener port setting if it's not setup properly or if it's changed after setup.
注意:
Note:
1.使用GNS时,本程序不适用
1. This procedure does not apply when GNS is being used
2.即使在"typical"安装期间将clustername和SCAN名称设置为相同,更改SCAN名称也不会影响clustername,因为更改clustername需要取消配置并重新配置整个群集。
2. Even though clustername and SCAN name is set to the same during 'typical' installation, changing SCAN name will not affect clustername as change of clustername requires deconfigure and reconfigure of the entire cluster.
解决方案
SOLUTION
A.更新SCAN设置
A. To update SCAN setting
1.根据文档“Oracle Grid Infrastructure Installation Guide”,Oracle强烈建议在DNS或GNS As/etc/hosts文件中配置SCAN名称,该文件只能解析为一个IP地址。
1. As per documentation "Oracle Grid Infrastructure Installation Guide", Oracle strongly recommend to configure SCAN name in either DNS or GNS as /etc/hosts file can only resolve to one IP address.
SCAN IP必须与public和VIP位于同一子网中。如果新的scan IP将位于不同的子网中,请参阅注释276434.1以首先更改nodeapps/网络资源。
SCAN IP must be in same subnet as public and VIP. If the new SCAN IP will be in different subnet, refer to note 276434.1 to change nodeapps/network resource first.
1a.如果打算使用/etc/hosts进行SCAN名称解析,则所有节点上必须存在相同且唯一的扫描名称条目。
1a. If you intend to use /etc/hosts for SCAN name resolution, the same and only entry for SCAN name must exist on all nodes.
1b. 如果要使用DNS进行scan名称解析,请从所有节点上的/etc/hosts中删除扫描名称条目,并确保nslookup在所有节点上返回良好结果,例如:
1b. If you intend to use DNS for SCAN name resolution, remove entries for SCAN name from /etc/hosts on all nodes, and make sure nslookup returns good result on all nodes, for example:
$ nslookup <scan>.oracle.com
..
Name: <scan>.oracle.com
Address: 10.x.x.201
Name: <scan>.oracle.com
Address: 10.x.x.202
Name: <scan>.oracle.com
Address: 10.x.x.203
2.正确配置#1a或#1b后,执行以下操作进行修改:
2. Once #1a or #1b is configured properly, execute the following to modify:
如果要将scan名称解析从本地主机文件切换到DNS,请确保在执行以下命令之前删除所有节点上本地主机文件中的扫描名称。
If name resolution for SCAN is being switched from local hosts file to DNS, be sure to remove SCAN name in local hosts file on all nodes prior to execute below commands.
2.1 修改SCAN名字或SCAN VIP地址
2.1. To modify SCAN name or SCAN VIP addresses:
2.1.1 grid用户停止资源
2.1.1. As grid user stop resources:
$ $GRID_HOME/bin/srvctl stop scan_listener
$ $GRID_HOME/bin/srvctl stop scan
2.1.2 root用户修改SAN:
2.1.2. As root user modify SCAN:
# $GRID_HOME/bin/srvctl modify scan -n <scan>.oracle.com
###仅适用于11.2.0.1,如果由于bug 9603829,您打算更改SCAN名称,请执行以下操作:
### For 11.2.0.1 only, if you intend to change SCAN name, due to bug 9603829, execute the following:
# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=<new SCAN name>"
### Example:
# $GRID_HOME/bin/crsctl modify type ora.scan_vip.type -attr "ATTRIBUTE=SCAN_NAME,DEFAULT_VALUE=<scan>.oracle.com"
更改SCAN名称后,将数据库init.ora/spfile参数remote_listener更新为新名称。
Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.
2.1.3 grid用户修改和启动资源:
2.1.3. As grid user modify and start resources:
$ $GRID_HOME/bin/srvctl modify scan_listener -u
$ $GRID_HOME/bin/srvctl start scan_listener
2.1.4 确认更改
2.1.4. To confirm the change
$ $GRID_HOME/bin/srvctl config scan
SCAN name: <scan>.oracle.com, Network: 1/10.x.x.0/255.255.255.0/eth1
SCAN VIP name: scan1, IP: /10.x.x.201/120.x.x.201
SCAN VIP name: scan2, IP: /10.x.x.202/120.x.x.202
SCAN VIP name: scan3, IP: /10.x.x.203/120.x.x.203
$ $GRID_HOME/bin/srvctl config scan_listener
SCAN Listener LISTENER_SCAN1 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN2 exists. Port: TCP:1521
SCAN Listener LISTENER_SCAN3 exists. Port: TCP:1521
2.2. 要将SCAN更改为在第二个网络上,请执行以下操作:
2.2. To change SCAN to be on second network:
默认情况下,SCAN将在第一个公共网络(ora.net1.network)上配置,但在多个公共网络环境中,SCAN可以在第二个或其他网络上运行。
By default, SCAN will be configured on first public network (ora.net1.network), however in multiple public network environment, SCAN can run on second or other network.
没有修改SCAN以使用非第一个网络、更改为第二个或其他网络、scan_listener和scan资源的选项,需要删除并重新添加。
There's no option to modify SCAN to use non-first network, to change to second or other network, scan_listener and scan resources need to be removed and added back.
在本例中,我们将SCAN从net1移动到net2
In this example, we'll move SCAN from net1 to net2
$ $GRID_HOME/bin/srvctl config network
Network exists: 1/10.x.x.0/255.255.255.128/eth3, type static
Network exists: 2/10.x.x.0/255.255.255.128/eth4, type static
您还可以在第二个网络中修改scan,如下面12.2所示
You can also modify the scan in the second network like below on 12.2
srvctl modify scan_listener -netnum 2 -update -invitednodes "node1,node2"
2.2.21 grid用户停止资源和移除scan_listener:
2.2.1. As grid user stop resources and remove scan_listener:
$ $GRID_HOME/bin/srvctl stop scan_listener $GRID_HOME/bin/srvctl stop scan
$ $GRID_HOME/bin/srvctl remove scan_listener -f
2.2.2 root用户移除和添加SCAN
2.2.2. As root user remove and add SCAN:
# $GRID_HOME/bin/srvctl remove scan -f
#$GRID_HOME/bin/srvctl add scan -n <scan-name> -k 2
更改SCAN名称后,将数据库init.ora/spfile参数remote_listener更新为新名称。
Once SCAN name is changed, update database init.ora/spfile parameter remote_listener to the new one.
2.2.3 grid用户添加scan_listener 和 start resources:
2.2.3. As grid user add scan_listener and start resources:
$ $GRID_HOME/bin/srvctl add scan_listener-p <port>
$ $GRID_HOME/bin/srvctl start scan_listener
B.修改SCAN监听端口
B. To modify SCAN listener port
grid用户执行:
As grid user:
1.修改SCAN监听端口
1. Modify SCAN listener port:
$GRID_HOME/bin/srvctl modify scan_listener -p <new-SCAN-port>
更新11gR2数据库init.ora参数:alter system set remote_listener='<SCAN-name>:<new-port-number>' scope=both;
Update 11gR2 database init.ora parameter: alter system set remote_listener='<SCAN-name>:<new-port-number>' scope=both;
2.重启SCAN listener,使得新端口生效
2. Restart SCAN listener so the new port will be effective:
$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl start scan_listener
3.确认更改
3. Confirm the change:
$GRID_HOME/bin/srvctl config scan_listener
##########################
How to Update the IP Address of the SCAN VIP Resources (ora.scan{n}.vip) (文档 ID 952903.1)
目标:
GOAL
本文档旨在解释如何更改11gR2 Grid Infrastructure/CRS及更高版本环境中与SCAN VIP相关的IP地址。
The purpose of this document is to explain how to change the IP addresses associated with the SCAN VIPs in 11gR2 Grid Infrastructure / CRS and higher environments.
与SCAN VIP资源关联的IP地址最初是在创建SCAN资源时设置的。
The IP addresses associated with the SCAN VIP resources are initially set when the SCAN resources are created.
对SCAN DNS条目的任何更改都不会自动传播到clusterware,需要手动完成。
Any changes to the DNS entry for the SCAN are not automatically propagated to the clusterware and need to be done manually.
这仅适用于不使用GNS的安装。
This applies only to installations that are not using GNS.
本说明中的信息在SCAN最初仅配置一个地址,现在扩展为容纳三个IP地址的情况下也很有用。
The information in this note can also be helpful in cases where SCAN was originally configured with just one address and is now being expanded to accommodate three IP addresses.
解决方案:
SOLUTION
在更改SCAN VIP之前,需要使用新的IP地址更新域名服务器(DNS)上的scan name条目。这通常由网络管理员完成。要检查当前设置,可以使用以下命令:
Before the SCAN VIPs can be changed, the entry for the SCAN name on the Domain Name Server (DNS) needs to be updated with the new IP addresses. This usually will be done by a network administrator. To check the current setting, the following command can be used:
nslookup <scan_name>
要检查SCAN VIP的当前IP地址,请以root用户身份运行以下命令:
To check the current IP address(es) of the SCAN VIPs, run the following commands as the root user:
$GRID_HOME/bin/srvctl config scan
停止SCAN listeners和SCAN
Stop the SCAN listeners and SCAN
$GRID_HOME/bin/srvctl stop scan_listener
$GRID_HOME/bin/srvctl stop scan
接下来使用DNS条目中的新IP地址刷新SCAN VIP:
Next refresh the SCAN VIPs with the new IP addresses from the DNS entry:
$GRID_HOME/bin/srvctl modify scan -n <scan_name
要检查SCAN VIP是否已更改,请运行以下命令,它现在应显示新的IP地址。
To check if the SCAN VIPs have been changed, run the following command, it should now show the new IP addresses.
$GRID_HOME/bin/srvctl config scan
Restart SCAN & SCAN listener:
$GRID_HOME/bin/srvctl start scan
$GRID_HOME/bin/srvctl start scan_listener
如果SCAN VIPs的数量已更改,则需要更新SCAN listener:
If the number of SCAN VIPs has changed, the SCAN listener needs to be updated:
$GRID_HOME/bin/srvctl modify scan_listener -u
下面是使用以下配置的示例:
Below is an example using the following configuration:
SCAN的名称为sales-SCAN.example.com
The name of the SCAN is sales-scan.example.com
公网子网为10.XXX.XXX.0
subnet of the public network is 10.XXX.XXX.0
公网子网掩码为255.XXX.XXX.0
netmask for the public network is 255.XXX.XXX.0
public接口名称为eth1
name of the public interface is eth1
old IP addresses: 10.XXX.XXX.81, 10.XXX.XXX.82 & 10.XXX.XXX.83
new IP addresses: 10.XXX.XXX.121, 10.XXX.XXX.122 & 10.XXX.XXX.123
停止和启动SCAN VIPs/listeners可以由网格用户完成,但是“srvctl modify SCAN”命令必须由root用户执行,因此作为root用户执行所有步骤是可行的。
Stopping & starting the SCAN VIPs/listeners can be done by the grid user, however the 'srvctl modify scan' command must be executed by root user, so it's practical to execute all steps as the root user.
DNS服务器上的SCAN查找显示条目已使用新IP地址更新:
A lookup of the SCAN on the DNS server shows that the entry has already been updated with the new IP addresses:
$ nslookup sales-scan.example.com
Server: dns1.example.com
Address: 10.XXX.XXX.70#53
Name: sales-scan.example.com
Address: 10.XXX.XXX.123
Name: sales-scan.example.com
Address: 10.XXX.XXX.122
Name: sales-scan.example.com
Address: 10.XXX.XXX.121
停止SCAN listener 和 the SCAN VIP 资源:
Stop the SCAN listener and the SCAN VIP resources:
# $GRID_HOME/bin/srvctl stop scan_listener
# $GRID_HOME/bin/srvctl stop scan
# $GRID_HOME/bin/srvctl status scan
SCAN VIP scan1 is enabled
SCAN VIP scan1 is not running
SCAN VIP scan2 is enabled
SCAN VIP scan2 is not running
SCAN VIP scan3 is enabled
SCAN VIP scan3 is not running
# $GRID_HOME/bin/srvctl status scan_listener
SCAN Listener LISTENER_SCAN1 is enabled
SCAN listener LISTENER_SCAN1 is not running
SCAN Listener LISTENER_SCAN2 is enabled
SCAN listener LISTENER_SCAN2 is not running
SCAN Listener LISTENER_SCAN3 is enabled
SCAN listener LISTENER_SCAN3 is not running
SCAN VIP resources仍然显示旧的地址
The SCAN VIP resources still show the old IP addresses:
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.XXX.XXX.0/255.XXX.XXX.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.XXX.XXX.81
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.XXX.XXX.82
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.XXX.XXX.83
现在通知CRS更新SCAN VIP resources
Now tell CRS to update the SCAN VIP resources:
# $GRID_HOME/bin/srvctl modify scan -n sales-scan.example.com
验证更改已成功,再次检查SCAN配置:
To verify that the change was successful, check the SCAN configuration again:
# $GRID_HOME/bin/srvctl config scan
SCAN name: sales-scan, Network: 1/10.XXX.XXX.0/255.XXX.XXX.0/eth1
SCAN VIP name: scan1, IP: /sales-scan.example.com/10.XXX.XXX.121
SCAN VIP name: scan2, IP: /sales-scan.example.com/10.XXX.XXX.122
SCAN VIP name: scan3, IP: /sales-scan.example.com/10.XXX.XXX.123
启动SCAN和SCAN监听:
Start SCAN and the SCAN listener:
# $GRID_HOME/bin/srvctl start scan
# $GRID_HOME/bin/srvctl start scan_listener
#####chenjuchao 2021-08-21 15:00#####
免责声明:本站发布的内容(图片、视频和文字)以原创、来自本网站内容采集于网络互联网转载等其它媒体和分享为主,内容观点不代表本网站立场,如侵犯了原作者的版权,请告知一经查实,将立刻删除涉嫌侵权内容,联系我们QQ:712375056,同时欢迎投稿传递力量。
- 上一篇新闻:
- 下一篇新闻:
最新资讯
相关推荐
- 100倍故障赔偿
- 1天无理由退款
- 7x24小时服务
- 0元快速备案
- 1V1专席秘书
Copyright © 2009-2022 56dr.com. All Rights Reserved. 特网科技 特网云 版权所有 特网科技 粤ICP备16109289号
域名注册服务机构:阿里云计算有限公司(万网) 域名服务机构:烟台帝思普网络科技有限公司(DNSPod) CDN服务:阿里云计算有限公司 百度云 中国互联网举报中心 增值电信业务经营许可证B2
建议您使用Chrome、Firefox、Edge、IE10及以上版本和360等主流浏览器浏览本网站