NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

sc101hell's avatar
Jul 26, 2019

Readynas102 - control disk spin down and power through CLI

Hi,

Just redoing my NAS and out of date with the software a little

Before I go digging through files does anyone happen know, through CLI/ bash script how to control
* Wakeon lan (ethtool?)
* Power Settings
* Disk Spin down

Use case:
I'd like to control these settings through ssh commands so that I can change the behaviour of the system depending on use without using the GUI
e.g. all on for film night
all off for holidays
somewhere inbetween for normal usage - powered on, disks spun down

I'm happy with ssh/ CLI and Wakeonlan

5 Replies

Replies have been turned off for this discussion
  • Power settings and spindown are in /ect/cron.d.  Since ethtool is installed by default in ReadyNASOS, I assume that's what they are using for WoL control.  It certainly reports the correct WoL state on my NAS, though I did not try changing anything to see if the GUI picked it up.  Though written for Ubuntu (which is a fork of Debian), the following should help: HOW-TO:Set_up_Wake-on-LAN_for_Ubuntu.  

    • sc101hell's avatar
      sc101hell
      Tutor

       

      Thanks Sandshark,

      I'll have a play next week and report back but that's narrowed the search for me, much appreciated.


      Looking quickly as spindown I'm not

      Whatever delay you set the cron job is still the same

       

      00 00 * * 0 root /usr/bin/spindown_schedule 1 &> /dev/null

      Though it seems to be changing NOFLUSHD=10 in cat /etc/default/services
      but also TIMEOUT=10 in /etc/default/noflushd

      Not quite sure the order of what is changing what at the moment. Next week.

      Thanks again

  • StephenB's avatar
    StephenB
    Guru - Experienced User

    sc101hell wrote:

    Use case:
    I'd like to control these settings through ssh commands so that I can change the behaviour of the system depending on use without using the GUI


    You might find that your ssh setting changes won't survive reboot (the ReadyNAS application often rewrites configuration files then).

     

    It'd be nice if there was a CLI interface to the ReadyNAS application that let you adjust these settings from ssh (but if there is, it isn't published).

     

     

    • sc101hell's avatar
      sc101hell
      Tutor

      Thanks Stephen.

      I'll have a play but logically (hah) it must be storing that value for timout on disk musn't it? Or does it store those in the flash? e.g. are those settings still kept if you replace the disks?

       

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        sc101hell wrote:

         it must be storing that value for timout on disk musn't it? Or does it store those in the flash? e.g. are those settings still kept if you replace the disks?

         


        The values are stored on the disks.  But the application has its own database of the settings, and it will sometimes recreate the usual linux files from the values in its database.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More