Score:0

Stopping HDD from Sleeping

kp flag

I'm using Ubuntu 21.04

I don't want my HDDs to go idle at all. For the process I'm doing I never want them to sleep. So I have hd-idle installed.

If I run hd-idle -i 0 my understanding is that none of the HDD will go idle. My first question is, is that correct?

Secondly, I want this to be the case even on reboots.

I updated my file here: /etc/default/hd-idle thusly:

# defaults file for hd-idle

# start hd-idle automatically?
START_HD_IDLE=true

# hd-idle command line options
# Options are:
#  -a <name>               Set device name of disks for subsequent idle-time
#                          parameters (-i). This parameter is optional in the
#                          sense that there's a default entry for all disks
#                          which are not named otherwise by using this
#                          parameter. This can also be a symlink
#                          (e.g. /dev/disk/by-uuid/...)
#  -i <idle_time>          Idle time in seconds.
#  -l <logfile>            Name of logfile (written only after a disk has spun
#                          up). Please note that this option might cause the
#                          disk which holds the logfile to spin up just because
#                          another disk had some activity. This option should
#                          not be used on systems with more than one disk
#                          except for tuning purposes. On single-disk systems,
#                          this option should not cause any additional spinups.
#
# Options not exactly useful here:
#  -t <disk>               Spin-down the specfified disk immediately and exit.
#  -d                      Debug mode. This will prevent hd-idle from
#                          becoming a daemon and print debugging info to
#                          stdout/stderr
#  -h                      Print usage information.
HD_IDLE_OPTS="-i 0 -l /var/log/hd-idle.log"

Will that make it so that all connected HDDs won't go idle at all?

in flag
The first question I would ask is: *Have you tried this?* `hd-idle` is an older tool, but may do the trick. If you find it does not work, then there’s a good chance the `udisks2` daemon is overriding the idle time shutdown.
waltinator avatar
it flag
Telling us which remote procedure (RP) you "followed" doesn't help us help you for N reasons: 1) It's remote. Will the link exist tomorrow? 2) Reading the RP doesn't tell us how accurately you "followed" it. Did you suffer typos or missed lines? We have. 3) Reading the RP omits the error messages you got on your system. These error messages (and the commands that caused them) are key elements in any diagnosis.
youngfong avatar
kp flag
@matigo yes, hd-idle is what I'm trying.
youngfong avatar
kp flag
@guiverc Ubuntu 21.04
youngfong avatar
kp flag
@waltinator Thanks for your input on how to ask questions in a better way.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.