You are not logged in.

#1 2022-11-05 00:18:23

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 310

udisks2 constantly waking up hard disk

Hi,

I have a HDD of the spinning type, which should only be used rarely. I'd like this HDD to go to standby mode when it's not in use for a while, and I set it up with hdparm that it should do so after a few hours of not being used. However, it's always spinning anyway, and I used btrace to find that the process that's activating it all the time is pool-udisksd, and this is udisks2 (aka just udisks, or udisksctl).

I found some information about this, and this could be either polling or housekeeping done by udisks. However, most info for disabling this polling is for udisks v1, and today it looks like we use udisks2 instead.

Are there any modern instructions for making udisks2 not wake up disks or prevent disks from going to standby?

I think any of the following would be useful:

-a way to disable any polling or housekeeping by udisks2
-a way to configure udisks2 to ignore one specific disk
-if none of those is possible, a way to not have udisks2? Can this be removed from the system, and what would break?

Thanks!

Last edited by aardwolf (2022-11-05 00:20:35)

Offline

#2 2022-11-05 00:33:16

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: udisks2 constantly waking up hard disk

aardwolf wrote:

-a way to disable any polling or housekeeping by udisks2
-a way to configure udisks2 to ignore one specific disk

man udisks
aardwolf wrote:

-if none of those is possible, a way to not have udisks2? Can this be removed from the system, and what would break?

pactree -r udisks2

CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#3 2022-11-05 00:38:27

aardwolf
Member
From: Belgium
Registered: 2005-07-23
Posts: 310

Re: udisks2 constantly waking up hard disk

> man udisks

I already read this and it's not particularly helpful. It doesn't list anything related to ignoring polling or changing polling or housekeeping interval. It lists a "UDISKS_IGNORE", but this does not look related to choosing to ignore a certain disk. It lists a StandbyTimeout but I don't think this can help, udisks is waking up disks that are already in standby (e.g. if I manually do so with hdparm -Y), so even if udisks will do StandbyTimeout, it'd wake up it again anyway during its housekeeping.

> pactree -r udisks2

Lists a huge amount of things, so not an option to not have it I assume.


Does anyone have success not spinning up hard disks with modern archlinux on modern systems?

Last edited by aardwolf (2022-11-05 00:41:08)

Offline

#4 2022-11-05 01:19:42

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,171

Re: udisks2 constantly waking up hard disk

I don't know, but the man udisks page suggested to me you should be looking at udev so that udisks gets a configuration you want. There is also the bit about creating drive-specific configuration files, but I don't know how helpful that might be.

udisks2 isn't required, but it may be a requirement for things you want to keep.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#5 2022-11-05 08:05:47

frostschutz
Member
Registered: 2013-11-15
Posts: 1,647

Re: udisks2 constantly waking up hard disk

I didn't have much (any) success trying to configure udisks2, the ignore properties etc. didn't seem to do anything. Ended up masking it entirely. Even so, the drives still wake up sometimes.

It's difficult to debug what triggered it, or I'm just bad at using kernel tracepoints. There used to be /proc/sys/vm/block_dump but it got removed, and it would not catch smartctl-alike triggers anyway.

It's also the fault of the drives themselves... my old 2TB drives did not wake up from hdparm or smartctl no matter what. My "new" (already old too) 6TB / 8TB drives all wake up easily. Something changed in these drives so you can't even query a few bytes of statistic and log entries without spinup anymore. Something that easily fits into the drives ram cache a thousand times over.

Even Windows does not manage to keep these drives in standby. Windows sends them into standby by default, and also regularly wakes them from standby by default. Even if those drives don't use a single Windows filesystem so Windows should never access them at all.

It's a nightmare all around and I ended up solving it by moving my HDD's to USB and pulling the plug. Which requires umounting first so it's not the same thing as standby at all.

If you're using NVMe SSD and the SATA controller is dedicated to HDD only, you could also unbind the entire sata controller after turning the drives off. That removes the drives altogether from the system so they should stay off indefinitely.

Rebinding the controller will wake up all drives instead just a specific one, though. So it's an all-or-nothing.

Offline

Board footer

Powered by FluxBB