HDD always spinning up

HDDs keep spinning up in TrueNAS Scale 24.10. SMARTd is disabled, there is no swap on the drives, and the pool is exported, yet the system still spins the drives up. The drives are manually spun down using sg_start --stop /dev/sdX. Any ideas on what could be causing this behavior?

Dmesg:
[236174.296718] sdbi: sdbi1
[236174.300391] sd 17:0:33:0: [sdbj] Spinning up disk…
[236175.334343] …ready
[236186.626522] sdbj: sdbj1
[236186.630023] sd 0:0:32:0: [sdbk] Spinning up disk…
[236187.653175] …ready
[236202.018397] sdbk: sdbk1
[236202.021988] sd 0:0:34:0: [sdbl] Spinning up disk…
[236203.043701] …ready

Is the system-daraset located on that pool? If yes change the location of the system dataset to your boot pool. Every 5-10 seconds there’s writes for metric collection going to the system dataset, which will prevent the drives from spinning down

No system dataset. As I write, the pool is exported.

Have you check under storage > disks > edit of the single disk > power management section if can be some setting that prevent them to spin-down?
Also afaik from some thread on forum enterprise disks can not spin-down at all

The only available settings in the disk section of TrueNAS Scale are SMART and Advanced Power Management (APM). SMART is disabled per disk, as well as the whole service. HDD standby is set to 5 minutes, and APM is set to Level 1. However, the disk does not spin down. When I manually spin it down using sg_start --stop, the system in few minutes starts it back.

Which brand/model of drives?

I found that this behaviour is caused by a udev rule in the file /usr/lib/udev/rules.d/60-block.rules, specifically the following rule:

# watch metadata changes, caused by tools closing the device node which was opened for writing

ACTION!=“remove”, SUBSYSTEM==“block”,
KERNEL==“loop*|mmcblk*[0-9]|msblk*[0-9]|mspblk*[0-9]|nvme*|sd*|vd*|xvd*|bcache*|cciss*|dasd*|ubd*|ubi*|scm*|pmem*|nbd*|zd*”,
OPTIONS+=“watch”

When I comment out this line, the system stops spinning up the disks.

1 Like

This is very interesting.

I never managed to spin down disks although followed the guide from here HDD Sleep/Spindown/Standby

The guide doesn’t mention anything about metadata…