1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Automated WOL for NAS

Discussion in 'HD/HDR-FOX T2 Customised Firmware' started by Michaelnuk, Aug 17, 2012.

  1. Michaelnuk

    Michaelnuk Member

    Hi All

    Any ideas if its possible to automate WOL?
    I have a NAS that needs WOL sent every minute to stay awake.

  2. Black Hole

    Black Hole Theloniuos Abbot

    That sounds strange to me. Doesn't active file accessing keep it awake too, or is it the times when you are not accessing the NAS that bother you? Are there no settings to extend the go-to-sleep-if-inactive interval?

    Are you using the auto-mount package? I think that keeps polling an external mount, or at least should send a WoL (Wake-on-LAN in case anybody doesn't understand what we're talking about - and NAS means Network Attached Storage). I expect a WoL poll could be sent periodically on a cron job if required.
  3. Michaelnuk

    Michaelnuk Member

    The auto function on the NAS (Buffalo linkstation) comes with a utility that sends WOL packets to keep it awake when a PC is powered on which works great unless you want to use a none PC with it.

    Only work around is leaving it permanently switched on.
  4. Black Hole

    Black Hole Theloniuos Abbot

    That's a distinct oversight on their part (either that or a deliberate decision to target Microsoft only).
  5. ntm1275

    ntm1275 Member

    Can you clarify that you are talking about wake on lan and not hibernation

    Most NAS's with WOL funtionality have 3 possible power states

    1. Completely Off - this happens when the power lead is disconnected from the socket - after plugging back in, you have to manually press the on button to get it to turn on

    2. WOL - While the NAS is powered up, it goes through what looks like a complete shutdown (all lights are off, and no visible or audible activity is seen) - it uses a minimal amount of power to keep the LAN connection alive, but the rest of the NAS is off (CPU, Hard disks etc are off)

    3. Hibernation - NAS is still on, but goes in to a low power state by turning off the hard disks and maybe the fans (CPU, motherboard etc is still powered up)

    For WOL to activate, you have to physically send a magic packet to the NAS to get it to turn back on (Windows does not do this automatically, you have to use a special utility from the NAS manufacturer or a 3rd party WOL utility and it goes through a full boot up sequence as if you were manually turning it on for the first time and can take a few minutes)

    To come out of hibernation, a PC just has to access a shared folder on the NAS for it to come alive - normally only takes a few seconds

    If you do indeed have to use you WOL function to bring it back alive, then this is a very strange behaviour for a NAS, and also a PITA

    My NAS (Synology DS1010+) is set to hibernate every 10 minutes if nothing is accessed, and just needs a click on to one of the shared folders to bring it back alive - this can be done with a PC or from the Humax
    At the end of day (12 o'clock at night), it is set to shutdown, and then it automatically turns on at 6 o'clock in the evening

    If I need it to be turned on during the day, I either manually press the on button, or I can use the WOL feature to turn it on from the Synology WOL ulitity, 3rd party utility or remotely via my router (router has a WOL utility built in)
  6. Michaelnuk

    Michaelnuk Member

    It has 3 power options Auto (which requires WOL sending approx every minute to keep it running)
    On - always on or scheduled
    Off - really off.

    Looks like I might have to leave it on 24x7 or just set a schedule to turn on and off every day.

    Silly its mangrd in such a way. Guess I should of spent more on one :)
  7. Black Hole

    Black Hole Theloniuos Abbot

    I bought an Iomega NAS and was very disappointed with the power options.
  8. xyz321

    xyz321 Well-Known Member

    As has been mentioned above you could install the network-shares-automount package or alternatively just add the following to crontab.
    * * * * * /mod/bin/busybox/ether-wake xx:xx:xx:xx:xx:xx
    where xx:xx:xx:xx:xx:xx is the MAC address of the NAS. You would need to have cron-daemon and busybox installed for this to work.
  9. Black Hole

    Black Hole Theloniuos Abbot

    busybox to the rescue! That's the sort of thing I had in mind, thanks xyz.
  10. ntm1275

    ntm1275 Member

    I have checked in the current Buffalo manual and I now understand what the Auto switch is for

    Quote from the manual
    The 'auto' is designed to turn on the NAS when a PC is turned on (just as long as it has the 'Navigator' software installed), and then turn off, when the the last PC on the network is turned off

    It is using WOL to turn the NAS on when you turn on a PC
    Once the NAS is on, it is not using WOL then, it's just sending it a signal to tell the NAS that the PC is still on, so that it doesn't turn itself off

    From what I can see from the manual, there is no other 'hibernation' feature, unless it is not referred to in the manual

    From several forums, it seems that the Buffalo does not support hard drive spin down, so as you said, setting the switch to On would mean the NAS stays on all the time, and if it is set to Auto and the PC is not accessing the NAS, the drives will still not spin down - this I think is a bit of a boob on Buffalo's part, as the whole point of a NAS is low power consumption, but the Buffalo is running at full power all the time it's turned on

    All other NAS's I have come across have another 'hibernation' mode
    This kicks in when a PC etc hasn't accessed the NAS for a specified period of time, and it allows the NAS to go in to a 'soft' hibernation (hard drives spin down to save power, but the NAS is still on), and to bring the NAS back awake, you just need to access a shared folder

    Mine is set to hibernate every ten minutes giving me the following power consumption figures
    1. NAS in use = 55 watts - instant access
    2. 10 minute hibernation = 20 watts - take a few seconds to awake
    3. Powered down for WOL = 1 watt - takes a couple of minutes to boot up
    4. Completely powered down = 0 watts - takes a couple of minutes to boot up

    Unless someone on this forum can replicate what you Navigator software does on the Humax to stop the NAS from shutting down, you may be out of luck
  11. RedEarth

    RedEarth Member

    Which Iomega NAS do you have? I have the Home Media Network Drive (non-cloud version), and it doesn't seem to have any elaborate power options at all, just plain old 'on' and 'off'. I've seen lots of complaints about this on various forums, since the HDD never spins down unless you switch it off completely (not ideal on a NAS!)

    NAS-Central is a good place to look for info on this kind of thing, there's a wiki with sections for various makes a models, and a set of forums too. http://www.nas-central.org
  12. ntm1275

    ntm1275 Member

  13. Black Hole

    Black Hole Theloniuos Abbot

    I think that's the one.
  14. Michaelnuk

    Michaelnuk Member

    Looks like you done a bit of research on that one ! :)
    When its on Auto the hard disk does seem to spin down and when it wakes up you can hear it starting up and the fan in the unit kicking in.

    Looks like the only way to get it working is for a script to run and send the WOL command every few minutes which is beyond my skills.

    Thanks for looking into it all :)
  15. ntm1275

    ntm1275 Member

    Does the Hard drive appear to spin down when the switch is set to On?
  16. Michaelnuk

    Michaelnuk Member

    When it's on on the HDD is constantly spinning unless I have set a schedule for it to turn off.
  17. ntm1275

    ntm1275 Member

    I was hoping you would hear the drives spin down when they haven't been accessed for a period of time, which would mean it consumes less power

    Seem we're back to square one

    Have you tried the installing the auto-mount feature in the CF as BlackHole suggested, because it is supposed pole the NAS every so often to keep the connection alive
  18. Michaelnuk

    Michaelnuk Member

    I'll give it a go. The share feature on auto mount. Does this mean I don't have to plug in a USB stick all the time?

  19. Black Hole

    Black Hole Theloniuos Abbot

    You need a stick or drive plugged in, the standard Humax firmware doesn't go looking for USB mounts unless there is one so doesn't see the virtual mounts either - but what's the problem with that? A cheap USB stick is all you need, stuck in the rear port if you want it out of sight.