truenas-spindown-timer
truenas-spindown-timer copied to clipboard
Add option to use smartctl instead of hdparm -C, -I. Skip idle check if all drives are already sleeping.
-
hdparm -C and/or hdparm -I may wake up some drive, so added option (-r) to use smartctl instaead of hdparm(Afaik smartctl -i does not wake up drive).
-
During main loop, all_drive_idle check looks not really worthy if all drives are sleeping already. So Added check if all drive_is_sleeping before all drive_is idle check.