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年前669ビュー
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?

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