ngandrass / truenas-spindown-timer

Monitors drive I/O and forces HDD spindown after a given idle period. Resistant to S.M.A.R.T. reads.
MIT License
276 stars 28 forks source link

Drive wakes up every 5/10 minutes with the script running #15

Closed andreybavt closed 1 year ago

andreybavt commented 1 year ago

I'm running the script with the following arguments:

/root/custom-scripts/spindown_timer.sh -vmi ada0 -p 10 -t 100

And given that I don't do anything with TrueNAS I still have the following in the logs:

grep -v timeout /tmp/nohup.out

2022-11-30 18:57:06 Spun down idle drive: ada0
2022-11-30 18:58:46 Drive is already spun down: ada0
2022-11-30 19:00:27 Drive is already spun down: ada0
2022-11-30 19:02:08 Spun down idle drive: ada0
2022-11-30 19:03:48 Drive is already spun down: ada0
2022-11-30 19:05:28 Drive is already spun down: ada0
2022-11-30 19:07:09 Drive is already spun down: ada0
2022-11-30 19:08:50 Drive is already spun down: ada0
2022-11-30 19:10:30 Drive is already spun down: ada0
2022-11-30 19:12:11 Spun down idle drive: ada0
2022-11-30 19:13:52 Drive is already spun down: ada0
2022-11-30 19:15:32 Drive is already spun down: ada0
2022-11-30 19:17:13 Spun down idle drive: ada0
2022-11-30 19:18:54 Drive is already spun down: ada0
2022-11-30 19:20:34 Drive is already spun down: ada0
2022-11-30 19:22:15 Drive is already spun down: ada0
2022-11-30 19:23:55 Drive is already spun down: ada0
2022-11-30 19:25:35 Drive is already spun down: ada0
2022-11-30 19:27:16 Spun down idle drive: ada0
2022-11-30 19:28:57 Drive is already spun down: ada0
2022-11-30 19:30:37 Drive is already spun down: ada0
2022-11-30 19:32:18 Drive is already spun down: ada0
2022-11-30 19:33:58 Drive is already spun down: ada0
2022-11-30 19:35:39 Drive is already spun down: ada0
2022-11-30 19:37:20 Spun down idle drive: ada0
2022-11-30 19:39:00 Drive is already spun down: ada0
2022-11-30 19:40:40 Drive is already spun down: ada0
2022-11-30 19:42:22 Spun down idle drive: ada0
2022-11-30 19:44:02 Drive is already spun down: ada0
2022-11-30 19:45:43 Drive is already spun down: ada0
2022-11-30 19:47:24 Spun down idle drive: ada0
2022-11-30 19:49:04 Drive is already spun down: ada0
2022-11-30 19:50:45 Drive is already spun down: ada0
2022-11-30 19:52:26 Spun down idle drive: ada0
2022-11-30 19:54:06 Drive is already spun down: ada0
2022-11-30 19:55:46 Drive is already spun down: ada0

my TrueNAS is installed on eMMC with 2 drives: SSD and HDD (ada0):

image

I was expecting Spun down idle drive to rarely happen, but they appear every 5/10 minutes

Are there any recommendations to help with debugging what can be waking up the drive?

andreybavt commented 1 year ago

Update: turns out it's SMART checks that were constantly waking the disk up

ngandrass commented 1 year ago

Thanks for clearing things up :+1:

Is this problem fixed now or do you still experience problems?

andreybavt commented 1 year ago

it's better now, no regular drive awakenings.

ngandrass commented 1 year ago

Good to hear :)