如何迁移Oracle 10g RAC ASM存储

使用VBOX模拟存储迁移的环境,OS:RHEL5.9,DB:Oracle 10.2.0.4 RAC ASM 2Nodes。

ASM使用Extern Redundancy,不使用ASM的rebalance功能,ocr和votedisk存放在raw里。

迁移包括controlfile,datafile,tempfile,spfile,ocr,votedisk。

迁移前路径

ocr               /dev/sdf1  /dev/raw/raw1,    /dev/sdf2  /dev/raw/raw2

votedisk          /dev/sdg1  /dev/raw/raw3,    /dev/sdg2  /dev/raw/raw4,    /dev/sdg3  /dev/raw/raw5

ASM    +DATA      /dev/sdb

ASM    +FRA       /dev/sdc

迁移后路径

ocr               /dev/sdh1  /dev/raw/raw6,    /dev/sdh2  /dev/raw/raw7

votedisk          /dev/sdi1  /dev/raw/raw8,    /dev/sdi2  /dev/raw/raw9,    /dev/sdi3  /dev/raw/raw10

ASM    +DATAFG    /dev/sdd

ASM    +FRADG     /dev/sde

迁移votedisk和ocr

[oracle@racdb1 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     497744

Used space (kbytes)      :       4360

Available space (kbytes) :     493384

ID                       :  803449477

Device/File Name         : /dev/raw/raw1

                           Device/File integrity check succeeded

Device/File Name         : /dev/raw/raw2

                           Device/File integrity check succeeded

    Cluster registry integrity check succeeded

[oracle@racdb1 ~]$

[oracle@racdb1 ~]$ crsctl query css votedisk

0.     0    /dev/raw/raw3

1.     0    /dev/raw/raw4

2.     0    /dev/raw/raw5

located 3 votedisk(s).

关闭RAC环境的crs

[root@racdb1 ~]# /etc/init.d/init.crs stop

Shutting down Oracle Cluster Ready Services (CRS):

Nov 24 16:06:49.700 | INF | daemon shutting down

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Shutdown has begun. The daemons should exit soon.

[root@racdb2 ~]# /etc/init.d/init.crs stop

Shutting down Oracle Cluster Ready Services (CRS):

Nov 24 16:07:11.360 | INF | daemon shutting down

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Shutdown has begun. The daemons should exit soon.

备份votedisk

[root@racdb1 ~]# dd if=/dev/raw/raw3 of=/u01/votedisk.bak

添加votedisk

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl add css votedisk /dev/raw/raw8 -force

Now formatting voting disk: /dev/raw/raw8

successful addition of votedisk /dev/raw/raw8.

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl add css votedisk /dev/raw/raw9 -force

Now formatting voting disk: /dev/raw/raw9

successful addition of votedisk /dev/raw/raw9.

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl add css votedisk /dev/raw/raw10 -force

Now formatting voting disk: /dev/raw/raw10

successful addition of votedisk /dev/raw/raw10.

删除旧的votedisk

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl delete css votedisk /dev/raw/raw3 -force

successful deletion of votedisk /dev/raw/raw3.

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl delete css votedisk /dev/raw/raw4 -force

successful deletion of votedisk /dev/raw/raw4.

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl delete css votedisk /dev/raw/raw5 -force

successful deletion of votedisk /dev/raw/raw5.

启动crs

[root@racdb1 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

[root@racdb2 ~]# /u01/app/oracle/product/10.2.0/db_1/bin/crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly

检查crs状态,votedisk路径

[oracle@racdb1 ~]$ crsctl check crs

CSS appears healthy

CRS appears healthy

EVM appears healthy

[oracle@racdb1 ~]$ crs_stat -t

Name           Type           Target    State     Host  

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

ora....SM1.asm application    ONLINE    ONLINE    racdb1

ora....B1.lsnr application    ONLINE    ONLINE    racdb1

ora.racdb1.gsd application    ONLINE    ONLINE    racdb1

ora.racdb1.ons application    ONLINE    ONLINE    racdb1

ora.racdb1.vip application    ONLINE    ONLINE    racdb1

ora....SM2.asm application    ONLINE    ONLINE    racdb2

ora....B2.lsnr application    ONLINE    ONLINE    racdb2

ora.racdb2.gsd application    ONLINE    ONLINE    racdb2

ora.racdb2.ons application    ONLINE    ONLINE    racdb2

ora.racdb2.vip application    ONLINE    ONLINE    racdb2

ora.zhongwc.db application    ONLINE    ONLINE    racdb2

ora....c1.inst application    ONLINE    ONLINE    racdb1

ora....c2.inst application    ONLINE    ONLINE    racdb2

ora.....zwc.cs application    ONLINE    ONLINE    racdb1

ora....wc1.srv application    ONLINE    ONLINE    racdb1

[oracle@racdb1 ~]$

[oracle@racdb1 ~]$ crsctl query css votedisk

0.     0    /dev/raw/raw8

1.     0    /dev/raw/raw9

2.     0    /dev/raw/raw10

located 3 votedisk(s).

备份ocr

[root@racdb1 bin]# /u01/app/oracle/product/10.2.0/crs/bin/ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     497744

Used space (kbytes)      :       4360

Available space (kbytes) :     493384

ID                       :  803449477

Device/File Name         : /dev/raw/raw1

                           Device/File integrity check succeeded

Device/File Name         : /dev/raw/raw2

                           Device/File integrity check succeeded

    Cluster registry integrity check succeeded

[root@racdb1 bin]#

[root@racdb1 bin]# /u01/app/oracle/product/10.2.0/crs/bin/ocrconfig -export /u01/ocr_bak -s online

迁移ocr

[root@racdb1 bin]# /u01/app/oracle/product/10.2.0/crs/bin/ocrconfig -replace ocr /dev/raw/raw6

[root@racdb1 bin]# /u01/app/oracle/product/10.2.0/crs/bin/ocrconfig -replace ocrmirror /dev/raw/raw7

check ocr

[oracle@racdb2 ~]$ ocrcheck

Status of Oracle Cluster Registry is as follows :

Version                  :          2

Total space (kbytes)     :     497744

Used space (kbytes)      :       4360

Available space (kbytes) :     493384

ID                       :  803449477

Device/File Name         : /dev/raw/raw6

                           Device/File integrity check succeeded

Device/File Name         : /dev/raw/raw7

                           Device/File integrity check succeeded

    Cluster registry integrity check succeeded

迁移datafile,controlfile,logfile,spfile

创建ASM DISKGROUP

asm_diskgroups='DATA','FRA','DATADG','FRADG'

[oracle@racdb1 ~]$ export ORACLE_SID=+ASM1

[oracle@racdb1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.4.0 - Production on Sun Nov 24 16:40:05 2013

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

Connected to:

Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production

With the Partitioning, Real Application Clusters, OLAP, Data Mining

and Real Application Testing options

SQL> col name for a8

SQL> col path for a15

SQL> select a.path,b.name,b.state from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number(+) order by 1;

PATH            NAME     STATE

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

/dev/asm-diskb  DATA     MOUNTED

/dev/asm-diskc  FRA      MOUNTED

/dev/asm-diskd

/dev/asm-diske

SQL> create diskgroup datadg external redundancy disk '/dev/asm-diskd';

Diskgroup created.

SQL> create diskgroup fradg external redundancy disk '/dev/asm-diske';

Diskgroup created.

SQL> select a.path,b.name,b.state from v$asm_disk a,v$asm_diskgroup b where a.group_number=b.group_number(+) order by 1;

PATH            NAME     STATE

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

时间: 2024-11-02 09:11:32

如何迁移Oracle 10g RAC ASM存储的相关文章

zt: 在linux上单机模拟Oracle 10g RAC集群(OCFS+ASM)

http://www.itpub.net/579479.html 本想做个安装记录,把遇到的错误和解决办法写下来,以备以后操作时参考,但在写的过程中阴错阳差地对付着把系统装上了,所以就当个安装说明吧,不过其中还有个错误(在下面有记录),感觉应该对使用有影响,所以以后还要想办法修正.这个就当个初稿吧. 一.简介 熟悉 Oracle 真正应用集群 (RAC) 10g 技术的最有效方法之一是访问一个实际的 Oracle RAC 10g 集群.没有什么方法比直接体验它们能够更好地理解其好处的了 - 包括

基于Linux (RHEL 5.5) 安装Oracle 10g RAC

    本文所描述的是在Red Hat 5.5下使用vmware server 来安装Oracle 10g RAC(OCFS + ASM),本文假定你的RHEL5已经安装完毕,下面列出的是对Linux的具体配置及安装过程. 一.安装环境 1.主机操作系统环境概况: 主机名 操作系统 处理器 内存 磁盘 网卡 robinson Windows XP Professional Service Pack 3 Intel酷睿2双核 1.6GHZ 3GB DDR2 667 MHz 500 GB, SATA

Oracle 10g RAC网络设置

在Oracle10g RAC的安装过程中,网络的设置需要谨慎,也极其重要. 以下将我的Oracle10g RAC环境的网络配置列举一下,供参考. 1.hosts文件的设置 由于RAC要设置多个地址,所以需要准备好网络环境,我的hosts文件设置如下: # # Internet host table # 127.0.0.1 localhost 172.16.19.11 db210-rac1 db210-rac1.hurray.com.cn loghost 172.16.19.211 db210-r

在Linux 6上使用UDEV解决RAC ASM存储设备名问题

连接:http://www.askmaclean.com/archives/%E5%9C%A8linux-6%E4%B8%8A%E4%BD%BF%E7%94%A8udev%E8%A7%A3%E5%86%B3rac-asm%E5%AD%98%E5%82%A8%E8%AE%BE%E5%A4%87%E5%90%8D%E9%97%AE%E9%A2%98.html Maclean一直是使用UDEV替代ASMLIB做RAC存储设备名绑定的拥护者,相关的专题文章可以作为读者的预读知识是:Why ASMLIB

Oracle 10g RAC RMAN备份异机单实例恢复

本文通过将Oracle 10g RAC RMAN的完整的备份进行异机恢复的过程,可以对在恢复的过程中可以发现备份时的一些问题.比如规档日志的冗余,控制文件与参数文件的自动备份的利用等,本示例是拿了rman的备份集进行备份的,所以在最后的启动数据库的过程中出现了问题,提示控制文件过旧等问题,所以备份需要经过详细高可用的设计,才能在恢复过程中降低风险. Oracle 11g R2 RAC on OEL5.8 x64安装笔记 http://koumm.blog.51cto.com/703525/128

安装好sles 10 sp3 + Oracle 10g RAC后CRS-1006和CRS-0215故障案例

安装好sles 10 sp3 + Oracle 10g RAC之后,在配置监听器时,总是提示主机bo2dbp上的监听服务已经在运行,忽略错误之后手动在bo2dbp节点上启,总是收到TNS-12545: Connect failed because target host or object does not exist错误信息.后来发现节点bo2dbp的vip总是漂移到另一节点bo2dbs上,原来这才是罪魁祸首 ?????? 1.集群环境netca之后,节点bo2dbp监听无法启动 手动尝试启动

RHEL 4.7下的Oracle 10g RAC到单实例的单向同步

GG同步参考: GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(一) http://blog.csdn.net/wildwave/article/details/7053768 GoldenGate配置实例:RHEL 4.7下的Oracle 10g RAC到单实例的单向同步(二) http://blog.csdn.net/wildwave/article/details/7056362 GoldenGate配置实例:RHEL 4.7下的Oracl

使用带dblink方式的datapump迁移Oracle 10g到11g

      对于从Oracle 10g下迁移数据库到Oracle 11g,除了使用RMAN方式之外,我们可以使用带dblink的datapump方式来实现基于逻辑上的迁移.其步骤也相对简单,而且不会产生中间过程生成的dump文件.本文即针对如何使用该方法给出了示例,供大家参考.   1.确保源数据库和目标数据库处于可用状态 --环境描述 --源库: mftst Oracle 10.2.0.3 + Enterprise Linux Enterprise Linux Server release 5

oracle 10g RAC集群安装部署的准备工作

一.基本环境需求 系统环境: 系统版本:RHEL5U8 x86_64 ORACLE版本:ORACLE 10.2.1 IP地址 odb1 192.168.100.144 192.168.101.144 odb2 192.168.100.143 192.168.101.143 服务器关闭Selinux/iptables 二.前期准备工作 修改两台计算机的主机名字 odb1 odb1-priv odb1-vip obd2 odb2-priv odb2-vip 配置yum源码,保证数据包都完整安装,or