How to Copy ASM Files Across Nodes [ID 1147859.1]

本文介绍如何使用Oracle RMAN Active File Copy特性在网络间复制ASM文件。适用于Oracle Server Enterprise Edition 11.1.0.6至11.2.0.2版本。通过指定AUXILIARYFORMAT选项实现归档日志、数据文件等的复制。

How to Copy ASM Files Across Nodes [ID 1147859.1]

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

修改时间 13-DEC-2011 类型 HOWTO 状态 PUBLISHED

In this Document
Goal
Solution

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

Applies to:
Oracle Server - Enterprise Edition - Version: 11.1.0.6 to 11.2.0.2 - Release: 11.1 to 11.2
Information in this document applies to any platform.
Database - RMAN
***Checked for relevance on 14-Dec-2011***
Goal
You have a database (controlfiles, datafiles and archivelog files) on Node 1 residing on ASM and you wish to copy some of these files (or all) to another node. This second node may be using filesystem or ASM.

Solution
Oracle 11g Release 1 and Release 2 allows you to copy files across the network with the RMAN Active File Copy feature. This feature is controlled with the 'AUXILIARY FORMAT' option to the backup command.

For example, you can copy an archivelog like:

connect target SYS/...@srcinst # source system
connect auxiliary SYS/...@destinst # destination system
backup as copy reuse
archivelog like "/u01/oracle/archivelog/arc_des/arch%.arc"
auxiliary format "+RCVAREA" ;
Or copy a datafile like:

connect target SYS/...@srcinst # source system
connect auxiliary SYS/...@destinst # destination system
backup as copy reuse datafile "/u01/oracle/datafiles/system01.dbf"
auxiliary format "+DATA" ;
Oracle� Database Backup and Recovery Reference 11g Release 2 (11.2)
Part Number E10643-02:

AUXILIARY FORMAT: Copies the files on the target database to the specified location on the auxiliary instance. RMAN can only generate image copies when AUXILIARY FORMAT is specified. RMAN must be connected to both TARGET and AUXILIARY instances and have access to auxiliary channels.
You can use the BACKUP AUXILIARY FORMAT command to copy datafiles over the network between primary and standby databases. For example, if a datafile on a primary database was lost, you could CONNECT to the standby database as TARGET and the primary database as AUXILIARY, and copy an intact datafile from the standby host to the primary host.

formatSpec Specifies a pattern for naming the output image copies on an auxiliary instance. The path must be valid on the auxiliary host.

NEW Creates an image copy in the directory specified in the DB_CREATE_FILE_DEST initialization parameter of the auxiliary instance. The image copy is an Oracle-managed file.

REUSE Enables RMAN to overwrite an already existing backup or copy with the same file name as the file that BACKUP is currently creating.

See documentation for further details.

相关内容

--------------------------------------------------------------------------------
产品
--------------------------------------------------------------------------------

•Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
关键字
--------------------------------------------------------------------------------
ASM; AUXILIARY; COPY FILING; DATAFILES; DB_CREATE_FILE_DEST; FILES; FILESYSTEM; ORACLE DATABASE; ORACLE-MANAGED FILES



