HDD Spindown Timer

HDD Spindown Timer 2.2.0

The script was successfully tested on the latest TrueNAS-13.0-U5.1 (CORE) release :)
The script was successfully tested on the latest TrueNAS-13.0-U4 (CORE) release :)

Changelog​

  • Introduce the check mode (-c) to display the current power mode of all monitored drives every POLL_TIME seconds. See README.md > Using the check mode for more details.
This version introduces a new ZFS pool based operation mode. The script is now able to work on both per-disk or on a ZFS pool basis. It was tested to work on TrueNAS CORE and SCALE :)

Check the updated README.md for more details.

Changelog​

  • A new CLI argument was introduced to switch between disk and zpool operation mode: -u <MODE>
  • When no operation mode is explicitly given, the script works in disk mode. This completely ignores zfs pools and works as before.
  • When operation mode is set to zpool by supplying -u zpool, the script now operates on a per-zpool basis. I/O is monitored for the pool as a whole and disks are only spun down if the complete pool was idle for a given number of seconds. ZFS pools are either detected automatically or can be supplied manually (see help text for -i and -m).
  • Drives are referenced by GPTID (CORE) or partuuid (SCALE) in ZFS pool mode.

Acknowledgements​

Thanks to @jojolll and @gpatkinson for helping with testing this release! :smile:
The script was successfully tested on the latest TrueNAS-13.0-U3.1 release :)

Additionally the README was updated to include instructions on the implications of System Dataset placement. See: https://github.com/ngandrass/truenas-spindown-timer/#system-dataset-placement

Changelog​

  • Added support for TrueNAS SCALE using hdparm instead of camcontrol. The script automatically detects the environment it is run in.

Acknowledgements​

Thanks to @derWalter, @Hafnernuss and everyone from the following thread that contributed information: https://www.truenas.com/community/threads/prevent-frequent-reads-from-waking-up-hdds.93176/

Further thanks to @Nex-Carter for providing access to a TrueNAS SCALE system for testing
The script was successfully tested on the latest TrueNAS-12.0-U8.1 release :)
  • Like
Reactions: Cantello
  • This project was renamed from freenas-spindown-timer to truenas-spindown-timer. Repository URLs changed accordingly.
  • Information within the README.md got an update.
  • The script was successfully tested on the latest TrueNAS-12.0-U8 release :)
  • Include an option to shutdown the system after all monitored drives are idle for a specified number of seconds. Thanks to @hschwane
For more details see: https://github.com/ngandrass/freenas-spindown-timer
The script was successfully tested on the latest TrueNAS-12.0-U7 release :)
Top