What are EFS files starting with .nfs?

0

I'm trying to debug a file-based PHP CMS that is continuously trying to write a file, but failing. I saw the following:

-rw-r--r-- 1 webapp webapp  87717 Aug  2 09:01 response.cache
-rw-r--r-- 1 webapp webapp 167700 Aug  2 09:57 .nfs3bb62bc5d551a49f0000000c

There's the old file response.cache and a file starting with ".nfs" that contains updated content. My guess is that EFS is in the process of writing the file while other instances of the PHP script try to read/write it. In any case, it appears to be a part of the issue.

What is that file?

dodov
demandé il y a 2 ans669 vues
1 réponse
1
Réponse acceptée

Hi dodov,

In Linux running over NFS, .nfs files are created when a file opened on a client is deleted from the file system while still opened. The client renames the file to a fairly long string like you're seeing in order to discourage other clients or processes from using the file.

Usually you can find out what process is causing using the lsof command, in this case:

lsof .nfs3bb62bc5d551a49f0000000c

This will output the process that is working with the file, and if necessary, you can then kill said process.

profile pictureAWS
répondu il y a 2 ans
  • So this is a Linux feature, rather than an EFS feature? What doesn't make sense to me is that in my case, files were never deleted (to my knowledge, at least). They were only read and written rapidly. Is there another reason why .nfs files could appear? Do you know of any documentation on the matter?

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions