Skip to main content

Removing Temporary NFS Files That Are Left In The Filesystem (KBA6534)



KBA# 6534


If you drop a tablespace and create datafiles that reuse the datafile numbers of the dropped datafile, it is possible that temporary NFS files are left in the filesystem. When that happens, during in VDB provisioning/refresh/rewind, Delphix finds these invalid copies. This causes a problem, as it results in having two copies for the same datafile. And, depending on the order in which they are found, Delphix might end up cataloging the NFS temporary file instead of the current datafile, causing a RESETLOGS error mismatch.

Normally Delphix would remove the .nfs temporary files, but when the files are owned by the "oracle" OS user, Delphix cannot delete them. Instead, a 'Permission denied' error is provided (as shown below). The Delphix scripts used to remove these files are run by the "delphix" user.

[2020-09-14 13:49:32,911][INFO][jcm.impl.JobInstance#execute:355][Worker-3474|JOB-1848|DB_REFRESH(ORACLE_DB_CONTAINER-69)][] job failed with user error
com.delphix.common.exception.messages.OracleTargetscriptsExceptions$RenameDatafiles: {command: umask 027; . $DB_SCRIPT_DIR/; $DLPX_SHELL $DB_SCRIPT_DIR/ $DB_SCRIPT_DIR "$LOGON_STR" "/delphix/hellodb/datafile"
Check if /delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs000000000000001200000026 is a datafile
rm: cannot remove '/delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs000000000000001200000026': Permission denied
Check if /delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs000000000000002100000030 is a datafile
rm: cannot remove '/delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs000000000000002100000027': Permission denied
Extra files in directory remaining:
List of Files Unknown to the Database
File Name: /delphix/hellodb/datafile/spfile.ora
File Name: /delphix/hellodb/datafile/init.ora.createControlfile
File Name: /delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs000000000000004500000030
File Name: /delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/acses_ts_encrypt.278.1036365707
File Name: /delphix/hellodb/datafile/+DG_ACSES/ACSESDG/DATAFILE/.nfs00000000000000870000002d
File Name: /delphix/hellodb/datafile/init.ora.rename
File Name: /delphix/hellodb/datafile/init.ora.recovery
File Name: /delphix/hellodb/datafile/source_init.ora
cataloging files...
cataloging done
List of Files Which Were Not Cataloged
File Name: /delphix/hellodb/datafile/spfile.ora
  RMAN-07518: Reason: Foreign database file DBID: 0  Database Name:
File Name: /delphix/hellodb/datafile/init.ora.createControlfile
  RMAN-07517: Reason: The file header is corrupted
File Name: /delphix/hellodb/datafile/VACSES/onlinelog/o1_mf_2_hovnhn73_.log
  RMAN-07529: Reason: catalog is not supported for this file type
BEGIN SYS.DBMS_BACKUP_RESTORE.switchtocopy(68, 1051105764, false); END;
ERROR at line 1:
ORA-19654: must use backup control file to switch file incarnations
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4473
ORA-06512: at "SYS.X$DBMS_BACKUP_RESTORE", line 4467
ORA-06512: at line 1

Applicable Delphix Versions

Click here to view the versions of the Delphix engine to which this article applies
Major Release All Sub Releases



There are two options to workaround this: 

  1. Add the "oracle" user to this environment, then provision the VDB using that "oracle" user rather than the "delphix" user. To do this, you need to provision a new VDB and would not be able to refresh an existing VDB.
  2. Take a new snapshot of the source VDB, and replicate this to the target Delphix environment. Then, attempt the refresh from the latest snapshot. It will be successful. You can also check on the source VDB filesystem for the presence of these files and what processes are accessing them. Delphix support can assist with this task if required.


Related Articles

The following articles may provide more information or related information to this article: