使用rman备份到挂载的NFS目录,提示ORA-19504-27054报错

简介:

一、在AIX下挂载NFS后,手动运行rman备份脚本

报错信息如下:

RMAN-03009: failure of backup command on ch1 channel at 05/05/2014 19:07:05

ORA-19504: failed to create file "/sapbackup/orabak/rman_bak/bak_20140505_7fp7hu6o_1_1"

ORA-27054: NFS file system where the file is created or resides is not mounted with correct options

Additional information: 6

然后检查目录权限,发现有读写和可执行的权限,并且尝试在目录里面新建和删除文件操作,均未发现异常。



二、查询oracle官方资料,说可能是一个早期的bug

如是根据官方给的提示进行操作:


vim /etc/filesystems

#添加如下内容:

/sapbackup/orabak:

        dev             = /volume1/sap_db

        vfs             = nfs

        nodename        = 10.203.20.67

        mount           = true

        options         = rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp

        account         = false


官方参考资料:

mount -o hard,bg,proto=tcp,suid,rsize=32768,wsize=32768,noac 10.203.20.67:/volume1/sap_db /sapbackup/orabak


直接使用umount /sapbackup/orabak,提示“umount: device is busy”,如是使用下面的命令进行卸载操作(Linux下通常是使用fuser -km /mnt/cdrom 查询当前使用的进程,并kill掉)

AIX下umount命令:

fuser -kxuc /sapbackup/orabak

umount  /sapbackup/orabak                        #如果卸载但提示设备正被使用的话,可以使用umount -f参数



mount -v nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp 10.203.20.67:/volume1/sap_db /orabak


# startsrc -g nfs

# nfso -a | grep nfs_use_reserved_ports

# nfso -o nfs_use_reserved_ports=1

# mount -v nfs -o rw,bg,hard,rsize=32768,wsize=32768,vers=3,cio,intr,timeo=600,proto=tcp 10.203.20.67:/volume1/sap_db /orabak

# mount 10.203.10.157:/SAP /nfs

# df -g


三、尝试使用下面的备份脚本:

# cat sapprd_bak.sh

rman nocatalog target / <<EOF

run{

configure retention policy to recovery window of 31 days;

allocate channel ch1 device type disk;

crosscheck backup;

crosscheck archivelog all;

sql 'alter system archive log current';

backup database format "/sapbackup/orabak/rman_bak/bak_%T_%U";

sql 'alter system archive log current';

backup archivelog all format '/sapbackup/orabak/rman_bak/arch_bak_%T_%U' delete all input;

backup current controlfile format '/sapbackup/orabak/rman_bak/con_bak_%T_%U';

crosscheck backup;

crosscheck archivelog all;

delete noprompt expired backup;

delete noprompt obsolete;

delete noprompt backup of database completed before 'sysdate - 31';

release channel ch1;

}

exit

EOF

测试备份成功!




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

生产系统需要导出数据到一个NFS目录下报错

bash-3.00$ expdp \'/ as sysdba\' directory=bak_data_pump_dir schemas=epm_ha dumpfile=epm_ha.dmp logfile=epm_ha.log

Export: Release 10.2.0.4.0 - 64bit Production on Friday, 21 May, 2010 16:09:25

Copyright (c) 2003, 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
ORA-39001: invalid argument value
ORA-39000: bad dump file specification
ORA-31641: unable to create dump file "/epmhis/DATA_PUMP_EPMHA1/epm_ha.dmp"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 2


网上搜索资料,解决方法包括设置事件10298 level 32,alter system set event='10298 trace name context forever, level 32' scope = spfile;打补丁:5146667,或者在mount的时候设置参数:rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,vers=3,timeo=600,actimeo=0。在solaris系统上tcp参数不可用。

由于是生产系统,尽量采用不停数据库来解决,重新mount。

1 umount目录

umount /epmhis

2 mount目录加一些参数

mount -F nfs -o rw,hard,nointr,noac,vers=3,rsize=32768,wsize=32768 IP地址:/epmhis /20100521

3 重新expdp导出文件到NFS目录

Export: Release 10.2.0.4.0 - 64bit Production on Friday, 21 May, 2010 16:41:37

Copyright (c) 2003, 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
FLASHBACK automatically enabled to preserve database integrity.
Starting "SYS"."SYS_EXPORT_SCHEMA_15":  '/******** AS SYSDBA' directory=bak_data_pump_dir schemas=epm_ha dumpfile=epm_ha.dmp logfile=epm_ha.log
Estimate in progress using BLOCKS method...
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 355.2 GB
Processing object type SCHEMA_EXPORT/USER
Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
Processing object type SCHEMA_EXPORT/ROLE_GRANT
Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
Processing object type SCHEMA_EXPORT/TABLESPACE_QUOTA
Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
Processing object type SCHEMA_EXPORT/SYNONYM/SYNONYM
Processing object type SCHEMA_EXPORT/DB_LINK
Processing object type SCHEMA_EXPORT/SEQUENCE/SEQUENCE
Processing object type SCHEMA_EXPORT/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
Processing object type SCHEMA_EXPORT/TABLE/TABLE
Master table "SYS"."SYS_EXPORT_SCHEMA_15" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_SCHEMA_15 is:
  /epmhis/DATA_PUMP_EPMHA1/epm_ha.dmp
Job "SYS"."SYS_EXPORT_SCHEMA_15" successfully completed at 17:56:28

没有报错,问题解决。


本文转自 Mr_sheng 51CTO博客,原文链接:http://blog.51cto.com/sf1314/2056961


相关文章
|
1月前
|
Linux Shell Windows
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
通过Linux挂载Windows端NFS服务实现板端Linux传输文件到PC
|
4月前
|
弹性计算 Serverless 网络安全
于在阿里云函数计算中挂载NFS共享时出现了问题
于在阿里云函数计算中挂载NFS共享时出现了问题
53 1
|
3月前
|
Unix Linux 文件存储
文件传输、文件挂载MOUNT:NFS、CIFS、ADB、SAMBA
文件传输、文件挂载MOUNT:NFS、CIFS、ADB、SAMBA
70 0
|
6月前
|
开发工具 对象存储
nfs挂载报错问题
nfs挂载报错问题
|
3月前
|
网络协议 Linux 测试技术
NFS - MIPS架构下构建NFS共享目录服务
NFS - MIPS架构下构建NFS共享目录服务
59 1
|
8月前
|
域名解析 运维 负载均衡
【运维知识进阶篇】Tomcat集群实战之部署zrlog博客(Tomcat服务安装+静态资源挂载NFS+Nginx负载均衡+HTTPS证书+Redis会话保持)
【运维知识进阶篇】Tomcat集群实战之部署zrlog博客(Tomcat服务安装+静态资源挂载NFS+Nginx负载均衡+HTTPS证书+Redis会话保持)
254 1
|
9月前
|
运维 Kubernetes Unix
【运维】Linux/Ec2挂载卷与NFS搭建实站讲解
英文Network File System(NFS),是由SUN公司研制的UNIX表示层协议(presentation layer protocol),能使使用者访问网络上别处的文件就像在使用自己的计算机一样。NFS在实际场景中有着不少的应用场景,比如分布式代码部署下,代码一致性的同步方案,K8S多容器内外挂载等情况,今天就来具体讲解一下怎么实现。
|
9月前
|
Linux
Linux系统之使用autofs自动挂载nfs共享
Linux系统之使用autofs自动挂载nfs共享
114 1
|
9月前
|
Ubuntu Linux 网络安全
荔枝派Zero(全志V3S) tftp下载 kernel 和 nfs 挂载文件系统
传输文件每次都插拔 SD 卡太麻烦了,还是使用网线传输文件比较快,借此机会讲述一下 通过 tftp下载 kernel 和 nfs 挂载文件系统
328 0
|
Linux
龙芯2K1000使用nfs挂载文件系统进行使用
龙芯2K1000使用nfs挂载文件系统进行使用
140 0