@KarstenV Yes a simpler disk (health) status view has come up and we have have an issue and a forum thread that relates to this.
@KarstenV Yes that’s the nub of it, at least from Rockstor’s web interface point of view. However many systems these day do provide an ability to power themselves up at say 6:30am every day. I do this on a NUC I use as a home server / wifi access point. Care has to be taken though with things like BST as the BIOS clock doesn’t adjust to such things but still that’s your auto power on (by schedule) sorted for now.
The 4.2 kernel is to bring the ability to flash uefi bios and I think this will usher in a more standard way to configure BIOS capabilities like auto/timed wakeup so via that mechanism Rockstor will be able to talk and configure such things in the future, assuming UEFI bios that is; but all new systems coming out are uefi so that’s an upside to it. WOL, or Wake On Lan is another common feature with new hardware where one can wake a machine simply by sending a specially crafted network signal to its network card. Of course this requires another system but still, its a remote wakeup of sorts (the machine going the waking has to be on the local network though I believe). The OpenWRT route firmware has a program to be able to do this to any machine on the local network.
I do this also with my house NUC via a cron job and if we can catch @suman on a not 100 things day or two we may get a task category added for this, ie set a task to shutdown at a set time each day. I use a cron job as then it will always stand where as if you do something like “shutdown 23:30” it will shutdown at 11:30pm that day but say you reboot after that command, I’m not sure that request will still stand. Anyway the cron job and how to assert it is as follows:-
# First unless you are fine with vi you may want to install nano
yum -y install nano
So now the default editor for this terminal session should be nano, @suman if Rockstor moves to nano installed by default we could put this in roots .bashrc.
# invoke the default editor on the root's crontab
# now enter the following 2 lines in that editor window
# columns are | Minutes | Hour | DayOfMonth | Month | DayOfWeek
30 0 * * * /sbin/poweroff
So the above sets up a poweroff command (a clean shutdown) at 30 mins past midnight every day.
Might server in the meantime until greater integration (GUI option) comes about anyway.
Its not on a schedule but it is automatic.
Again on the NUC i use the hdparm program to tell the drive in this case to go to sleep if unused after 5 minutes:-
# Making sure Hard Disks get enough sleep
# install the hard disk parameters program
yum -y install hdparm
# spin down after x*5 seconds if 0 < x < 240
# so a value of 60 for x is (x*5)/60 = (60*5)/60 = 5 mins
# Note this is for drive sdb see your Name column in Disks section of the WebUI for this
/sbin/hdparm -S60 /dev/sdb
So 5 mins might be a bit aggressive for your needs but you get the idea. Its a trade of between stop start wear and the drive being available for instant use but taking more power. Given that in my case this is a laptop drive then it is designed with these agressive cycles in mind. A better NAS figure might be 10 or 20 mins ie values of 120 or 239.
But of course if there is any filesystem requirements they will be woken or kept from sleeping. -S is standby so this should involve the drive platter motor spinning down. Currently there is something I have yet to get the time to look at in Rockstor which is keeping at lest my drives awake, I will report back here once I find it.
However a smart status check can cause a drive to wake but this can be configured also; again on the NUC I use in /etc/smartd.conf, or in CentOS /etc/smartmontools/smartd.conf :-
# Don’t spin up drive to test unless 15 missed checks because of this
# short self-test once a day except on sunday when we do long self-test (11am for both)
# mail root with result as we already receive root’s email
# report errors daily rather than just once
# an additional -M test directive would also send a test email on smartd startup.
/dev/sda -a -W 6,45,55 -n standby,15,q -s (S/../../[1-6]/11|L/../../7/11) -m root -M daily
My particular directive is a little different as it uses an Ubuntu ism that I don’t know the equivalent of in CentOS yet but you get the idea. Now I am as yet unsure of how this plays with Rockstor’s build in systems so far but the above command also includes a Warn and Over temperater of 45 and 55 degrees C. I am detailing here so we can work on integrating such things into Rockstor as I know the smart subsystem is due to undergo an overhaul as it where.
I know these are all command line options but I am putting these out in case they help in some way or so that others can suggest alternatives / improvements that might be integrated into Rockstor.