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

一、在AIX5.3下挂载NFS后,手动运行Oracle10g rman备份脚本

1、报错信息如下:

RMAN-03009: failure of backup command on ch1 channel at 05/08/2021 14:07:05

ORA-19504: failed to create file "/rmbackup/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

NAS端检查共享目录,拥有读写及root权限,并且尝试在目录里面新建和删除文件操作,均未发现异常。

2、查询oracle相关论坛知悉可能是一个早期的bug,建议的操作如下

2.1、先在/etc/filesystems里面添加要挂在的nas共享目录信息条目

vi /etc/filesystems

#添加如下内容:

/rmbackup:

        dev       = /fs/gen3dbbackup/g3dbbackup

        vfs        = nfs

        nodename   = 192.192.5.159

        mount      = true

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

        account    = false

2.2、再手动挂载nas共享目录,如下

mount -o hard,bg,proto=tcp,rsize=32768,wsize=32768,noac 192.192.5.159: /fs/gen3dbbackup/g3dbbackup /rmbackup

卸载目录注意事项:

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

AIXumount命令:

fuser -kxuc /rmbackup

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

aix下启停nfs

启动nfs

# startsrc -g nfs

关闭nfs

#stopsrc -g nfs

查看nfs

#lssrc -g nfs

2.3、备份脚本可以参考下面的

# cat oradb_bak.sh

rman nocatalog target / <<EOF

run{

configure retention policy to recovery window of 30 days;

CONFIGURE DEVICE TYPE DISK PARALLELISM 4;

allocate channel ch0 device type disk;

allocate channel ch1 device type disk;

allocate channel ch2 device type disk;

allocate channel ch3 device type disk;

crosscheck backup;

crosscheck archivelog all;

sql 'alter system archive log current';

backup database format '/rmbackup/FULLBAK_%T_%U';

sql 'alter system archive log current';

backup archivelog all format '/rmbackup/arch_bak_%T_%U' delete all input;

backup current controlfile format '/rmbackup/con_bak_%T_%U';

backup spfile format '/rmbackup/spfile_bak_%T_%U';

crosscheck backup;

crosscheck archivelog all;

delete noprompt expired backup;

delete noprompt obsolete;

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

release channel ch0;

release channel ch1;

release channel ch2;

release channel ch3;

}

exit

EOF

二、Aix5.3系统Oracle10g 使用expdp导出数据到NFS目录下报错处理

$ expdp backup/******** directory=exp_dir dumpfile=vhfs_full_%U.dmp logfile=vhfs_full.log full=y parallel=4

Export: Release 10.2.0.4.0 - 64bit Production on Friday, 21 May, 2021 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 "/gen3/vhfs_exp/vhfs_full_01.dmp"
ORA-27054: NFS file system where the file is created or resides is not mounted with correct options
Additional information: 2


网络论坛博客上搜索了下资料,解决方法包括设置事件10298 level 32alter 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

重新mount共享nas目录

1umount目录

umount /gen3

2mount目录加一些参数

mount -o hard,bg,vers=3,proto=tcp,rsize=32768,wsize=32768,noac 192.192.5.159: /fs/gen3/gen3 /gen3

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

Export: Release 10.2.0.4.0 - 64bit Production on Friday, 21 May, 2021 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 "BACKUP"."SYS_EXPORT_FULL_01":  backup/******** directory=exp_dir dumpfile=vhfs_full_%U.dmp logfile=vhfs_full.log full=y pa

rallel=3

Estimate in progress using BLOCKS method...

Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 241.6 GB

Processing object type DATABASE_EXPORT/TABLESPACE

Processing object type DATABASE_EXPORT/PROFILE

Processing object type DATABASE_EXPORT/SYS_USER/USER

Processing object type DATABASE_EXPORT/SCHEMA/USER

Processing object type DATABASE_EXPORT/ROLE

Processing object type DATABASE_EXPORT/GRANT/SYST

…………
exported "WORKFLOW"."STP_TEMPLATE"      0 KB       0 rows

exported "VHFS"."CSPLOG"       14.93 MB   81906 rows

Master table "BACKUP"."SYS_EXPORT_FULL_01" successfully loaded/unloaded

******************************************************************************

Dump file set for BACKUP.SYS_EXPORT_FULL_01 is:

  /backup/vhfs_exp/vhfs_full_01.dmp

  /backup/vhfs_exp/vhfs_full_02.dmp

  /backup/vhfs_exp/vhfs_full_03.dmp

Job "BACKUP"."SYS_EXPORT_FULL_01" successfully completed at 17:55:08

没有报错,问题解决。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

king_harry

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值