通过udev创建ASM共享磁盘(RAC)(3)

排查后发现是硬盘名称发生了变化,修改完相关配置文件(vim /etc/udev/rules.d/99-oracle-asmdisk.rules),CRS服务正常:

[grid@rac02 ~]$ 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

然后发现因为之前的异常操作,导致监听异常:

[grid@rac02 admin]$ lsnrctl status

   

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 25-NOV-2016 15:19:25

   

Copyright (c) 1991, 2013, Oracle. All rights reserved.

   

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=LISTENER)))

STATUS of the LISTENER

------------------------

Alias LISTENER

Version TNSLSNR for Linux: Version 11.2.0.4.0 - Production

Start Date 25-NOV-2016 15:11:22

Uptime 0 days 0 hr. 8 min. 2 sec

Trace Level off

Security ON: Local OS Authentication

SNMP OFF

Listener Parameter File /u01/app/11.2.0/grid/network/admin/listener.ora

Listener Log File /u01/app/11.2.0/grid/log/diag/tnslsnr/rac02/listener/alert/log.xml

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.2.209)(PORT=1521)))

Services Summary...

Service "+ASM" has 1 instance(s).

Instance "+ASM2", status READY, has 1 handler(s) for this service...

Service "rac" has 1 instance(s).

Instance "rac2", status READY, has 1 handler(s) for this service...

Service "racXDB" has 1 instance(s).

Instance "rac2", status READY, has 1 handler(s) for this service...

The command completed successfully

以节点1为例

修改两个节点的监听文件:

[root@rac01 ~]# su - grid

[grid@rac01 ~]$ cd /u01/app/11.2.0/grid/network/admin

[grid@rac01 admin]$ ls

endpoints_listener.ora listener.ora shrept.lst

endpoints_listener.ora.bak.rac01 listener.ora.bak.rac01 sqlnet.ora

listener16112111AM0504.bak samples

[grid@rac01 admin]$ vim endpoints_listener.ora

#HOST参数改为本机IP

LISTENER_RAC01=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=rac01-vip)(PORT=1521))(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.206)(PORT=1521)(IP=FIRST))))

修改TNS配置文件:

[oracle@rac01 ~]$ cd /u01/app/oracle/product/11.2.0/db_1/network/admin

[oracle@rac01 admin]$ ls

samples shrept.lst tnsnames.ora

[oracle@rac01 admin]$ vim tnsnames.ora

RAC =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = max-cluster)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = rac)

)

)

RAC1 =

(DESCRIPTION =

(ADDRESS = (PROTOCOL = TCP)(HOST = max-cluster)(PORT = 1521))

(CONNECT_DATA =

(SERVER = DEDICATED)

(SERVICE_NAME = rac)

)

)

修改hosts文件:

[root@rac01 ~]# vim /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost.localdomain localhost6 localhost6.localdomain6

   

#eth0 public ip

192.168.2.206 rac01

192.168.2.207 rac02

   

#eth1 private ip

192.168.3.206 rac01-priv

192.168.3.207 rac02-priv

   

#virtual ip

192.168.2.208 rac01-vip

192.168.2.209 rac02-vip

   

#scan ip

192.168.2.210 max-cluster

修改网卡信息:

[root@rac01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"

NM_CONTROLLED="yes"

ONBOOT=yes

HWADDR=00:0C:29:8F:C2:C6

BOOTPROTO=static

IPADDR=192.168.2.206

NETMASK=255.255.255.0

GATEWAY=192.168.2.1

DNS1=192.168.2.1

[root@rac01 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth1

DEVICE="eth1"

NM_CONTROLLED="yes"

ONBOOT=yes

HWADDR=00:0C:29:8F:C2:D0

BOOTPROTO=static

IPADDR=192.168.3.206

NETMASK=255.255.255.0

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/65280df01970cf8fa4f5b9012b7d9606.html