Problems suspending/resuming

  • Today I successfully installed 0.4 and have a 2x2TB mirror setup and it is functioning overall. Now I am in the last few steps to know if I am a go for production (move to install 5x3TB RAID5) and have stumbled with the suspend/resume (sleep/wakeup) side of the product. Prior to today I was using FreeNas and for the life of me couldn't get the Win7 box to see the shared folders on the NAS. I read OMV is better with Windows shares (speed) and so I switched to this product.


    Two problems:
    First - from the plugin (described below) it DOES NOT SUSPEND automatically without changing the scripts it appears.
    Secondly, from a Windows box (I will have WinXP; Win7 and WIn8 hitting this server) - they* are not waking up the machine via the Windows Explorer. (*at this time I am only using Win7 - but would think all boxes behave the same)


    1) In OMV Network setup has WoL ticked.
    2) OMV plugins installed - autoshutdown turned on
    3) Set the autoshutdown to go down within a minute (60 seconds x 1 - waits 5m before it tests). Initially it was polling other network ports and saw activity (not sure why it cares) - so I restricted the ip to be 99.99 (it is 192.168.1.99). It does shutdown at the proper time so the plugin is working.
    4) Reviewed this https://github.com/OMV-Plugins…wn/blob/master/src/README


    This phpBB software won't let me post part of the site page - calls my post SPAM


    I see it mentions shutdown - I reviewed the script and changed it to be "pm-suspend". After the time hit above, the script did nothing.
    I am not seeing "pm-suspend" as a program at least under sbin.



    5) Read the link on the Suspend (http://wiki.debian.org/Suspend)
    I didn't get too far except I eventually went to /sys/power and went "echo mem > state". This did exactly what I wanted - it suspended the PC (sleep - blinking lights).


    6) On Win7 when I go to the machine \\pvr - it will not wake up. Now here is the funny bit. I have a WOL program in Windows and I ran that from the Windows cmd

    Quote


    C:\u\bin>wolcmd <my_mac> 192.168.1.99 255.255.255.0 7
    Wake On Lan signal sent to Mac Address <my_mac>
    via Broadcast Address 192.168.1.255 on port 7


    Running this command does wake up the box (albeit the keyboard doesn't wake up but minor - I can putty into the server to make other changes). Not seeing anything in OMV under "SMB/CIFS" to enable anything and would think that a Windows explorer call to a network device would issue the WOL call - but maybe not.


    So I am stuck - the ability to sleep the server and have it wake up via the PC is a requirement. My goal was to use this box for media and backups. I do not want this up 24/7 and want it only awake when it is called upon. A short delay to wake up is a minor price to pay.


    Does anyone have any thoughts on how to proceed? I would guess that if I wrote a script and called it pm-suspend (say echo mem > state) - it would suspend - but is that really the right way? But the problem is the waking up side. Something I am missing perhaps.


    Sort of stunned that a sleeping/wakeup function is not part of the core product. I guess most have these things running 24/7. Any help would be appreciated.


    Thanks
    belly

  • First problem solved --- after reading help with my earlier post on General Discussions (lack of vi) I went ahead and installed "apt-get install pm-utils". I had thought since there was code under /usr/lib related, that perhaps there wasn't any more to be done - but I was wrong. So under /usr/sbin/ there is "pm-suspend". I turned on the autoshutdown plugin (it has the changes made in the script to call pm-suspend) and now that is working fine.


    Now I am trying to see if I can figure out the Windows -> wakeup OMV side of things. Not easy to Google (IMO) - so much leads back to "windows not sleeping" or "windows not waking up" - which is unrelated.


    b

  • udp port 9


    If you have wireless at your location the easiest way to wake omv is with an adroid phone. Search "wol" on the play store. There is a wake on lan utility named just "wol" by brobble. It makes it ez to wake your machine. Also, another app called "Fing" has a lot of network utilities in it and it can do wake on lan. With Fing you don't even have to enter anything. Just scan your network click on the machien you want to wake, then click on "wake on lan", then click on "send". If your router has DD-WRT it has a nice wol utility built into it. I use DD-WRT if I don't have my phone handy. The windows command line is a joke.

  • The so-called "magic packet" which triggers the WOL feature of the network card contains the MAC address twice. But, since the target system is essentially powered off and doesn't have a working TCP/IP stack that would allow network connections, you can't use TCP protocol and you can't use the target system's IP address.


    You have to use UDP, which fires a packet blindly without opening a connection first and doesn't expect a reply. Also, you have to use the subnet's broadcast IP address so that the packet is relayed to all systems in the subnet; this is usually the last IP of the subnet (i.e. 192.168.1.255). And, of course, you must know the MAC address of the system, which will be assembled in the magic packet.


    == LAN wake-up ==
    All you need is a tool which easily broadcasts the magic packet in your network to wake up the target PC.


    == Internet wake-up ==
    If you also want to send the magic packet from the Internet through a router, then you must configure the router's "Virtual Servers" section to forward all incoming communications on UDP port 9 to the subnet's broadcast IP address, also UDP port 9.


    If possible, also subscribe to a dynamic IP service such as dyndns or no-ip and configure the router to use this service. This way, every time your router connects to the Internet (DSL or PPPoE or whatever) and gets a possibly different IP address, you can still access it with a personal hostname which the router's client updates to its new public IP address.


    To wake up your PC from the Internet, you either use a program on someone's computer to send the magic packet to your router's hostname (via UDP port 9), or you use some web-based service to do this. My favorite is dslreports.com/wakeup .

  • Thanks for the reply (both of you).


    There is a phrase I love that seems to fit nicely here - "that dog don't hunt". I have come to the realization that this problem is not an OMV problem per se (though the lack of suspend and requiring the package is something that needs to be done). Further that the WOL approach is not performing as I had expected. I found this site yesterday and it contains the core of what you posted. http://windows7-issues.blogspo…-windows-7-made-easy.html Though I was always able to send the magic packets - just that I expected Windows to actually send them ...


    On my Win8 box I am running Intel Rapid Storage and have 2x3TB setup as RAID1. I decided to take the OMV setup out of the equation (same box; boots into OMV via USB and controls 2x2TB drives as a test). I found out that under Win8 in the customer preview someone determined that for WOL to work you need to turn off the Fast Startup feature (via a registry key in RTM). I did that and firmly believe that I was able to get at the shared folder in question once the box went to sleep - either via Win7 Explorer or via WinXP and my SageTV (media player) and in both cases the machine came out of sleep. For the SageTV box it timed out without error so I kept clicking the video until it started. I then decided to revert it back out to Fast Startup to test some more and it did not wake up after. I then changed the key back to no longer use Fast Startup and that bugger isn't cooperating. So now I doubt myself. I found during some of my tests that the blasted mouse would move a micrometer and it would wake the machine up and then disabled it from waking up the machine but after the initial positive tests. So I am wondering if I had a false positive.


    The problem is, puterfixer, I thought that a Windows box would do something like the magic packet when opening up a folder on the other side. But I don't believe that is the case - unless I screwed something up in my tests. If Windows is not doing that I need to revert to Magic Packet apps - that can be a PITA. Ideally the SageTV program should have a "WOL Send Magic Packet" type concept built in - esp because that is a media player and many people are throwing their media on boxes like OMV/FreeNas or hardware based. I learned yesterday there is a way to add an "External" program and in theory when wanting to watch a video and knowing the machine is sleeping, I could run the external and that on the backend would send the proper magic packet. Backups could run a "pre" command first to wake the box up as well. That would leave other machines requiring an icon on the desktop to wake up the OMV when they want to access documents/vids as well. All this is possible I believe - but cumbersome.


    There is always a Plan B
    However, when reviewing a Synology box - power consumption - I figured out what probably may be my ultimate solution. I was concentrating on pure sleep (close to 0W of power) but now I am thinking to move to a "HDD OFF" model and see how low the box will go. A few years ago running a box at 100W+ (assuming drives are sleeping) wouldn't matter at $0.05/kWh but today we are up in the $0.12/kWh and that will only increase. I can probably live comfortably with 40-60W consumption. Unfortunately, the box I am testing on is a full i5 processor and although there are ways to reduce power I am unsure where that will go. So my next step is to get a Watt meter and figure that out. Synology uses an Atom processor and I know everyone is posting their gear here. I am considering that - perhaps flipping my MOBO out of my tower and installing a uATX board with an ATOM.


    So at this point I believe the spinning down the drives and leaving the box on is probably my best bet. The OMV setup right now does get to sleep fully but even if I accept that as an answer, I would have to spend time to figure out why both the keyboard and monitor never turn back on once it resumes. Win8 has no problem so something is wrong. If I go ahead with the spin down then I will need to figure that out but I think that is somewhere in the SMART setup and probably can find a bunch of linux posts to help.


    Cheers and thanks again!
    b

  • My atom machine takes more then my amd sargas. The atom has a pig northbridge on it, ich9r. My sargas with unlocked 2nd core and 3 drives idles at about 48 watts. I tried only running it 12 hrs a day. But then I added a fax server to it so it's 24/7 for some months now. I have everything backed up so if the machine goes down so be it. I will lower power consumption over time with newer machines. The atom is headed to the office where power is included with rent. My landlord can eat it. I have lower powered arm devices but you'll find there is a performance trade off. Some of the newer 22 nano cpus are enticing from Intel but I'll probably wait for the next generation.

  • bellyman, for a PC there are several levels of power saving, the deepest one being with everything turned off except for the NIC which is still listening for traffic. Now, in order for the system not to power on for ANY kind of traffic, including stupid broadcast messages which are not intended in any way for that system, there's a "key" to trigger the power on remotely, and that's the magic packet.


    But this is not implemented as an automatic feature in any operating system, as you incorrectly assumed. A remote system may become inaccessible for a number of reasons, not just the power management, so it doesn't make sense to try and send a magic packet. Also, a remote system doesn't know and cannot determine the MAC address of the server; this is available only on the same network segment, and not beyond. So it really is up to a system admin to remotely wake up the system KNOWING the wake-up key.


    A system which is supposed to be available at all times remotely should never be allowed to get into such a deep power saving state to begin with. There are shallower levels of power saving in which the network card wakes up the PC from a sleep state for ANY data traffic, allowing it to determine whether the traffic was a legitimate request or should be ignored. Standalone NAS systems do this - they can afford to with their low-power specialized chips anyway, as opposed to a more powerful, more versatile computer.


    Also, get a watt-meter to determine the real power consumption. Some people assume the maximum theoretical debit of the power supply is actually how much it draws from the grid, which is grossly incorrect. My Seasonic 380W 80-plus certified power supply used to draw 80W on the old, power-hungry system in idle with 4 drives running, peaking up briefly at 130W in full load.

  • Excellent comments - thanks.


    My head is spinning a bit. I have a dedicated PVR PC and my initial plans were to migrate that system to this box I am testing the RAID on. Except the MythTV implementation was going no where and I needed space so I opted for the Intel Rapid Storage firmware solution and Win8 preview. RIght now the box is in flux - and quite frankly as we are taking about power consumption, I really didn't vet the power usage as much as I probably should have.


    Anyways, my buddy picked up a Synology 1812+ unit which holds 8 drives. For me partly overkill in the number of drives but relative cost to the 5 bay it made sense. However, after thinking about it - what would happen if that unit just died? Well apparently it too is built off of Linux. I like the power consumption on the 1512+ which is where I am today. As I said I think so long as the unit drives are off and the power usage is reasonable then I am fine without the magic packet route. I probably will get a watt usage device in the future but in the next couple of days I will pick one up at the local library.


    My ultimate plan is:
    1) Once my tests are complete, migrate the two 2TB drives back to the NexStar 2bay device - and RAID1 them. That unit is actually more for "offline" storage - backups and the like that don't need to be on 247. Every other Sunday I turn it on and move backup data from my machines to that unit then turn it off. (My backups tend to be PC to PC - so PC1 -> PC2 etc. And some cloud stuff too).


    2) Either I buy a 4 or 5 bay RAID box and setup RAID5 or continue (assuming the power is right) with the OMV model on my box. (If I don't use my existing gear then it will serve some other purpose)

    Quote

    Standalone NAS systems do this - they can afford to with their low-power specialized chips anyway, as opposed to a more powerful, more versatile computer.


    That is what I need to vet out with my existing tower to see how low it can go with the drives off. I may ultimately opt for something like the 1512+ model (5 bay) unit.


    3) However, all is not totally lost. 3TB drive prices are starting to come down since the flood period in Thailand and I am sure 4TB's will start to hit the markets hard soon. I may still use the system I have as a secondary RAID 5 box - and perhaps leave it as an "offline storage" only box - which would replace the NexStar setup. Then I could migrate the 2x2TB drives to the ultimate new PVR system and mirror them.


    I see more value in a couple of 4-5 bay RAID5 boxes than a big giant 8 bay - upfront costs are not something I focus solely on. The practicality and the consumables are ultimately what I am driven on. I am not backing up any RAID5 box, but if I have a couple at least the more critical documents can be on both boxes. A more sound solution.


    Cheers all.
    belly

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!