0

I want to investigate what keeps my drives spinning on my nas. Which commands help me to get insight on which files are being opened and preventing my disks to sleep?

2
  • sometimes its enough if smartd is running ... or a new ext4 filesystem is still doing the lazy init ... maybe related unix.stackexchange.com/a/533796/30851 Commented Mar 3, 2024 at 10:23
  • btrace can be handy: it "traverses" all block layers. Commented Mar 3, 2024 at 17:22

2 Answers 2

0

If I got it correctly, you should use the lsof command:

lsof | grep /path/to/your/disk

This command will show you which processes have files open on that disk.

3
  • This will not work if you run docker containers. The opened files will not show up Commented Mar 3, 2024 at 21:06
  • @faze you didnt ask for Docker... Its better to add Docker to your question. Commented Mar 3, 2024 at 22:57
  • Open files do not necessarily mean they are being read from/written to. An application may create and delete files. Commented Mar 4, 2024 at 9:13
0

Try sudo fatrace --timestamp --filter='WD<>+'

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.