RMAN-06172 when restoring a controlfile and dNFS is not turned on
Oracle EE 184.108.40.206 on Linux x86-64.
I got a really surprising error message today when setting up a new data guard standby database.
I created a standby controlfile as usual and placed it on a common NFS share accessible also to the new data guard host:
SQL> alter database create standby controlfile as '/nfs/install/oemdb/cf2.f'; Database altered.
Now, on a new node I tried to restore that controlfile, but got a really surprising RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece. This shouldn’t happen, it is just stored on a common NFS share, file should not be damaged.
RMAN> restore controlfile from '/nfs/install/oemdb/cf2.f'; Starting restore at 20-MAY-16 using channel ORA_DISK_1 RMAN-00571: =========================================================== RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS =============== RMAN-00571: =========================================================== RMAN-03002: failure of restore command at 05/20/2016 12:58:33 RMAN-06172: no AUTOBACKUP found or specified handle is not a valid copy or piece
Although the error message does not say it, but I remembered that I had mounted the NFS using SOFT mount option and when trying to restore datafiles from soft mounted NFS shared you will usually get ORA-27054: NFS file system not mounted with correct options, unless you have turned on Direct-NFS on the database kernel. So I just wondered, maybe this is the real error message in this case also.
After turning on Direct NFS, restoring the control file worked as expected:
[firstname.lastname@example.org oemdb]$ cd $ORACLE_HOME/rdbms/lib [email@example.com lib]$ make -f ins_rdbms.mk dnfs_on rm -f /u01/app/oracle/product/220.127.116.11/db/lib/libodm11.so; cp /u01/app/oracle/product/18.104.22.168/db/lib/libnfsodm11.so /u01/app/oracle/product/22.214.171.124/db/lib/libodm11.so [firstname.lastname@example.org lib]$ sqlplus / as sysdba SQL*Plus: Release 126.96.36.199.0 Production on Fri May 20 13:01:56 2016 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to an idle instance. SQL> startup nomount ORACLE instance started. Total System Global Area 9620525056 bytes Fixed Size 2261368 bytes Variable Size 2449477256 bytes Database Buffers 7147094016 bytes Redo Buffers 21692416 bytes SQL> Disconnected from Oracle Database 11g Enterprise Edition Release 188.8.131.52.0 - 64bit Production With the Partitioning, OLAP, Data Mining and Real Application Testing options [email@example.com lib]$ rman target / Recovery Manager: Release 184.108.40.206.0 - Production on Fri May 20 13:02:14 2016 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. connected to target database: OEM (not mounted) RMAN> restore controlfile from '/nfs/install/oemdb/cf2.f'; Starting restore at 20-MAY-16 using target database control file instead of recovery catalog allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=474 device type=DISK channel ORA_DISK_1: copied control file copy output file name=+DATA/oem/controlfile/current.257.912344539 Finished restore at 20-MAY-16
The NFS share was mounted using options:
type nfs (rw,bg,soft,rsize=32768,wsize=32768,tcp,nfsvers=3,timeo=600,addr=10.10.10.10)