集群的ip和主机名修改总结

集群的ip和主机名修改总结(对于一体机不适用):
  IP修改
  修改公网ip,或者vip,priv-ip。不修改网卡信息。
  a.同网段
    1.关闭crs 2.网络层面修改(DNS和/etc/hosts)3.重启crs即可
    修改scan-ip需要多执行下列操作:
    [root@lxtrac05 bin]# ./srvctl stop scan_listener
    [root@lxtrac05 bin]# ./srvctl stop scan
    [root@lxtrac05 bin]# ./srvctl modify scan -n ora12cdb-scan
    [grid@lxtrac05 ~]$ srvctl modify scan_listener -u
    [grid@lxtrac05 ~]$ srvctl start scan
    [grid@lxtrac05 ~]$ srvctl start scan_listener

  b.不同网段
    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>]]
    [grid@lxtrac05 ~]$ oifcfg iflist -p -n //查看系统目前有哪些ip
    eth0 10.10.10.0 PRIVATE 255.255.255.0
    eth1 192.168.10.0 PRIVATE 255.255.255.0
    [grid@lxtrac05 ~]$
    [grid@lxtrac05 ~]$ oifcfg setif -global eth0/10.10.10.0:public
    [grid@lxtrac05 ~]$ oifcfg setif -global eth1/192.168.10.0:cluster_interconnect
    [grid@lxtrac05 ~]$ oifcfg getif
    eth0 172.32.231.0 global public
    eth1 192.168.0.0 global cluster_interconnect
    eth0 10.10.10.0 global public
    eth1 192.168.10.0 global cluster_interconnect
    [grid@lxtrac05 ~]$
    2.网络层面修改(DNS和/etc/hosts)
    3.重启crs
    4.修改crs中的信息srvctl modify nodeapps
    [root@lxtrac05 bin]# ./srvctl modify nodeapps -n lxtrac05 -A 10.10.10.4/255.255.255.0/eth0
    [root@lxtrac05 bin]#
    5.更新scan
    修改scan-ip需要多执行下列操作:
    [root@lxtrac05 bin]# ./srvctl stop scan_listener
    [root@lxtrac05 bin]# ./srvctl stop scan
    [root@lxtrac05 bin]# ./srvctl modify scan -n ora12cdb-scan
    [grid@lxtrac05 ~]$ srvctl modify scan_listener -u
    [grid@lxtrac05 ~]$ srvctl start scan
    [grid@lxtrac05 ~]$ srvctl start scan_listener
    6.删除旧的公/私网信息

  网卡名修改(和修改不同网段的类似):
    1.使用oifcfg工具添加新的网卡
    2.重启网络
    3.重启crs
    4.crs层面修改
    srvctl config nodeapps -a
    srvctl modify nodeapps -h


  priv主机名(11.2之后)/vip主机名/scan主机名修改
    1.priv可直接修改,然后重启crs即可
    2.vip主机名。不用重启crs
    修改/etc/hosts
    [root@lxtrac05 bin]# ./crsctl stat res ora.lxtrac05.vip -p |grep USR_ORA_VIP
    GEN_USR_ORA_VIP=
    USR_ORA_VIP=lxtrac05-vip
    [root@lxtrac05 bin]# ./crsctl modify res ora.lxtrac05.vip -attr USR_ORA_VIP=lxtrac15-vip
    [root@lxtrac05 bin]# ./crsctl modify res ora.lxtrac06.vip -attr USR_ORA_VIP=lxtrac16-vip
    3.修改scan主机名(和修改scan-ip的步骤一致),不用重启crs
    修改数据库中的remote_listener参数

下面例子:
修改一套集群(除公网主机名的其它资源)
os版本:oracle linux 5.5
db版本:11.2.0.4
修改前的ip信息
[root@lxtrac05 network-scripts]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

#PUBLIC
10.10.10.2 lxtrac05.iris.cl.sh.cos lxtrac05
10.10.10.3 lxtrac06.iris.cl.sh.cos lxtrac06

