ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Rman通过NFS备份报错ORA-27054

Rman通过NFS备份报错ORA-27054

原创 Linux操作系统 作者:jichenghan 时间:2008-03-05 19:30:59 0 删除 编辑

 

RMAN在通过NFS备份、恢复的时候,会出现ORA-27054错误。

 

 

Oracle 10G Rac环境,采用了NFS mount的方式,将远端站点的目录映射到本地磁盘,来解决RAC的归档日志无法访问的问题。简单执行步骤如下:

首先在两个节点上分别建立归档的目的目录:

# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ mkdir /data1/archivelog1 /data1/archivelog2
$ exit
# hostname
racnode1

# su - oracle
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ mkdir /data1/archivelog1 /data1/archivelog2
$ exit
# hostname
racnode2

在节点一设置目录的共享:

# share -F nfs -o rw=racnode2 /data1/archivelog1

在节点二设置目录的共享:

# share -F nfs -o rw=racnode1 /data1/archivelog2

在节点一加载节点二的目录:

# mount racnode2:/data1/archivelog2 /data1/archivelog2

在节点二加载节点一的目录:

# mount racnode1:/data1/archivelog1 /data1/archivelog1

在尝试备份的时候:

RMAN> run
2> {
3> allocate channel c1 device type sbt;
4> allocate channel c2 device type sbt;
5> backup database plus archivelog delete all input;
6> }

分配的通道: c1通道 c1: sid=307 实例=testrac2 devtype=SBT_TAPE通道c1: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)

分配的通道: c2通道 c2: sid=306 实例=testrac2 devtype=SBT_TAPE通道c2: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)

启动 backup 于 29-5月 -07当前日志已存档释放的通道: c1释放的通道: c2
MAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: backup plus archivelog 命令 (在 05/29/2007 14:06:09 上) 失败
RMAN-06059: 没有找到预期的归档日志, 归档日志的丢失将影响可恢复性
ORA-19625: 识别文件/data1/archivelog1/1_253_618591128.dbf时出错
ORA-27054: 创建文件或文件驻留的 NFS 文件系统未使用正确的选项装载
Additional information: 2

从操作系统上可以看到这个文件已经存在:

$ ls -l /data1/archivelog1
total 1599904
-rw-rw---- 1 oracle oinstall 533180928 May 29 14:03 1_253_618591128.dbf
-rw-rw---- 1 oracle oinstall 285244928 May 29 14:05 1_254_618591128.dbf
-rw-rw---- 1 oracle oinstall 292864 May 29 14:06 1_255_618591128.dbf

从Metalink的查询看,这个错误还比较普遍。在文章Note:424785.1里面进行了比较详细的描述。

解决方法包括设置事件10298 level 32,打补丁:5146667,或者在mount的时候设置参数:rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0。

注意metalink上给出的参数并非对所有系统都适用,比如在Solaris8上就要去掉tcp参数。而去掉了tcp之后,似乎这种方法就不生效了。

剩下两种方式,打补丁需要将数据库关闭,而且一般使用NFS都是用在Rac的环境,补丁还需要在两个节点上同时打,比较麻烦。

而设置EVENT虽然简单,只是要重启系统才能生效。

设置Oracle的事件10298,并重启数据库:

$ sqlplus "/as sysdba"

SQL*Plus: Release 10.2.0.3.0 - Production on 星期二 5月 29 16:06:32 2007

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

连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options

SQL> alter system set event='10298 trace name context forever, level 32' scope = spfile;

系统已更改。

SQL> exit 从 Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options 断开
$ srvctl stop db -d testrac
$ srvctl start db -d testrac

再次备份,错误消失:

$ rman target /

恢复管理器: Release 10.2.0.3.0 - Production on 星期二 5月 29 16:11:21 2007

Copyright (c) 1982, 2005, Oracle. All rights reserved.

连接到目标数据库: TESTRAC (DBID=4291216984)

RMAN> run
2> {
3> allocate channel c1 device type sbt;
4> allocate channel c2 device type sbt;
5> backup database plus archivelog delete all input;
6> }

使用目标数据库控制文件替代恢复目录分配的通道: c1通道 c1: sid=292 实例=testrac2 devtype=SBT_TAPE通道c1: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)

分配的通道: c2通道 c2: sid=291 实例=testrac2 devtype=SBT_TAPE通道c2: VERITAS NetBackup for Oracle - Release 6.0 (2006110304)

启动 backup 于 29-5月 -07当前日志已存档通道 c1: 正在启动存档日志备份集通道 c1: 正在指定备份集中的存档日志输入存档日志线程 =1 序列 =253 记录 ID=621 时间戳=623858612输入存档日志线程 =1 序列 =254 记录 ID=622 时间戳=623858723输入存档日志线程 =1 序列 =255 记录 ID=625 时间戳=623858765输入存档日志线程 =1 序列 =256 记录 ID=626 时间戳=623865414输入存档日志线程 =1 序列 =257 记录 ID=629 时间戳=623866292通道 c1: 正在启动段 1 于 29-5月 -07通道 c2: 正在启动存档日志备份集通道 c2: 正在指定备份集中的存档日志输入存档日志线程 =2 序列 =169 记录 ID=620 时间戳=623858603输入存档日志线程 =2 序列 =170 记录 ID=623 时间戳=623858725输入存档日志线程 =2 序列 =171 记录 ID=624 时间戳=623858759输入存档日志线程 =2 序列 =172 记录 ID=627 时间戳=623865413输入存档日志线程 =2 序列 =173 记录 ID=628 时间戳=623866290通道 c2: 正在启动段 1 于 29-5月 -07通道 c1: 已完成段 1 于 29-5月 -07段句柄=7fiiusdu_1_1 标记=TAG20070529T161141 注释=API Version 2.0,MMS Version 5.0.0.0通道 c1: 备份集已完成, 经过时间:00:03:36通道 c1: 正在删除存档日志存档日志文件名 =/data1/archivelog1/1_253_618591128.dbf 记录 ID=621 时间戳 =623858612存档日志文件名 =/data1/archivelog1/1_254_618591128.dbf 记录 ID=622 时间戳 =623858723存档日志文件名 =/data1/archivelog1/1_255_618591128.dbf 记录 ID=625 时间戳 =623858765存档日志文件名 =/data1/archivelog1/1_256_618591128.dbf 记录 ID=626 时间戳 =623865414存档日志文件名 =/data1/archivelog1/1_257_618591128.dbf 记录 ID=629 时间戳 =623866292通道 c2: 已完成段 1 于 29-5月 -07段句柄=7giiusdu_1_1 标记=TAG20070529T161141 注释=API Version 2.0,MMS Version 5.0.0.0通道 c2: 备份集已完成, 经过时间:00:04:32通道 c2: 正在删除存档日志存档日志文件名 =/data1/archivelog2/2_169_618591128.dbf 记录 ID=620 时间戳 =623858603存档日志文件名 =/data1/archivelog2/2_170_618591128.dbf 记录 ID=623 时间戳 =623858725存档日志文件名 =/data1/archivelog2/2_171_618591128.dbf 记录 ID=624 时间戳 =623858759存档日志文件名 =/data1/archivelog2/2_172_618591128.dbf 记录 ID=627 时间戳 =623865413存档日志文件名 =/data1/archivelog2/2_173_618591128.dbf 记录 ID=628 时间戳 =623866290完成 backup 于 29-5月 -07

启动 backup 于 29-5月 -07通道 c1: 启动全部数据文件备份集通道 c1: 正在指定备份集中的数据文件输入数据文件 fno=00006 name=+DISK/testrac/datafile/zhejiang01.dbf输入数据文件 fno=00009 name=+DISK/testrac/datafile/zhejiang03.dbf输入数据文件 fno=00012 name=+DISK/testrac/datafile/zhejiang05.dbf输入数据文件 fno=00008 name=+DISK/testrac/datafile/ndmain01.dbf输入数据文件 fno=00010 name=+DISK/testrac/datafile/ndindex01.dbf输入数据文件 fno=00001 name=+DISK/testrac/datafile/system.262.618591167输入数据文件 fno=00005 name=+DISK/testrac/datafile/users.267.618591279通道 c1: 正在启动段 1 于 29-5月 -07通道 c2: 启动全部数据文件备份集通道 c2: 正在指定备份集中的数据文件输入数据文件 fno=00007 name=+DISK/testrac/datafile/zhejiang02.dbf输入数据文件 fno=00011 name=+DISK/testrac/datafile/zhejiang04.dbf输入数据文件 fno=00014 name=+DISK/testrac/datafile/zhejiang06.dbf输入数据文件 fno=00002 name=+DISK/testrac/datafile/undotbs1.263.618591197输入数据文件 fno=00004 name=+DISK/testrac/datafile/undotbs2.266.618591249输入数据文件 fno=00013 name=+DISK/testrac/datafile/lt_index_ts01.dbf输入数据文件 fno=00003 name=+DISK/testrac/datafile/sysaux.264.618591225通道 c2: 正在启动段 1 于 29-5月 -07通道 c1: 已完成段 1 于 29-5月 -07段句柄=7hiiusmg_1_1 标记=TAG20070529T161615 注释=API Version 2.0,MMS Version 5.0.0.0通道 c1: 备份集已完成, 经过时间:00:37:55通道 c1: 启动全部数据文件备份集通道 c1: 正在指定备份集中的数据文件备份集中包括当前控制文件通道 c1: 正在启动段 1 于 29-5月 -07通道 c2: 已完成段 1 于 29-5月 -07段句柄=7iiiusmg_1_1 标记=TAG20070529T161615 注释=API Version 2.0,MMS Version 5.0.0.0通道 c2: 备份集已完成, 经过时间:00:38:21通道 c2: 启动全部数据文件备份集通道 c2: 正在指定备份集中的数据文件在备份集中包含当前的 SPFILE通道 c2: 正在启动段 1 于 29-5月 -07通道 c1: 已完成段 1 于 29-5月 -07段句柄=7jiiuutj_1_1 标记=TAG20070529T161615 注释=API Version 2.0,MMS Version 5.0.0.0通道 c1: 备份集已完成, 经过时间:00:01:02通道 c2: 已完成段 1 于 29-5月 -07段句柄=7kiiuuud_1_1 标记=TAG20070529T161615 注释=API Version 2.0,MMS Version 5.0.0.0通道 c2: 备份集已完成, 经过时间:00:01:01完成 backup 于 29-5月 -07

启动 backup 于 29-5月 -07当前日志已存档通道 c1: 正在启动存档日志备份集通道 c1: 正在指定备份集中的存档日志输入存档日志线程 =1 序列 =258 记录 ID=630 时间戳=623868941通道 c1: 正在启动段 1 于 29-5月 -07通道 c2: 正在启动存档日志备份集通道 c2: 正在指定备份集中的存档日志输入存档日志线程 =2 序列 =174 记录 ID=631 时间戳=623868939通道 c2: 正在启动段 1 于 29-5月 -07通道 c1: 已完成段 1 于 29-5月 -07段句柄=7liiuv0c_1_1 标记=TAG20070529T165540 注释=API Version 2.0,MMS Version 5.0.0.0通道 c1: 备份集已完成, 经过时间:00:01:06通道 c1: 正在删除存档日志存档日志文件名 =/data1/archivelog1/1_258_618591128.dbf 记录 ID=630 时间戳 =623868941通道 c2: 已完成段 1 于 29-5月 -07段句柄=7miiuv0c_1_1 标记=TAG20070529T165540 注释=API Version 2.0,MMS Version 5.0.0.0通道 c2: 备份集已完成, 经过时间:00:01:06通道 c2: 正在删除存档日志存档日志文件名 =/data1/archivelog2/2_174_618591128.dbf 记录 ID=631 时间戳 =623868939完成 backup 于 29-5月 -07释放的通道: c1释放的通道: c2

RMAN> exit

恢复管理器完成。


yangtingkun 发表于:2007.05.29 17:22 ::分类: ( ORACLE , Bug ) ::阅读:(807次) :: 评论 (8)
 re: Rman通过NFS备份报错ORA-27054 [回复]
今天在自己的环境下也测试了下.10g10.2.0.1.solaris9
也是nfs.不过,我备份的目的是disk.不是sbt.

执行备份过程,没有出现总是问题.不知道是不是sbt的问题啊.
以下是rman日志.
RMAN> run
2> {
3> allocate channel c1 device type disk;
4> allocate channel c2 device type disk;
5> backup database plus archivelog delete all input;
6> }

allocated channel: c1
channel c1: sid=132 instance=rac2 devtype=DISK

allocated channel: c2
channel c2: sid=139 instance=rac1 devtype=DISK

Starting backup at 20070724101824
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=2 sequence=24 recid=1 stamp=628769457
input archive log thread=2 sequence=25 recid=2 stamp=628769527
input archive log thread=2 sequence=26 recid=3 stamp=628769531
input archive log thread=2 sequence=27 recid=7 stamp=628769642
input archive log thread=2 sequence=28 recid=8 stamp=628769742
channel c1: starting piece 1 at 20070724101549
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=72 recid=4 stamp=628769701
channel c2: starting piece 1 at 20070724101836
channel c1: finished piece 1 at 20070724101550
piece handle=/export/home/oracle/product/database/dbs/03inkguk_1_1 tag=TAG20070724T101834 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=/export/home/oracle/product/database/dbs/arch2_24_626465749.dbf recid=1 stamp=628769457
archive log filename=/export/home/oracle/product/database/dbs/arch/2_25_626465749.dbf recid=2 stamp=628769527
archive log filename=/export/home/oracle/product/database/dbs/arch/2_26_626465749.dbf recid=3 stamp=628769531
archive log filename=/export/home/oracle/product/database/dbs/arch/2_27_626465749.dbf recid=7 stamp=628769642
archive log filename=/export/home/oracle/product/database/dbs/arch/2_28_626465749.dbf recid=8 stamp=628769742
channel c2: finished piece 1 at 20070724101838
piece handle=/export/home/oracle/product/database/dbs/04inkh3r_1_1 tag=TAG20070724T101834 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:03
channel c2: deleting archive log(s)
archive log filename=/export/home/oracle/product/database/dbs/arch/1_72_626465749.dbf recid=4 stamp=628769701
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=73 recid=5 stamp=628769734
input archive log thread=1 sequence=74 recid=6 stamp=628769803
input archive log thread=1 sequence=75 recid=9 stamp=628769909
channel c2: starting piece 1 at 20070724101839
channel c2: finished piece 1 at 20070724101840
piece handle=/export/home/oracle/product/database/dbs/05inkh3u_1_1 tag=TAG20070724T101834 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
channel c2: deleting archive log(s)
archive log filename=/export/home/oracle/product/database/dbs/arch/1_73_626465749.dbf recid=5 stamp=628769734
archive log filename=/export/home/oracle/product/database/dbs/arch/1_74_626465749.dbf recid=6 stamp=628769803
archive log filename=/export/home/oracle/product/database/dbs/arch/1_75_626465749.dbf recid=9 stamp=628769909
Finished backup at 20070724101841

Starting backup at 20070724101842
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00001 name=/racData/oradata/rac/system01.dbf
input datafile fno=00005 name=/racData/oradata/rac/users01.dbf
input datafile fno=00004 name=/racData/oradata/rac/undotbs02.dbf
channel c1: starting piece 1 at 20070724101556
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00003 name=/racData/oradata/rac/sysaux01.dbf
input datafile fno=00002 name=/racData/oradata/rac/undotbs01.dbf
channel c2: starting piece 1 at 20070724101843
channel c2: finished piece 1 at 20070724101918
piece handle=/export/home/oracle/product/database/dbs/07inkh43_1_1 tag=TAG20070724T101842 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:35
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
including current control file in backupset
channel c2: starting piece 1 at 20070724101920
channel c2: finished piece 1 at 20070724101922
piece handle=/export/home/oracle/product/database/dbs/08inkh56_1_1 tag=TAG20070724T101842 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:04
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
including current SPFILE in backupset
channel c2: starting piece 1 at 20070724101922
channel c2: finished piece 1 at 20070724101923
piece handle=/export/home/oracle/product/database/dbs/09inkh5a_1_1 tag=TAG20070724T101842 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:01
channel c1: finished piece 1 at 20070724101639
piece handle=/export/home/oracle/product/database/dbs/06inkgus_1_1 tag=TAG20070724T101842 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:43
Finished backup at 20070724101926

Starting backup at 20070724101927
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=2 sequence=29 recid=11 stamp=628769802
channel c1: starting piece 1 at 20070724101645
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=76 recid=10 stamp=628769967
channel c2: starting piece 1 at 20070724101932
channel c1: finished piece 1 at 20070724101646
piece handle=/export/home/oracle/product/database/dbs/0ainkh0c_1_1 tag=TAG20070724T101931 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
channel c1: deleting archive log(s)
archive log filename=/export/home/oracle/product/database/dbs/arch/2_29_626465749.dbf recid=11 stamp=628769802
channel c2: finished piece 1 at 20070724101934
piece handle=/export/home/oracle/product/database/dbs/0binkh5k_1_1 tag=TAG20070724T101931 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:02
channel c2: deleting archive log(s)
archive log filename=/export/home/oracle/product/database/dbs/arch/1_76_626465749.dbf recid=10 stamp=628769967
Finished backup at 20070724101934
released channel: c1
released channel: c2

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/13248003/viewspace-200398/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-02-26

  • 博文量
    17
  • 访问量
    36744