NFS share contains unexpected files named .nfs*
This document (000019942) is provided subject to the disclaimer at the end of this document.
These can be see from both the NFS clients and directly at the NFS server. Attempts to delete them often fail.
"Delete on last close" is a practice in Unix and Linux where an application has a file open but issues a delete (unlink) on that file anyway. In a native Linux file system, this will result in the file becoming invisible to other processes, even though it still exists and is still open. Once the application closes the file, it gets fully removed, assuming no other links to that file exist.
However, over the NFS protocol, this "delete on last close" behavior isn't supported in the normal way. The NFS Client layer must use another approach, by renaming the file to .nfs<hash>. The NFS Client will remove the file after the application closes it.
As long as the application closes gracefully, these files should be removed automatically. If applications have crashed or if a machine has lost power, then afterward the files might still exist and never be cleared away automatically. In those cases, it should be fine to delete them manually, and this should succeed because nothing is holding them open any longer.
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000019942
- Creation Date: 10-Mar-2022
- Modified Date:10-Mar-2022
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com