Jump to content

Disk power management & sleep settings?


SIGSEGV

Recommended Posts

Can you guys share your experience with disk sleep on the Helios64 + Armbian.

In my case I haven't seen the disks sleep - they are always spinning (or so they seem) and never on standby.

I have a standalone /dev/sda and a RAID5 array with disks /dev/sd[b-e] (created with mdadm) - and XFS formatted logical volumes on top of these.

 

  • 'iotop' says that nothing is accessing the disks:

iotop.png.950a099f53840006d7c4f3d4fd09b09a.png

  • 'hdparm -B /dev/sd[a-z]' after each reboot is always:
sudo hdparm -B /dev/sd[a-e]

/dev/sda:
 APM_level	= 254

/dev/sdb:
 APM_level	= off

/dev/sdc:
 APM_level	= off

/dev/sdd:
 APM_level	= off

/dev/sde:
 APM_level	= off
  • 'hdparm -C /dev/sd[a-z]' is always:
$ sudo hdparm -B /dev/sd[a-e]

/dev/sda:
 APM_level	= 254

/dev/sdb:
 APM_level	= off

/dev/sdc:
 APM_level	= off

/dev/sdd:
 APM_level	= off

/dev/sde:
 APM_level	= off
  • Added a rule to set power management parameters and it seems to be ignored
$ cat /etc/udev/rules.d/99-hdd-pwm.rules
ACTION=="add|change", KERNEL=="sd[a-z]", ATTRS{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 63 -S 120 /dev/%k"

 

Link to comment
Share on other sites

@SIGSEGV Which HDD brand and model are you using ?

 

https://withblue.ink/2016/07/15/what-i-learnt-from-using-wd-red-disks-to-build-a-home-nas.html

 

Quote

On Linux, the traditional way to control disk standby (and power management) is to use hdparm; however, hdparm will not work with WD Red drives, because the firmware of the disks doesn’t support that

 

Link to comment
Share on other sites

I send my  disks to sleep with the following hdparm.service script:

 

# cat /etc/systemd/system/hdparm.service
[Unit]
Description=hdparm sleep

[Service]
Type=oneshot
ExecStart=/usr/sbin/hdparm -q -S 60 -y /dev/sda
ExecStart=/usr/sbin/hdparm -q -S 60 -y /dev/sdb
ExecStart=/usr/sbin/hdparm -q -S 60 -y /dev/sdc
ExecStart=/usr/sbin/hdparm -q -S 60 -y /dev/sdd
ExecStart=/usr/sbin/hdparm -q -S 60 -y /dev/sde

[Install]
WantedBy=multi-user.target

 

Link to comment
Share on other sites

@privilegejunkie what specific model? My guess is that the answer is no, though. That's a relatively old article and the WD utility mentioned there only applies to old Red drives that are 4TB and below. For WD drives that support IDLE3, you can try to use idle3ctl (apt install idle3-tools) to manage their idle setting. I've turned idle3 off on all my drives because they're usually idle for, at most 5 minutes leading to constant sleep/wake.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines