Skip to content

Regression in v1.21: Drives fail to spin down after the first wake-up cycle #131

@nicoh88

Description

@nicoh88

Environment

  • hd-idle (working): 1.05
  • hd-idle (faulty): 1.21+ds-1+b8 (from the Debian 13 "Trixie" repository)
  • Host OS: Proxmox VE 9 (based on Debian 13)
  • Setup Specifics: Three SATA HDDs are passed through to a Debian VM using "Raw Disk Passthrough". hd-idle is running on the Proxmox host, as the guest VM cannot control the physical power state of the drives.  

Bug Description

  • A specific regression is present in hd-idle version 1.21. After restarting the hd-idle service, the drives are correctly put into standby after the specified timeout. However, once the drives are woken up by any access, hd-idle fails to put them back into standby after they become idle again.
  • The core issue appears to be that the daemon does not correctly recognize or process the new "active" state of the disk after the first wake-up event. Consequently, the idle timer is not reset, and no further spindown commands are sent.
  • This behavior does not occur with the older version 1.05, which handles repeated spin-down cycles reliably under the exact same configuration.

Expected Behavior

  • After a disk wakes up, hd-idle should detect the activity, reset its idle timer, and successfully spin the disk down again after the timeout period expires.

Actual Behavior

  • hd-idle only spins the disks down once after the service starts. After the first wake-up, the disks remain permanently in the active/idle state, as confirmed by hdparm -C. A service hd-idle restart is required to trigger the spin-down cycle one more time.

Additional Context and Troubleshooting

  • Workaround: Downgrading to hd-idle version 1.05 completely resolves the issue.
wget http://ftp.de.debian.org/debian/pool/main/h/hd-idle/hd-idle_1.05+ds-2+b1_amd64.deb
dpkg -i hd-idle_1.05+ds-2+b1_amd64.deb
  • Troubleshooting Attempt: Adding the -c ata parameter to the HD_IDLE_OPTS in version 1.21 was attempted but had no effect. The behavior remained unchanged.
  • Related Issue: This problem appears to be directly related to Issue hd-idle only works once after a reboot #123 , which describes a similar state-tracking problem.

Configuration and Logs

/etc/default/hd-idle Configuration:

START_HD_IDLE=true
# 15 Minuten
# HD_IDLE_OPTS="-l /var/log/hd-idle.log -i 0 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAKKATYL -i 900 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAG81VEL -i 900 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VDHLMYRD -i 900"
# 1 Minute
#HD_IDLE_OPTS="-l /var/log/hd-idle.log -i 0 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAKKATYL -i 60 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAG81VEL -i 60 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VDHLMYRD -i 60"
# 1 Minuten inkl. "ata"
#HD_IDLE_OPTS="-c ata -l /var/log/hd-idle.log -i 0 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAKKATYL -i 60 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAG81VEL -i 60 -a /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VDHLMYRD -i 60"

journalctl -u hd-idle (shows the first, successful cycle):

Aug 29 08:36:29 proxmox hd-idle[562610]: /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAG81VEL spindown
Aug 29 08:36:31 proxmox hd-idle[562610]: /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAKKATYL spindown
Aug 29 08:36:32 proxmox hd-idle[562610]: /dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VDHLMYRD spindown

(Note: After this initial cycle, no further spindown or spinuo events are logged, even though the disks remain active).

/etc/lvm/lvm.conf (proxmox additional):

devices {
     # added by pve-manager to avoid scanning ZFS zvols and Ceph rbds
     #global_filter=["r|/dev/zd.*|","r|/dev/rbd.*|"]
     global_filter=["r|/dev/zd.*|","r|/dev/rbd.*|", "r|/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAKKATYL.*|", "r|/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VAG81VEL.*|", "r|/dev/disk/by-id/ata-WDC_WD80EFAX-68KNBN0_VDHLMYRD.*|"]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions