Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Anlyzing why disks wake up
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 219
Location: Bayern [de]

PostPosted: Thu Dec 05, 2024 3:02 pm    Post subject: Anlyzing why disks wake up Reply with quote

I still have a few spinning disks on my home server which i put to sleep after inactivity.
They are on mounted filesystems but not system disks so i would not expect arbitrary IO on them.

They are bundled via btrfs raid 1 on top of lukscrypt for the individual devices.
Default setting is APM 127 and sleep timer set to S242 - 1 hour (via hdparm).

Sometimes they wake up and keep spinning. Sometimes only one of the raid1.
Now i wanted to understand the reason so that i may be able to reduce "unneeded" wakes.

I tried to
Code:
auditctl -a always,exit -F arch=b64 -F path=/mnt/mountpoint -F perm=wrxa -k mountpoint_watch

and observed if new entries are created for that watch using
Code:
 ausearch -k mountpoint_watch | wc -l


now one woke again without triggering an audit entry.
Therefore i assume it might be not applications waking via file access. But how could i proceed to find the cause.
Blktrace would not give hints on who was doing what.
iotop seems not to be suited as it also does not allow to observe activities on disks/mountpoints.

Any further hints? Thanks in advance.
Back to top
View user's profile Send private message
sublogic
Guru
Guru


Joined: 21 Mar 2022
Posts: 330
Location: Pennsylvania, USA

PostPosted: Fri Dec 06, 2024 3:08 am    Post subject: Reply with quote

https://askubuntu.com/questions/1406434/block-dump-reporting-missing-from-ubuntu-22-04

(emerge sys-block/blktrace to get the blktrace command.)
Back to top
View user's profile Send private message
steve_v
Guru
Guru


Joined: 20 Jun 2004
Posts: 419
Location: New Zealand

PostPosted: Fri Dec 06, 2024 4:01 am    Post subject: Re: Anlyzing why disks wake up Reply with quote

s|mon wrote:
now one woke again without triggering an audit entry.
Therefore i assume it might be not applications waking via file access. But how could i proceed to find the cause.
Blktrace would not give hints on who was doing what.


I've just been down this rabbithole... If nothing is accessing the filesystem, i.e. the drives wake even when unmounted, the most likely culprit is SMART polling (in my case combined with an ALPM issue of my own making, but I digress).
If you have smartd running, make sure it's configured to not wake drives that are in standby (-n [power state]).
If you have udisks running, then you'll have to patch it since they've been ignoring this bug (and this one, and this one, and this one) for years.
_________________
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.
Back to top
View user's profile Send private message
s|mon
Apprentice
Apprentice


Joined: 04 Jul 2004
Posts: 219
Location: Bayern [de]

PostPosted: Fri Dec 06, 2024 1:00 pm    Post subject: Reply with quote

just checked smartd is stopped and not configured to run, neither is udisks. But thanks for the hint (at least reading temp from hddtemp/gkrellm does not seem to wake them).
Blktrace i tried and i saw no application names but i will give it another look as they apear in the linked examples.

Thanks so far
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum