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
已提問 2 年前檢視次數 664 次
1 個回答
1
已接受的答案

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
已回答 2 年前
  • 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?

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南