Features I would like in RockStor

I have been running RockStor for a short while, and find it performs well as a NAS.

My experiences with NAS’es come from the Netgear readynas series. The latest installment of the operating system for their NAS’s OS6, has some features I find very usefull.

It has an easy frontpage where you can basically see the status of the system, and will be warned of any problems. With a few clicks you can see all important information.

I especially like the way you can see disk statuses.

In their power menu they have a fuctionality, that lets you control disk -powerdown on a schedule. Meaning you can tell the NAS to power down e.g. during nighttime, and leave them allways on during daytime. I would very much like this feature in RockStor.
You can also power the NAS down and up again on a schedule, but I’m not sure this could be implemented on RockStor, due to lack of control over how to power the sytem up again.

Basically the features I miss are:

An easy system overview, with SMART statuses and alerts.

A disk power menu, where you can power down discs in periods where the NAS is not likely to see traffic.

I think this depends on hardware support, but definitely a nice feature to have. Here’s the issue so we don’t lose track: https://github.com/rockstor/rockstor-core/issues/735

I wonder if Linux already provides ways to do this automatically. I’d imagine that even if it does, it might trip up btrfs(as it stands today). So this may be far down the lane, but I hope awesome Linux people on the forum and shine some light on this.

I cant speak to how hard it is to implement this, but the Netgear NAS’es that run OS6 also use BTRFS, and on these series Netgear have the disk power down schedule implemented.

@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
export EDITOR="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
crontab -e
# 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.

Thank you, Philip, for your long and very comprehensive answer.

I have allready installed hdparm, and set every disk in the sytem to shut down after 15 minutes of in-activity. Thanks for the instructions on how to do this. As I understand it I will have to set these timeouts after every restart of the system?

Would it be possible to make some sort of batch/script file, that would set this, and another batch/script file that would reset this, and then use RockStor’s build in scheduler to run these at specific times every day?

So you could run the file that enables disk spin-down every day at e.g. midnight, and then run the file that disables spin-down every day at e.g. 14 o’clock?

@KarstenV, Thanks, glad you found it useful.
Currently the Rockstor scheduler is a specific tool for scans and snapshots only.
However you could use the generic cron system as I indicated to run your rather specific hdparm requirements once you put them in scripts.

Just remember to always put the full path to your scripts ie if you place them in /root you will have to reference them in the cron line as /root/script-name and the scripts will have to be executable by root and that root is an all powerful user that will happily help you shoot yourself in the foot if that is what you ask for :smiley:

This is all generic linux stuff as Rockstor is a pretty straight CentOS underneath so there are plenty of guides for customizing CenOS 7 but do remember that Rockstor is meant to be an appliance, so certain things you try may clash or break the “appliance” side, but given that “appliance” nature is still very much in development then if it servers you and you are game then why not. However it’s going to be difficult to address issues if you deviate from the Rockstor iso / update system; but what you suggest should work out OK if you are careful. I would stop short at enabling additional repos though, unless you have nothing to loose.

Note that as Rockstor’s feature set / complexity grows you may be required to do a fresh install if you have customized the underlying system adversely.

@suman do you agree with the above?

Just wondering what current recommendations are WRT to configuring sleep (at least on the drives), wake on lan, etc., using the generic CentOS tools (since we don’t have a UI for it)?

Reading @phillxnet posts here, I’m assuming a good starting point is to use hdparam to spin down the drives after 10 or 20 minutes? Recommended also to mod the smard.conf file per suggestion?

Do I even need to have the system itself sleep (as I do with my synology) if I have a low-power board and an SSD boot drive?

@bdarcus Funny you should bring this up again I meant to update here on the progress made but sadly haven’t so here is are some updates:-

Previously I had mentioned editing the /etc/smartmontools/smartd.conf file by hand as although entries in this file could be effected by Rockstor WebUI there was a bug which prevented it working. This bug has since been fixed so one can now go to System - Services - and click on the spanner icon next to S.M.A.R.T and use the WebUI to enter custom lines. Careful though as they are not sanity checked as of yet.
Secondly since this post Rockstor has gained email capability that forwards all of roots email to a chosen recipient via another dedicated email account, this feature is available in System - Email Alerts from version 3.8-5 onwards via this issue (linked). And in the release after that version 3.8-6 the S.M.A.R.T custom config via WebUI was fixed via this issue (linked). This ties in nicely with smartmontools ability to email drive issues etc.

As for Wake On Lan (WOL) this is an issue with the particular bios of the machine. As long as the machine’s bios / network card combo is setup and capable of waking via a WOL packet then standard tools from other machines on the network can wake it; so not really Rockstor related.

As for needing to sleep the whole system that is rather a hardware / use case specific question. But nothing takes less power than being off or if that is too inconvenient then in a sleep state, especially important for drives as modern architectures such as Haswell and beyond do pretty well at saving power when they are given very little to do (ie micro sleeps on each of the cores eg for i3, i5, i7 cpu’s the i7z tool). But unfortunately I don’t have any Rockstor installs myself on these cpu’s so can’t give an example readout.

To correct an omission in a previous post of mine; if you wish to automatically set the powerdown on a drive on each boot then the previously mentioned hdparm -S line or multiple lines (one for each device) can be put in rc.local for the time being. But be very careful as these lines are best put above the existing Rockstor entries and also note the prior warning about root and modifying system files.

I have opened a drive power down issue so the feature might be considered for inclusion.

So some progress has been made but as usual there is always some more progress to be made.

Thanks for the update. On this, do you mean that screen that mentions “LEDs”, with entries for “total time,” “read time”, and “sleep time”? If yes, I find that totally confusing; don’t understand it at all :wink:

Not a problem, as long as I can configure similar functionality myself without breaking stuff.

@bdarcus OK I see what you are looking at now. No that screen / dialog comes up when one clicks on the little light bulbs next to each device. In the issue I opened re drive power down settings I suggested we add an icon on that disk screen to set / show powerdown times / state, so its appropriate you should end up there. The Page I referenced in your first quote is this one:-


That is accessed via the spanner icon next to the “S.M.A.R.T” service entry on the Services section inside the System page. It’s kind on an advanced item really to allow one to exactly configure the behaviour of the smartmontools program via it’s configuration file but via the WebUI.

The page you reference is for setting the flash rate for the drive activity light to help you find a particular drive.

Does that clear things up? The page the spanner is on is referenced in the docs via the Services entry.

1 Like