This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

Different spindown times

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Different spindown times

Post by chrisf4lc0n »

What I want to achieve is to have all the drives spinning all the time during the day, so there is no delay in accessing the files and all of them spun down during the night when I am not using them.
I am trying to work out how to set different spindown times for the hdds in a given pool at night and during the day.

I could probably use "camcontrol sleep" and "camcontrol standby" with crontab.

My questions are:
1. Would that clash with the webGUI settings?
2. Which command does spin the disks down is it sleep or standby?
Watercooling is just the beginning ;)

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Different spindown times

Post by chrisf4lc0n »

My crontab:

Code: Select all

0 6 * * * root camcontrol standby ada1 -t 3600
0 6 * * * root camcontrol standby ada2 -t 3600
0 6 * * * root camcontrol standby ada3 -t 3600
0 6 * * * root camcontrol standby ada4 -t 3600
0 6 * * * root camcontrol standby ada5 -t 3600
0 6 * * * root camcontrol standby ada6 -t 3600
0 23 * * * root camcontrol standby ada1 -t 600
0 23 * * * root camcontrol standby ada2 -t 600
0 23 * * * root camcontrol standby ada3 -t 600
0 23 * * * root camcontrol standby ada4 -t 600
0 23 * * * root camcontrol standby ada5 -t 600
0 23 * * * root camcontrol standby ada6 -t 600
That should spindown the disks after 1h of idle between 06:00hrs and 23:00hrs and 10 minutes between 23:00hrs and 06:00hrs.
Watercooling is just the beginning ;)

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Different spindown times

Post by chrisf4lc0n »

It seems to be working...
The disks definitely spin down, still have to test if they are staying on for the period of time stated in crontab :)
Watercooling is just the beginning ;)

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Different spindown times

Post by chrisf4lc0n »

For anyone interested, these is how to test if the drives are still spinning, look at the last 2 digits of the output if they are "00" drives are not spinning if they are "FF" the drives are running:

My main pool:

Code: Select all

nas4free: ~ # camcontrol cmd ada1 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 00 00 00 00 00 00 00 00
nas4free: ~ # camcontrol cmd ada2 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 00 00 00 00 00 00 00 00
nas4free: ~ # camcontrol cmd ada3 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 78 00 00 00 00 00 00 00
nas4free: ~ # camcontrol cmd ada4 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 78 00 00 00 00 00 00 00
nas4free: ~ # camcontrol cmd ada5 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 00 00 00 00 00 00 00 00
nas4free: ~ # camcontrol cmd ada6 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 00 00 00 40 00 00 00 00 00
nas4free: ~ #
HDD on which the Transmission is running 24/7:

Code: Select all

nas4free: ~ # camcontrol cmd ada0 -a "E5 00 00 00 00 00 00 00 00 00 00 00" -r -
50 00 80 00 00 00 00 00 00 FF 00
Last edited by chrisf4lc0n on 16 Dec 2013 16:36, edited 1 time in total.
Watercooling is just the beginning ;)

chrisf4lc0n
Advanced User
Advanced User
Posts: 262
Joined: 07 May 2013 13:15
Location: West Drayton (London)
Status: Offline

Re: Different spindown times

Post by chrisf4lc0n »

Oh, and one more thing, all the changes in the "crontab" need to be done via WebGUI as if you simply edit the "crontab" from the shell all the changes will be lost :( I am obviously talking about the full installation of the N4F...

I hope that this simple guide will help someone :)
Watercooling is just the beginning ;)

User avatar
mrjacobrussell
Starter
Starter
Posts: 62
Joined: 05 Jun 2015 17:57
Status: Offline

Re: Different spindown times

Post by mrjacobrussell »

how would you add this to cron tab ??
is the 3600 seconds ?
11.2.0.4 - Omnius (revision 6766)
x64-embedded on Intel(R) Core(TM) i7-2600 CPU @ 3.40GHz 16gb ram 15.4Tb pool storage

Post Reply

Return to “ZFS (only!)”