HDD spindown schedule


Recommended Posts

Hi!

 

I have a feature I've been thinking about for a while.

First the problem.

I want to use the spindown on my HDDs, I work usually 8 hours a day, and I sleep 6-7 hours,  :) so that takes off a lot of time that I don't necessarily need the drives to be ready on the go. However when I do come home, and start to use the system I want it to be ready, without delay, as it is now, it's not. It always takes some time for me to access my files, also because I chose to fill up my least used drive, which makes my files spread out(I want it that way). My option today would be to turn off spindown, but it seems like such a waste since im gone most of the day.

 

So what I thought would be nice would be the possibility to allow spindown during a set time frame during the day. For me I'd probably set it to allow for spindown from 01:00-15:00 just to make sure I cover all my changing schedule in life :) What that would mean is that from 01:00 the spindown timer which can already be set today in unraid would start counting.

 

This would allow me to have the spindown in use most of the time, but when I'm home and awake the system would always be ready to go!

 

Thoughts?

Link to comment

What I'm going for is a solution that don't require every user to make their own script for this.

 

I'm not sure how to make a script like that on top of the head, I also use a plugin for caching the directories already which would make simple commands such as "ls" not causing the drives to read.

 

Okay, so I solved it, might as well post it here if someone else wants to use it.

 

script is:

#!/bin/bash
echo 1 > /mnt/disk1/awakedrive
echo 1 > /mnt/disk2/awakedrive
echo 1 > /mnt/disk3/awakedrive
echo 1 > /mnt/disk4/awakedrive
echo 1 > /mnt/disk5/awakedrive
echo 1 > /mnt/disk6/awakedrive

 

cronschedule is:

0 15-23 * * 1-5

 

I think I will add another one for weekends later.

Edited by Nischi
I added my script
Link to comment

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.