#VIP
10.10.10.4 lxtrac15-vip.iris.cl.sh.cos lxtrac15-vip
10.10.10.5 lxtrac16-vip.iris.cl.sh.cos lxtrac16-vip

# PRIVATE
192.168.10.5 lxtrac15-priv.iris.cl.sh.cos lxtrac15-priv
192.168.10.6 lxtrac16-priv.iris.cl.sh.cos lxtrac16-priv
#scan
10.10.10.6 ora12cdb-scan.iris.cl.sh.cos ora12cdb-scan
[root@lxtrac05 network-scripts]#


修改后的目标ip信息
[root@lxtrac05 network-scripts]# cat /etc/hosts.bak
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

#eth0 - PUBLIC
172.32.231.239 lxtrac05.iris.cl.sh.cos lxtrac05
172.32.231.240 lxtrac06.iris.cl.sh.cos lxtrac06
#VIP
172.32.231.241 lxtrac05-vip.iris.cl.sh.cos lxtrac05-vip
172.32.231.242 lxtrac06-vip.iris.cl.sh.cos lxtrac06-vip
#PRIVATE
192.168.0.3 lxtrac05-priv.iris.cl.sh.cos lxtrac05-priv
192.168.0.4 lxtrac06-priv.iris.cl.sh.cos lxtrac06-priv

#scan
172.32.231.238 ora12cdb-scan.iris.cl.sh.cos ora12cdb-scan
[root@lxtrac05 network-scripts]#

 

 

1.添加修改后的私网信息和公网信息
  [grid@lxtrac05 ~]$ oifcfg getif
  eth0 10.10.10.0 global public
  eth1 192.168.10.0 global cluster_interconnect
  [grid@lxtrac05 ~]$ oifcfg setif -global eth0/172.32.231.0:public
  [grid@lxtrac05 ~]$ oifcfg setif -global eth1/192.168.0.0:cluster_interconnect
  [grid@lxtrac05 ~]$ oifcfg getif
  eth0 10.10.10.0 global public
  eth1 192.168.10.0 global cluster_interconnect
  eth0 172.32.231.0 global public <<<<<新添加的公网
  eth1 192.168.0.0 global cluster_interconnect <<<<<新添加的私网
  [grid@lxtrac05 ~]$
