I posted a question here because my HDDs keep spinning up for no apparent reason and wanted to find out what process causes them to spin up.
In the comments to that question, I was told to use iosnoop
which (without any arguments or switches) generated a few hundred lines within the few minutes it took one of the HDDs to randomly spin up. After copying the output and telling Emacs to remove all lines with the device number corresponding to the SD card (about accesses to which I don't care), I'm left with this:
COMM PID TYPE DEV BLOCK BYTES LATms
dumpe2fs 19467 R 8,0 272648 4096 23.25
^C
Ending tracing...
As there only is 1 line of data left, it seems reasonable to assume that the culprit has been identified. But why is dumpe2fs
called randomly? More important than that: How do I make it stop, preferably without breaking stuff (which the dirty solution of renaming the corresponding file might do)?
Running sudo dumpe2fs /dev/sda1
manually does make the corresponding HDD spin up. The command, however, does already return its output and terminate before the HDD is spun up (without the ~ 7 s delay I experience when accessing files while the HDDs are spun down).
I use Ubuntu Mate 16.04.
Best Answer
To figure out why
dumpe2fs
is being run, you could replace it with a logger. Rename/sbin/dumpe2fs
to/sbin/dumpe2fs.real
, and create a script called/sbin/dumpe2fs
containingThen look through the log file to determine what’s running
dumpe2fs
...