Releases: ngandrass/truenas-spindown-timer
Releases · ngandrass/truenas-spindown-timer
Version 2.5.0 (2025-06-15)
Changelog
- Fix spindown of SCSI drives when using
smartctl - Prefer use of
smartctloverhdparmon TrueNAS SCALE - Exit on start if script is not run as root
- Root privileges are required to access the drives and programms like
camcontrolorhdparm
- Root privileges are required to access the drives and programms like
Version 2.4.0 (2025-02-07)
Changelog
- Fix shutdown mode on TrueNAS SCALE
- Add support for using
smartctlto interact with drives - Allow selection of disk control tool (
camcontrol,hdparm,smartctl) via CLI argument-x - Improve host system detection to distinguish between TrueNAS CORE and TrueNAS SCALE
- Simplify active drive detection
- Skip drive I/O detection loop if all monitored drives are already sleeping
Version 2.3.0 (2024-08-26)
Changelog
- Introduce syslog mode (
-l). If set, all output is logged to syslog instead of stdout/stderr. - Introduce one shot mode (
-o). If set, the script performs exactly one I/O poll interval, then immediately spins down drives that were idle for the lastPOLL_TIMEseconds, and exits. - Skip NVMe drives during drive detection.
- Exit with an error, if no drives were found during drive detection.
Version 2.2.0 (2023-02-20)
Changelog
- Introduce the check mode (
-c) to display the current power mode of all monitored drives everyPOLL_TIMEseconds. See README.md > Using the check mode for more details.
Version 2.1.0 (2023-02-19)
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
diskandzpooloperation mode:-u <MODE> - When no operation mode is explicitly given, the script works in
diskmode. This completely ignores zfs pools and works as before. - When operation mode is set to
zpoolby 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-iand-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! 😄
Version 2.0.1 (2022-09-17)
Changelog
- Added support for TrueNAS SCALE using
hdparminstead ofcamcontrol. 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 👍