<think> 我们正在处理的问题:Oracle 12c集群使用addnode.sh -silent添加节点时,在“Copy Files to Remote Nodes in progress”步骤自动退出。 根据引用[1]:在节点1上,导航到Oracle_home/addnode目录,并以安装Oracle RAC的用户身份运行addnode.sh脚本,语法如下:$ ./addnode.sh -noCopy "CLUSTER_NEW_NODES={node3}"。 但是,用户使用的是-silent模式,并且遇到了在复制文件到远程节点时自动退出的问题。 可能的原因和解决方案: 1. 确保新节点满足安装要求(例如:操作系统版本、内核参数、预安装包、用户等价性(ssh互信)等)。 2. 检查日志:通常,在运行addnode.sh时,会在$ORACLE_HOME/cfgtoollogs/addnode目录下生成日志。查看具体日志,确定退出原因。 3. 常见问题: a. SSH互信问题:确保所有节点(包括新节点)之间能够通过ssh无需密码登录。可以使用cluvfy工具验证。 b. 存储问题:确保新节点能够访问共享存储(ASM磁盘等)。 c. 权限问题:确保运行addnode.sh的用户(通常是oracle用户)在新节点上有适当的权限(例如,对Oracle Home的写权限)。 d. 环境变量问题:确保在运行addnode.sh之前设置好环境变量(ORACLE_HOME, ORACLE_BASE等)。 e. 参数文件问题:如果使用响应文件(response file),确保其配置正确。 具体步骤: 1. 验证SSH互信: 在现有集群的所有节点上,使用oracle用户运行以下命令来测试到新节点的ssh连接: $ ssh node3 date 确保不需要密码即可连接。 2. 使用cluvfy进行预检查: 在运行addnode.sh之前,先使用cluvfy工具检查新节点是否满足条件: $ cluvfy stage -pre nodeadd -n node3 [-verbose] 根据检查结果修复问题。 3. 检查日志: 查看addnode操作生成的日志,通常在$ORACLE_HOME/cfgtoollogs/addnode/addnode.log。如果日志中没有足够信息,可以尝试增加调试级别。 4. 尝试使用非静默模式(不使用-silent): 非静默模式可能会提供更详细的错误信息。命令示例: $ ./addnode.sh -noCopy "CLUSTER_NEW_NODES=node3" 5. 如果问题仍然存在,可以考虑手动复制文件(如果使用-noCopy参数,则不会复制文件,但用户没有使用这个参数,所以默认会复制)。 在自动复制文件失败的情况下,可以尝试手动将Oracle Home复制到新节点,然后使用-noCopy参数运行addnode.sh。 手动复制步骤: a. 在源节点(通常是运行addnode.sh的节点)上,将Oracle Home打包: $ tar -cvzf oracle_home.tar.gz $ORACLE_HOME b. 将打包的文件复制到新节点: $ scp oracle_home.tar.gz node3:/u01/app/oracle c. 在新节点上解压: $ tar -xvzf oracle_home.tar.gz -C /u01/app/oracle d. 确保解压后的目录权限正确(属主为oracle用户)。 e. 然后使用-noCopy参数运行addnode.sh: $ ./addnode.sh -noCopy "CLUSTER_NEW_NODES={node3}" 注意:手动复制需要确保新节点的目录结构与原节点一致。 引用[2]中的内容是关于RMAN备份和闪回查询的,与当前问题无关。 根据以上分析,给出解决方案步骤。 注意:用户的问题是在静默模式下添加节点,在复制文件步骤自动退出,所以重点检查SSH互信、存储、日志等。 </think> ### Oracle 12c集群添加节点时“Copy Files to Remote Nodes”自动退出的解决方案 在Oracle 12c RAC集群中使用`addnode.sh -silent`添加节点时,在“Copy Files to Remote Nodes in progress”步骤自动退出,通常由以下原因导致: #### 核心解决步骤: 1. **检查SSH互信配置** - 在**所有节点**执行: ```bash $ ssh nodeX date # 测试到新节点的无密码SSH连接 ``` - 修复方法: ```bash $ $GRID_HOME/oui/bin/runInstaller -updateNodeList \ ORACLE_HOME=$ORACLE_HOME \ "CLUSTER_NODES={existing_nodes,new_node}" -noCopy $ $GRID_HOME/sshsetup/setupUserExEquiv.sh -user oracle -hosts "node1 node2 node3" ``` 2. **验证共享存储权限** - 在新节点检查ASM磁盘组权限: ```bash $ ls -l /dev/oracleasm/disks/* ``` - 确保输出包含:`oracle:dba`权限组 3. **检查日志定位具体错误** 关键日志位置: - `$ORACLE_HOME/cfgtoollogs/addnode/addnodelogs*.log` - `$GRID_HOME/log/node3/agent/ohasd/oraagent_oracle/oraagent_oracle.log` 4. **手动清理并重试(如必要)** ```bash # 在所有节点执行 $ rm -rf $ORACLE_BASE/.oracle/nodg/* $ $ORACLE_HOME/oui/bin/runInstaller -silent -detachHome ORACLE_HOME=$ORACLE_HOME ``` #### 验证步骤: ```bash $ cluvfy stage -post nodeadd -n node3 -verbose ``` 检查输出中的**SSH connectivity**、**Storage accessibility**和**Node reachability**状态[^1]。 #### 预防措施: 1. 提前运行预检: ```bash $ cluvfy stage -pre nodeadd -n node3 ``` 2. 确保新节点满足: - 相同的OS版本和内核参数 - 同等目录结构(`$ORACLE_HOME`, `$GRID_HOME`) - 已安装所有必需的RPM包
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值