Linux x86平台下Oracle 10.2.0.1 ORA-27094
转载请注明原文:http://xunzhaoxz.itpub.net/post/40016/508767
本文PDF下载http://xunzhaoxz.itpub.net/resource/40016/30981
一、环境说明
Oracle源主机 | Oracle目标主机 | |
主机平台 | RHEL5.4 2.6.18-164.el5 | RHEL5.4 2.6.18-164.el5 |
主机名 | olddbser | newdbser |
DB name | oradb | oradb |
实例名 | oradb | oradb |
Oracle版本 | 10.2.0.1 | 10.2.0.1 |
Oracle数据文件存储 | Filesystem | LVM RAW LV |
单机或RAC | 单机 | 单机 |
在以上环境下使用rman进行数据库迁移,在数据restore datafile步骤出现本案例。
二、 问题描述
将之前在olddbser上做好的备份集ftp到ndwdbser上,安装oracle software only,重建密码文件、恢复参数文件、控制文件等都已顺利完成,到restore datafile步骤时出现如下错误:
关键信息:
ORA-19870: error reading backup piece /oracle/oradb-20101109-1flshds1_1_1.rman
ORA-19504: failed to create file "/oracle/oradata/oradb/system_1g"
ORA-27094: raw volume used can damage partition table
Additional information: -2
Additional information: 1073741824
[@more@]完整日志如下:
RMAN> @/oracle/restore_raw.rman
RMAN> run
2> {
3> SET NEWNAME FOR DATAFILE
'/oracle/oradata/ORADB/datafile/o1_mf_users_6ccmb0x6_.dbf'
TO '/oracle/oradata/oradb/user_128m';
4> SET NEWNAME FOR DATAFILE
'/oracle/oradata/ORADB/datafile/o1_mf_sysaux_6ccmb0pf_.dbf'
TO '/oracle/oradata/oradb/sysaux_512m';
5> SET NEWNAME FOR DATAFILE
'/oracle/oradata/ORADB/datafile/o1_mf_undotbs1_6ccmb0w4_.dbf'
TO '/oracle/oradata/oradb/undo01_512m';
6> SET NEWNAME FOR DATAFILE
'/oracle/oradata/ORADB/datafile/o1_mf_system_6ccmb0oy_.dbf'
TO '/oracle/oradata/oradb/system_1g';
7> set until scn 556840;
8> restore database;
9> switch datafile all;
10> recover database;
11> }
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET until clause
Starting restore at 2010-11-09 20:13:58
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: starting datafile backupset restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to /oracle/oradata/oradb/system_1g
restoring datafile 00002 to /oracle/oradata/oradb/undo01_512m
restoring datafile 00003 to /oracle/oradata/oradb/sysaux_512m
restoring datafile 00004 to /oracle/oradata/oradb/user_128m
channel ORA_DISK_1: reading from backup piece /oracle/oradb-20101109-1flshds1_1_1.rman
ORA-19870: error reading backup piece /oracle/oradb-20101109-1flshds1_1_1.rman
ORA-19504: failed to create file "/oracle/oradata/oradb/system_1g"
ORA-27094: raw volume used can damage partition table
Additional information: -2
Additional information: 1073741824
三、 故障排查
一开始想起源库的RMAN中配置了备份集有效期为2天,至今已过去5天,怀疑是这个问题(备份集过期失效)引起的,于是将源库的RMAN备份集有效期调整为1000天,并重新做了一次全备,再次恢复,问题依旧。
仔细看错误日志“ORA-27094: raw volume used can damage partition table”使用裸卷可能会损坏分区表?莫非跟AIX下的4k offset问题类似?
google了一把,http://bbs.chinaunix.net/viewthread.php?tid=1272591 中wolfop提到“从10.2.0.2开始oracle在linux下面支持直接使用LVM或者原始的硬盘或者硬盘分区的设备文件做datafile而不需要raw这个东西。”“不是要你打补丁到10.2.0.3,就可以直接使用/dev/vg01/lv01了么?”
wolfop至少反应了如下两个信息:
1) 10.2.0.2开始支持Linux下的LVM做datafile;
2) 可以直接使用lv,不需要系统的raw设备。
metalink一把,[ID 738094.1] 关键内容如下:
Oracle Server - Enterprise Edition - Version: 10.1.0.1 to 10.2.0.4
Linux x86
Error received when creating the controlfile on raw devices:
ORA-00202: control file: '/dev/oradata/prd/ebs01/cntrl01.dbf'
ORA-27094: raw volume used can damage partition table
Additional information: -2
Additional information: 536870912
ORA-205 signalled during: alter database mount...
.
Issue is be caused by:
Bug 3653088 Abstract: ORA-1501 ORA-27094 CREATING SINGLE INSTANCE DATABASE ON RAW DEVICES
which was found to be a duplicate of unpublished
Bug: 3628715 Abstract: CHANGES TO SKGFR.C TO SUPPORT LVMS ON LINUX
Download and apply patch 3628715 if available for the version
要求打patch_3628715的补丁,即升级到10202
BUG:3653088 - ORA-1501 ORA-27094 CREATING SINGLE INSTANCE DATABASE ON RAW DEVICES
四、 解决问题
我的机子上没有3628715的补丁,只有p6810189_10204,打上这个补丁后再次尝试恢复,问题解决,数据恢复(迁移)成功。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/22085031/viewspace-1041501/ ,如需转载,请注明出处,否则将追究法律责任。