您好,登錄后才能下訂單哦!
操作系統版本 : OEL5.4 x64
數據庫版本 : Oracle 10.2.0.5 x64 RAC
說明: 服務器主機名不能更改,如確實要改名,需要重裝CRS解決,還不如重新安裝呢。
本文環境是10g rac+ocfs+asm,心跳地址不變,IP地址因環境限制暫時采用同一個網段,不同的IP地址,但是過程與不同網段改名一致。
原IP地址:
192.168.0.6 node1 修改為: 192.168.0.206
192.168.0.7 node2 修改為: 192.168.0.207
192.168.0.8 node1-vip 修改為: 192.168.0.208
192.168.0.9 node2-vip 修改為: 192.168.0.209
10.10.10.10 node1-priv 不變
10.10.10.20 node2-priv 不變
調整后IP地址:
192.168.0.206 node1
192.168.0.207 node2
192.168.0.208 node1-vip
192.168.0.209 node2-vip
10.10.10.10 node1-priv
10.10.10.20 node2-priv
[root@node1 ~]# cd /u01/app/oracle/product/10.2.0/crs/bin
[root@node1 ~]# pwd
/u01/app/oracle/product/10.2.0/crs/bin
# 依次關閉數據庫, asm, node application, crs
[root@node1 bin]# ./srvctl stop database -d orcl
[root@node1 bin]# ./srvctl stop asm -n node1
[root@node1 bin]# ./srvctl stop asm -n node2
[root@node1 bin]# ./srvctl stop nodeapps -n node1
[root@node1 bin]# ./srvctl stop nodeapps -n node2
# 查看關閉情況
[root@node1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
ora.orcl.db application OFFLINE OFFLINE
ora....l1.inst application OFFLINE OFFLINE
ora....l2.inst application OFFLINE OFFLINE
#注:必須在所有(node1,node2)節點上root用戶執行。
[root@node1 bin]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@node2 bin]# /etc/init.d/init.crs stop
Shutting down Oracle Cluster Ready Services (CRS):
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
Shutdown has begun. The daemons should exit soon.
[root@node1 bin]# vi /etc/hosts
192.168.0.206 node1
192.168.0.207 node2
192.168.0.208 node1-vip
192.168.0.209 node2-vip
10.10.10.10 node1-priv
10.10.10.20 node2-priv
node1節點:
[root@node1 bin]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
HWADDR=00:0C:29:EA:C7:1F
IPADDR=192.168.0.206
NETMASK=255.255.255.0
ONBOOT=yes
node2節點:
[root@node2 bin]# more /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.207
NETMASK=255.255.255.0
HWADDR=00:0c:29:6c:08:aa
# service network restart
# service network restart
[root@node1 bin]# /etc/init.d/init.crs start
Startup will be queued to init within 30 seconds.
[root@node2 bin]# /etc/init.d/init.crs start
Startup will be queued to init within 30 seconds.
#由于IP地址還未修改完成,一些服務器無法啟動成功,需要關閉掉。
[root@node1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE OFFLINE
ora.node1.gsd application ONLINE OFFLINE
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE OFFLINE
ora.node2.gsd application ONLINE OFFLINE
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
ora.orcl.db application ONLINE OFFLINE
ora....l1.inst application ONLINE OFFLINE
ora....l2.inst application ONLINE OFFLINE
#關閉所有服務
[root@node1 bin]# ./srvctl stop database -d orcl
[root@node1 bin]# ./srvctl stop asm -n node1
[root@node1 bin]# ./srvctl stop asm -n node2
[root@node1 bin]# ./srvctl stop nodeapps -n node1
[root@node1 bin]# ./srvctl stop nodeapps -n node2
#確認關閉
[root@node1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application OFFLINE OFFLINE
ora....E1.lsnr application OFFLINE OFFLINE
ora.node1.gsd application OFFLINE OFFLINE
ora.node1.ons application OFFLINE OFFLINE
ora.node1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....E2.lsnr application OFFLINE OFFLINE
ora.node2.gsd application OFFLINE OFFLINE
ora.node2.ons application OFFLINE OFFLINE
ora.node2.vip application OFFLINE OFFLINE
ora.orcl.db application OFFLINE OFFLINE
ora....l1.inst application OFFLINE OFFLINE
ora....l2.inst application OFFLINE OFFLINE
[root@node1 bin]#
注: node1,node2上操作,如果修改的網段相同,可以不做,但是如果其它網段,可以按如下方式
#查看當前配置
[root@node1 bin]# ./oifcfg getif -global
eth0 192.168.0.0 global public
eth2 10.10.10.0 global cluster_interconnect
#刪除當前配置
[root@node1 bin]# ./oifcfg delif -global eth0
[root@node1 bin]# ./oifcfg delif -global eth2
[root@node1 bin]# ./oifcfg getif
#重新添加,內聯及心跳網段(對應IP地址子網掩碼配置網段)
[root@node1 bin]# ./oifcfg setif -global eth0/192.168.0.0:public
[root@node1 bin]# ./oifcfg setif -global eth2/10.10.10.0:cluster_interconnect
[root@node1 bin]# ./oifcfg getif
eth0 192.168.0.0 global public
eth2 10.10.10.0 global cluster_interconnect
[root@node1 bin]# ./oifcfg iflist
eth0 192.168.0.0
eth2 10.10.10.0
[root@node1 bin]# ./srvctl modify nodeapps -n node1 -A 192.168.0.208/255.255.255.0/eth0
[root@node1 bin]# ./srvctl modify nodeapps -n node2 -A 192.168.0.209/255.255.255.0/eth0
#查看原IP地址,修改為現在的IP地址。
[root@node1 bin]# vi /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
SID_LIST_LISTENER_NODE1 =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)
LISTENER_NODE1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = node1-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.0.206)(PORT = 1521)(IP = FIRST))
)
)
[root@node1 bin]# ./srvctl start nodeapps -n node1
[root@node1 bin]# ./srvctl start nodeapps -n node2
[root@node1 bin]# ./srvctl start asm -n node1
[root@node1 bin]# ./srvctl start asm -n node2
[root@node1 bin]# ./srvctl start instance -d orcl -i orcl1
[root@node1 bin]# ./srvctl start instance -d orcl -i orcl2
[root@node1 bin]# ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....SM1.asm application ONLINE ONLINE node1
ora....E1.lsnr application ONLINE ONLINE node1
ora.node1.gsd application ONLINE ONLINE node1
ora.node1.ons application ONLINE ONLINE node1
ora.node1.vip application ONLINE ONLINE node1
ora....SM2.asm application ONLINE ONLINE node2
ora....E2.lsnr application ONLINE ONLINE node2
ora.node2.gsd application ONLINE ONLINE node2
ora.node2.ons application ONLINE ONLINE node2
ora.node2.vip application ONLINE ONLINE node2
ora.orcl.db application ONLINE ONLINE node2
ora....l1.inst application ONLINE ONLINE node1
ora....l2.inst application ONLINE ONLINE node2
若啟動出現問題,再進行判斷 。
[root@node1 bin]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:EA:C7:1F
inet addr:192.168.0.206 Bcast:192.168.0.255 Mask:255.255.255.0
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:EA:C7:1F
inet addr:192.168.0.208 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 00:0C:29:EA:C7:29
inet addr:10.10.10.10 Bcast:10.10.10.255 Mask:255.255.255.0
[root@node2 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:6C:08:AA
inet addr:192.168.0.207 Bcast:192.168.0.255 Mask:255.255.255.0
eth0:1 Link encap:Ethernet HWaddr 00:0C:29:6C:08:AA
inet addr:192.168.0.209 Bcast:192.168.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
eth2 Link encap:Ethernet HWaddr 00:0C:29:6C:08:B4
inet addr:10.10.10.20 Bcast:10.10.10.255 Mask:255.255.255.0
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。