2.关闭crs,修改网络,重启集群
  关闭节点1crs
  [root@lxtrac05 bin]# ./crsctl stop crs
  CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.crsd' on 'lxtrac05'
  CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.cvu' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.erwa.db' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.registry.acfs' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.srw.db' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.oc4j' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac05'
  CRS-2677: Stop of 'ora.cvu' on 'lxtrac05' succeeded
  CRS-2672: Attempting to start 'ora.cvu' on 'lxtrac06'
  CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.lxtrac05.vip' on 'lxtrac05'
  CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.scan1.vip' on 'lxtrac05'
  CRS-2676: Start of 'ora.cvu' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.registry.acfs' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.lxtrac05.vip' on 'lxtrac05' succeeded
  CRS-2672: Attempting to start 'ora.lxtrac05.vip' on 'lxtrac06'
  CRS-2677: Stop of 'ora.srw.db' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.DATA.dg' on 'lxtrac05'
  CRS-2677: Stop of 'ora.scan1.vip' on 'lxtrac05' succeeded
  CRS-2672: Attempting to start 'ora.scan1.vip' on 'lxtrac06'
  CRS-2676: Start of 'ora.lxtrac05.vip' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.oc4j' on 'lxtrac05' succeeded
  CRS-2672: Attempting to start 'ora.oc4j' on 'lxtrac06'
  CRS-2676: Start of 'ora.scan1.vip' on 'lxtrac06' succeeded
  CRS-2672: Attempting to start 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac06'
  CRS-2677: Stop of 'ora.erwa.db' on 'lxtrac05' succeeded
  CRS-2676: Start of 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.DATA.dg' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.asm' on 'lxtrac05'
  CRS-2677: Stop of 'ora.asm' on 'lxtrac05' succeeded
  CRS-2676: Start of 'ora.oc4j' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.ons' on 'lxtrac05'
  CRS-2677: Stop of 'ora.ons' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.net1.network' on 'lxtrac05'
  CRS-2677: Stop of 'ora.net1.network' on 'lxtrac05' succeeded
  CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'lxtrac05' has completed
  CRS-2677: Stop of 'ora.crsd' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.mdnsd' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.crf' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.ctssd' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.evmd' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.asm' on 'lxtrac05'
  CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'lxtrac05'
  CRS-2677: Stop of 'ora.mdnsd' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.evmd' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.crf' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.ctssd' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.asm' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'lxtrac05'
  CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.cssd' on 'lxtrac05'
  CRS-2677: Stop of 'ora.drivers.acfs' on 'lxtrac05' succeeded
  CRS-2677: Stop of 'ora.cssd' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.gipcd' on 'lxtrac05'
  CRS-2677: Stop of 'ora.gipcd' on 'lxtrac05' succeeded
  CRS-2673: Attempting to stop 'ora.gpnpd' on 'lxtrac05'
  CRS-2677: Stop of 'ora.gpnpd' on 'lxtrac05' succeeded
  CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lxtrac05' has completed
  CRS-4133: Oracle High Availability Services has been stopped.
  [root@lxtrac05 bin]#
  关闭节点2crs
  [root@lxtrac06 bin]# ./crsctl stop crs
  CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.crsd' on 'lxtrac06'
  CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.cvu' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.lxtrac05.vip' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac06'
  CRS-2677: Stop of 'ora.cvu' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.scan1.vip' on 'lxtrac06'
  CRS-2677: Stop of 'ora.lxtrac05.vip' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.lxtrac06.vip' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.registry.acfs' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.DATA.dg' on 'lxtrac06'
  CRS-2677: Stop of 'ora.registry.acfs' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.scan1.vip' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.lxtrac06.vip' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.oc4j' on 'lxtrac06'
  CRS-2677: Stop of 'ora.DATA.dg' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.asm' on 'lxtrac06'
  CRS-2677: Stop of 'ora.asm' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.oc4j' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.ons' on 'lxtrac06'
  CRS-2677: Stop of 'ora.ons' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.net1.network' on 'lxtrac06'
  CRS-2677: Stop of 'ora.net1.network' on 'lxtrac06' succeeded
  CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'lxtrac06' has completed
  CRS-2677: Stop of 'ora.crsd' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.ctssd' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.evmd' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.asm' on 'lxtrac06'
  CRS-2673: Attempting to stop 'ora.mdnsd' on 'lxtrac06'
  CRS-2677: Stop of 'ora.evmd' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.mdnsd' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.ctssd' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.asm' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'lxtrac06'
  CRS-2677: Stop of 'ora.drivers.acfs' on 'lxtrac06' succeeded
  CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.cssd' on 'lxtrac06'
  CRS-2677: Stop of 'ora.cssd' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.crf' on 'lxtrac06'
  CRS-2677: Stop of 'ora.crf' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.gipcd' on 'lxtrac06'
  CRS-2677: Stop of 'ora.gipcd' on 'lxtrac06' succeeded
  CRS-2673: Attempting to stop 'ora.gpnpd' on 'lxtrac06'
  CRS-2677: Stop of 'ora.gpnpd' on 'lxtrac06' succeeded
  CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'lxtrac06' has completed
  CRS-4133: Oracle High Availability Services has been stopped.
  [root@lxtrac06 bin]#
  修改/etc/hosts文件
  [root@lxtrac05 network-scripts]# cat /etc/hosts
  # Do not remove the following line, or various programs
  # that require network functionality will fail.
  127.0.0.1 localhost.localdomain localhost
  ::1 localhost6.localdomain6 localhost6

  ##PUBLIC
  #10.10.10.2 lxtrac05.iris.cl.sh.cos lxtrac05
  #10.10.10.3 lxtrac06.iris.cl.sh.cos lxtrac06

  ##VIP
  #10.10.10.4 lxtrac15-vip.iris.cl.sh.cos lxtrac15-vip
  #10.10.10.5 lxtrac16-vip.iris.cl.sh.cos lxtrac16-vip

  ## PRIVATE
  #192.168.10.5 lxtrac15-priv.iris.cl.sh.cos lxtrac15-priv
  #192.168.10.6 lxtrac16-priv.iris.cl.sh.cos lxtrac16-priv
  ##scan
  #10.10.10.6 ora12cdb-scan.iris.cl.sh.cos ora12cdb-scan

  #eth0 - PUBLIC
  172.32.231.239 lxtrac05.iris.cl.sh.cos lxtrac05
  172.32.231.240 lxtrac06.iris.cl.sh.cos lxtrac06
  #VIP
  172.32.231.241 lxtrac05-vip.iris.cl.sh.cos lxtrac05-vip
  172.32.231.242 lxtrac06-vip.iris.cl.sh.cos lxtrac06-vip
  #PRIVATE
  192.168.0.3 lxtrac05-priv.iris.cl.sh.cos lxtrac05-priv
  192.168.0.4 lxtrac06-priv.iris.cl.sh.cos lxtrac06-priv

  #scan
  172.32.231.238 ora12cdb-scan.iris.cl.sh.cos ora12cdb-scan
  [root@lxtrac05 network-scripts]# scp /etc/hosts lxtrac06:/etc/hosts
  hosts 100% 603 0.6KB/s 00:00
  [root@lxtrac05 network-scripts]#
  修改网络信息:
  [root@lxtrac05 network-scripts]# cat ifcfg-eth0
  # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
  DEVICE=eth0
  ONBOOT=yes
  HWADDR=00:50:56:85:75:e4
  BOOTPROTO=none
  #IPADDR=10.10.10.2
  IPADDR=172.32.231.239 <<<<<<修改为新的ip
  NETMASK=255.255.255.0
  #GATEWAY=172.32.231.193
  TYPE=Ethernet
  USERCTL=no
  ONBOOT=yes
  HOTPLUG=no
  DHCP_HOSTNAME=lxtrac05
  [root@lxtrac05 network-scripts]#
  [root@lxtrac05 network-scripts]# cat ifcfg-eth1
  # Intel Corporation 82545EM Gigabit Ethernet Controller (Copper)
  DEVICE=eth1
  HWADDR=00:50:56:85:3a:a7
  BOOTPROTO=none
  ONBOOT=yes
  HOTPLUG=no
  TYPE=Ethernet
  #IPADDR=192.168.10.5
  IPADDR=192.168.0.3 <<<<<<修改为新的ip
  NETMASK=255.255.255.0
  #NETWORK=192.168.0.0
  USERCTL=no
  IPV6INIT=no

  [root@lxtrac05 network-scripts]#
  [root@lxtrac05 network-scripts]# service network restart
  Shutting down interface eth0: [ OK ]
  Shutting down interface eth1: [ OK ]
  Shutting down loopback interface: [ OK ]
  Bringing up loopback interface: [ OK ]
  Bringing up interface eth0: [ OK ]
  Bringing up interface eth1: [ OK ]
  [root@lxtrac05 network-scripts]#
  [root@lxtrac05 network-scripts]# ifconfig -a
  eth0 Link encap:Ethernet HWaddr 00:50:56:85:75:E4
  inet addr:172.32.231.239 Bcast:172.32.231.255 Mask:255.255.255.0 <<<<<<<ip地址已经是最新的地址
  inet6 addr: fe80::250:56ff:fe85:75e4/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  RX packets:92749516 errors:0 dropped:0 overruns:0 frame:0
  TX packets:32859053 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:15808693008 (14.7 GiB) TX bytes:22736811058 (21.1 GiB)

  eth1 Link encap:Ethernet HWaddr 00:50:56:85:3A:A7
  inet addr:192.168.0.3 Bcast:192.168.0.255 Mask:255.255.255.0 <<<<<<<ip地址已经是最新的地址
  inet6 addr: fe80::250:56ff:fe85:3aa7/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
  RX packets:4769124667 errors:0 dropped:0 overruns:0 frame:0
  TX packets:4636066651 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000
  RX bytes:1366959409381 (1.2 TiB) TX bytes:1332550914460 (1.2 TiB)

  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:65058861 errors:0 dropped:0 overruns:0 frame:0
  TX packets:65058861 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:67503729437 (62.8 GiB) TX bytes:67503729437 (62.8 GiB)

  sit0 Link encap:IPv6-in-IPv4
  NOARP MTU:1480 Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

  You have mail in /var/spool/mail/root
  [root@lxtrac05 network-scripts]#
  测试环境由于没有使用dns。相关dns的信息没有记录(dns需要修改正解和反解信息)
  节点2做同样的修改。
  重启集群:
  [root@lxtrac05 bin]# ./crsctl start crs
  CRS-4123: Oracle High Availability Services has been started.
  [root@lxtrac05 bin]#
  [root@lxtrac06 bin]# ./crsctl start crs
  CRS-4123: Oracle High Availability Services has been started.
  [root@lxtrac06 bin]#
3.检查集群启动情况
  [root@lxtrac05 bin]# ./crsctl check crs <<<<<<<<<集群成功启动
  CRS-4638: Oracle High Availability Services is online
  CRS-4537: Cluster Ready Services is online
  CRS-4529: Cluster Synchronization Services is online
  CRS-4533: Event Manager is online
  [root@lxtrac05 bin]# ./crsctl stat res -t -init
  --------------------------------------------------------------------------------
  NAME TARGET STATE SERVER STATE_DETAILS
  --------------------------------------------------------------------------------
  Cluster Resources
  --------------------------------------------------------------------------------
  ora.asm
  1 ONLINE ONLINE lxtrac05 Started
  ora.cluster_interconnect.haip
  1 ONLINE ONLINE lxtrac05
  ora.crf
  1 ONLINE ONLINE lxtrac05
  ora.crsd
  1 ONLINE ONLINE lxtrac05
  ora.cssd
  1 ONLINE ONLINE lxtrac05
  ora.cssdmonitor
  1 ONLINE ONLINE lxtrac05
  ora.ctssd
  1 ONLINE ONLINE lxtrac05 OBSERVER
  ora.diskmon
  1 OFFLINE OFFLINE
  ora.drivers.acfs
  1 ONLINE ONLINE lxtrac05
  ora.evmd
  1 ONLINE ONLINE lxtrac05
  ora.gipcd
  1 ONLINE ONLINE lxtrac05
  ora.gpnpd
  1 ONLINE ONLINE lxtrac05
  ora.mdnsd
  1 ONLINE ONLINE lxtrac05
  [root@lxtrac05 bin]#
  下面相关的listener没有启动成功,是由于我们修改了vip主机名。
  [root@lxtrac05 bin]# ./crsctl stat res -t
  --------------------------------------------------------------------------------
  NAME TARGET STATE SERVER STATE_DETAILS
  --------------------------------------------------------------------------------
  Local Resources
  --------------------------------------------------------------------------------
  ora.DATA.dg
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  ora.LISTENER.lsnr <<<<<<<<listener没启动
  ONLINE OFFLINE lxtrac05
  ONLINE OFFLINE lxtrac06
  ora.asm
  ONLINE ONLINE lxtrac05 Started
  ONLINE ONLINE lxtrac06 Started
  ora.gsd
  OFFLINE OFFLINE lxtrac05
  OFFLINE OFFLINE lxtrac06
  ora.net1.network <<<<<<<<network没启动
  ONLINE OFFLINE lxtrac05
  ONLINE OFFLINE lxtrac06
  ora.ons
  ONLINE OFFLINE lxtrac05
  ONLINE OFFLINE lxtrac06
  ora.registry.acfs
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  -------------------------------------------------------------------------------
  Cluster Resources
  --------------------------------------------------------------------------------
  ora.LISTENER_SCAN1.lsnr <<<<<<<<scan listener没启动
  1 ONLINE OFFLINE
  ora.cvu
  1 ONLINE OFFLINE
  ora.erwa.db
  1 ONLINE ONLINE lxtrac05 Open
  ora.lxtrac05.vip <<<<<<<<vip没启动
  1 ONLINE OFFLINE
  ora.lxtrac06.vip <<<<<<<<vip没启动
  1 ONLINE OFFLINE
  ora.oc4j
  1 ONLINE ONLINE lxtrac05
  ora.scan1.vip <<<<<<<<scan vip没启动
  1 ONLINE OFFLINE
  ora.srw.db
  1 ONLINE ONLINE lxtrac05 Open
  2 OFFLINE OFFLINE Instance Shutdown
  You have mail in /var/spool/mail/root
  [root@lxtrac05 bin]#
  修改nodeapps中的信息
  [root@lxtrac05 bin]# ./srvctl config nodeapps
  Network exists: 1/10.10.10.0/255.255.255.0/eth0, type static <<<<<网络段不对
  VIP exists: /lxtrac05-vip/172.32.231.241/10.10.10.0/255.255.255.0/eth0, hosting node lxtrac05
  VIP exists: /lxtrac06-vip/172.32.231.242/10.10.10.0/255.255.255.0/eth0, hosting node lxtrac06
  GSD exists
  ONS exists: Local port 6100, remote port 6200, EM port 2016
  [root@lxtrac05 bin]#
  [root@lxtrac05 bin]# ./srvctl modify nodeapps -n lxtrac05 -A 172.32.231.241/255.255.255.0/eth0
  [root@lxtrac05 bin]# ./srvctl modify nodeapps -n lxtrac06 -A 172.32.231.242/255.255.255.0/eth0
  [root@lxtrac05 bin]# ./srvctl config nodeapps
  Network exists: 1/172.32.231.0/255.255.255.0/eth0, type static
  VIP exists: /172.32.231.241/172.32.231.241/172.32.231.0/255.255.255.0/eth0, hosting node lxtrac05
  VIP exists: /172.32.231.242/172.32.231.242/172.32.231.0/255.255.255.0/eth0, hosting node lxtrac06
  GSD exists
  ONS exists: Local port 6100, remote port 6200, EM port 2016
  You have mail in /var/spool/mail/root
  [root@lxtrac05 bin]#
  使用crsctl修改vip相关信息。
  [root@lxtrac05 bin]# ./crsctl stat res ora.lxtrac05.vip -p|grep -i USR_ORA_VIP
  GEN_USR_ORA_VIP=
  USR_ORA_VIP=lxtrac15-vip <<<<<<<此处vip还是旧的vip信息
  [root@lxtrac05 bin]# ./crsctl modify res ora.lxtrac05.vip -attr USR_ORA_VIP=lxtrac05-vip <<<<<修改为新的vip信息并查看
  [root@lxtrac05 bin]# ./crsctl stat res ora.lxtrac05.vip -p|grep -i USR_ORA_VIP
  GEN_USR_ORA_VIP=
  USR_ORA_VIP=lxtrac05-vip <<<<<<<此处vip信息已修改
  [root@lxtrac05 bin]# ./crsctl modify res ora.lxtrac06.vip -attr USR_ORA_VIP=lxtrac06-vip <<<<<同理修改为节点2vip信息
  [root@lxtrac05 bin]# ./crsctl stat res ora.lxtrac06.vip -p|grep -i USR_ORA_VIP
  GEN_USR_ORA_VIP=
  USR_ORA_VIP=lxtrac06-vip
  [root@lxtrac05 bin]#

  重启vip资源: vip资源已重启成功
  [root@lxtrac05 bin]# ./crsctl start res ora.lxtrac05.vip
  CRS-2672: Attempting to start 'ora.lxtrac05.vip' on 'lxtrac05'
  CRS-2676: Start of 'ora.lxtrac05.vip' on 'lxtrac05' succeeded
  CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'lxtrac05'
  CRS-2676: Start of 'ora.LISTENER.lsnr' on 'lxtrac05' succeeded
  [root@lxtrac05 bin]#
  [root@lxtrac05 bin]# ifconfig -a|grep -A1 eth0
  eth0 Link encap:Ethernet HWaddr 00:50:56:85:75:E4
  inet addr:172.32.231.239 Bcast:172.32.231.255 Mask:255.255.255.0
  --
  eth0:1 Link encap:Ethernet HWaddr 00:50:56:85:75:E4
  inet addr:172.32.231.241 Bcast:172.32.231.255 Mask:255.255.255.0
  --
  eth0:2 Link encap:Ethernet HWaddr 00:50:56:85:75:E4
  inet addr:10.10.10.6 Bcast:10.10.10.255 Mask:255.255.255.0 <<<<<<scan listener还未修改
  [root@lxtrac05 bin]#
  更新scan listener
  [root@lxtrac05 bin]# ./srvctl stop scan_listener
  [root@lxtrac05 bin]# ./srvctl stop scan
  [root@lxtrac05 bin]# ./srvctl modify scan -n ora12cdb-scan
  [grid@lxtrac05 ~]$ srvctl modify scan_listener -u
  [grid@lxtrac05 ~]$ srvctl start scan
  [grid@lxtrac05 ~]$ srvctl start scan_listener

  [root@lxtrac05 bin]# ifconfig -a|grep -A1 eth0
  eth0 Link encap:Ethernet HWaddr 00:50:56:85:18:1B
  inet addr:172.32.231.240 Bcast:172.32.231.255 Mask:255.255.255.0
  --
  eth0:1 Link encap:Ethernet HWaddr 00:50:56:85:18:1B
  inet addr:172.32.231.242 Bcast:172.32.231.255 Mask:255.255.255.0
  --
  eth0:2 Link encap:Ethernet HWaddr 00:50:56:85:18:1B
  inet addr:172.32.231.238 Bcast:172.32.231.255 Mask:255.255.255.0
  [root@lxtrac05 bin]#

  ======修改结束
  [root@lxtrac05 bin]# ./crsctl stat res -t
  --------------------------------------------------------------------------------
  NAME TARGET STATE SERVER STATE_DETAILS
  --------------------------------------------------------------------------------
  Local Resources
  --------------------------------------------------------------------------------
  ora.DATA.dg
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  ora.LISTENER.lsnr
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  ora.asm
  ONLINE ONLINE lxtrac05 Started
  ONLINE ONLINE lxtrac06 Started
  ora.gsd
  OFFLINE OFFLINE lxtrac05
  OFFLINE OFFLINE lxtrac06
  ora.net1.network
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  ora.ons
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  ora.registry.acfs
  ONLINE ONLINE lxtrac05
  ONLINE ONLINE lxtrac06
  --------------------------------------------------------------------------------
  Cluster Resources
  --------------------------------------------------------------------------------
  ora.LISTENER_SCAN1.lsnr
  1 ONLINE ONLINE lxtrac05
  ora.cvu
  1 ONLINE ONLINE lxtrac06
  ora.erwa.db
  1 ONLINE ONLINE lxtrac05 Open
  ora.lxtrac05.vip
  1 ONLINE ONLINE lxtrac05
  ora.lxtrac06.vip
  1 ONLINE ONLINE lxtrac06
  ora.oc4j
  1 ONLINE ONLINE lxtrac06
  ora.scan1.vip
  1 ONLINE ONLINE lxtrac05
  ora.srw.db
  1 ONLINE ONLINE lxtrac05 Open
  2 OFFLINE OFFLINE Instance Shutdown
  [root@lxtrac05 bin]#


转载于:https://www.cnblogs.com/erwadba/p/8073128.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值