Solution:
hd-idle is the way to go (if you read their README, they explain that most drives don’t support idle timers)

I’ve been looking into spinning down the drives of my NAS, as I use it infrequently and that brings power drain down from ~30W to ~17W.

Problem is, hdparm -S doesn’t seem to do anything for these particular drives: if I set it and wait for the appropriate amount of time (eg. 5 seconds if set to 1) the drives are still reported as “active/idle” and power drain doesn’t go down.

Both hdparm -y and hdparm -Y work fine, but I don’t seem to be able to find settings for them in tlp (probably because they are commands rather than settings?).

Besides the caveats about disks living longer if they are kept spinning, are there reasons why I shouldn’t setup a cron job (well, a systemd timer) that runs hdparm -Y every 10 minutes? (for example, could hdparm -y cause errors if run while the drive is being backed up?)

PS: According to hdparm’s manpage, -y puts the drive standby mode while -Y puts it into sleep mode. Considering that in my case power drain seems the same either way, should I prefer one or the other?

  • ReversalHatchery@beehaw.org
    link
    fedilink
    English
    arrow-up
    6
    ·
    4 hours ago

    Besides the caveats about disks living longer if they are kept spinning,

    I think that’s not necessarily true. I think spinning 24/7/365 has its downsides too, higher temperatures and others I’m less certain about.

    are there reasons why I shouldn’t setup a cron job (well, a systemd timer) that runs hdparm -Y every 10 minutes? (for example, could hdparm -y cause errors if run while the drive is being backed up?)

    because you’ll often shut it down while someone would be using it. and then it can spin up immediately. the processes accessing it would probably hang for half a minute or such.

    there is a better solution, hd-idle, as said in the other response

  • InnerScientist@lemmy.world
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 hours ago

    Use -B instead.

    Sets Advanced Power Management feature. Possible values are between 1 and 255, low values mean more aggressive power management and higher values mean better performance. Values from 1 to 127 permit spin-down, whereas values from 128 to 254 do not. A value of 255 completely disables the feature.)

  • RBG
    link
    fedilink
    arrow-up
    7
    ·
    4 hours ago

    I never got hdparm to work for me either. Hd-idle however works like a charm.

    • ReversalHatchery@beehaw.org
      link
      fedilink
      English
      arrow-up
      4
      ·
      4 hours ago

      hd-idle is the solution. it’s strictly better than the HDDs own feature, because if you have some system monitoring software that queries your disk stats every minute, that will always reset that timer. hd-idle is smarter than that.

  • slazer2au@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    6 hours ago

    Does the job get suspended if tasks are being done on the drive or will the task stall with the command being fired then the drive wakes up again defeating the purpose of the job?