Looking for better ideas how how to sleep/suspend my unraid box


Recommended Posts

 

This is something I would like to be able to achieve.  Is it possible you could detail exactly how you achieved this?

When I get home this evening, I will try to put something together.  To automate the sleep process, I essentially copied OMV's script (see beginning of this thread) verbatim and then made a couple of very minor edits. 

 

Do all the drives spin up when you wake it up?

Yes.

 

Can a magic packet be sent by an xbox (Original using xbmc)??

No idea.  I'm far from an expert (and I don't own an xbox).  Perhaps someone else will chime in.  Ideally I'd like the machine to wake up whenever someone tries to browse to it or access it, but I'm not sure that's currently possible.  May even be a motherboard restriction, not sure.

 

 

Link to comment

I did some quick searching on the modded xbox running xbmc and there does appear to be a little script that can be run to send the magic packet.  Now, the problem i found is that the site that hosted that script is gone.  So some more digging might be in order to find it.

 

As for the browsing a share thing from a Windows machine, that i am not sure about.  On a mac you can set up these things called Folder Actions that can be attached to folders.  Do some google searching for 'Folder Actions Mac" to get an idea of what they do and maybe you can find something similar for the windows side of things.

Link to comment
...Can a magic packet be sent by an xbox (Original using xbmc)??...
Take a look at this post here. Use the code posted there to create a WOL.py script. Edited it ad described in the post for your needs. You can then run that from XBMC a few ways; manually whenever you want to wake the NAS, you can link to it using an autoexec.py script which will run whenever XBMC is first launched, or edit the skins .xml file and add a second onclick action to the menu item that takes you to the media on the NAS
<onclick>XBMC.RunScript(Q:\scripts\Wake\WOL.py)</onclick>

Link to comment

Thx muchly for the comments. They should get me started.

 

Pity all the drives spin up, but I guess this is what happens on a Windows machine as well?? 

 

If I think about it, I'm not sure I want all the drives to spin up (16 of them) just to save a few watts of power.  I'm more worried about the long-term reliability of the HDD's - especially as that's were all the $ lay in the system

 

Being able to shut the server down and start it up from the xbox would be good though.

 

Thx again for the help.

 

 

 

 

Link to comment

Well, my box currently only has two drives in it - so for me 'all drives spinning up' just means that both spin up.  Although I'm fairly certain that all of them would spin up regardless of how many were installed.  Mine spends most of its time idle, and when it is online I have the drives set to spin for a minimum of one hour of no activity before they spin down - which seems like a reasonable compromise of energy saving vs drive wear.  I'm using an 80+ power supply, integrated video and a 45W processor, and my machine still pulls about 70W idle with both drives spun down, so I really wanted the machine to sleep when it's not in use.

 

BTW flambot - I haven't forgot about you, I'm still putting together my S3 / WOL step-by-step - but I've not had much time to piece it all together.  I realize you may not even be that interested anymore, but I think it may still be good reference for others.  I'm pretty green at all of this, so I'm even learning quite a bit as I re-visit everything.

Link to comment

I looked up what "Powered up in standby" meant. Cool. This looks promising - as virtually all my drives are WD's (they will all be soon).

 

If this is enabled, will the drives spin up automatically (after returning from a standby state) when they are asked to be a network task?, Or does some software thing have to take place after returning from standby to make the drives ready for use?

 

Thx

Link to comment

If this is enabled, will the drives spin up automatically (after returning from a standby state) when they are asked to be a network task?, Or does some software thing have to take place after returning from standby to make the drives ready for use?

 

I dunno, you will be the first to test! LOL!  :D

 

:o Oh no...  ;D

Link to comment

With the WD drives set to power up in standby, they will remain spun-down when resuming from S3 suspend state.

 

They will even remain spun down when you access them if what you access is already cached, such as a directory listing.

 

They will spin up when you access then for any content that is not cached.

Link to comment

How long does it take to bring the machine up to an accessible point (login) from an S3 state?

 

From memory, I'm going to say 8-10 seconds or so?  I definitely remember it being faster than a fresh boot.  But again, I'm only running two drives, so not sure how the numbers might change for some of the large arrays that many are running.

 

Of course, after several days of glorious S3 / WOL use - I dug back into this to write-up my FB,BB (For Beginners, By Beginners) Guide to S3 / WOL . . . and I somehow got things all goofed up.  So, this weekend I get to wrestle with two things:

1.  Server is no longer responding to magic packet.  I'm hoping I just made a bad BIOS tweak - I don't remember doing that but I was in the BIOS the other day and it's plausible.

 

2.  When it is sleeping and waking properly, I noticed that the server no longer negotiates a gigabit connection upon wake-up.  It's 1000Mb/s off of cold-boot, but if I check it after wake from sleep, it seems to be coming back at 100Mb/s.  It's onboard Realtek 8168b NIC, so I suspect a driver issue - which means I probably won't be able to do much about it other than hope a driver update in next unRAID release cleans it up.  Or buy a NIC, but I'm inclined not to go that route if I can help it.

 

AGW

 

Link to comment

How long does it take to bring the machine up to an accessible point (login) from an S3 state?

 

From memory, I'm going to say 8-10 seconds or so?  I definitely remember it being faster than a fresh boot.  But again, I'm only running two drives, so not sure how the numbers might change for some of the large arrays that many are running.

 

Of course, after several days of glorious S3 / WOL use - I dug back into this to write-up my FB,BB (For Beginners, By Beginners) Guide to S3 / WOL . . . and I somehow got things all goofed up.  So, this weekend I get to wrestle with two things:

1.  Server is no longer responding to magic packet.  I'm hoping I just made a bad BIOS tweak - I don't remember doing that but I was in the BIOS the other day and it's plausible.

 

2.  When it is sleeping and waking properly, I noticed that the server no longer negotiates a gigabit connection upon wake-up.  It's 1000Mb/s off of cold-boot, but if I check it after wake from sleep, it seems to be coming back at 100Mb/s.  It's onboard Realtek 8168b NIC, so I suspect a driver issue - which means I probably won't be able to do much about it other than hope a driver update in next unRAID release cleans it up.  Or buy a NIC, but I'm inclined not to go that route if I can help it.

 

AGW

 

 

AGW - Hope you get it sorted out.

 

Thx BQ for your comments - very helpful.

 

 

Link to comment

2.  When it is sleeping and waking properly, I noticed that the server no longer negotiates a gigabit connection upon wake-up.

 

This seems to be a relatively common GNU/Linux issue. I saw it on one of my unRAID motherboards, too, when I had a quick look recently. The motherboard previously did service in a Ubuntu (2009.04) desktop, where it had the same problem. There's an easy fix that involves the kernel config files but I can't remember it off the top of my head, and I don't seem to have sent a tech note about it to myself.

 

Google will sort you out. I'm fairly certain the fix will be distribution agnostic, [/ubuntu <something> on] which means that you can add "ubuntu" as a search term if you need to narrow down the search results and specifically target detailed instructions. [/ubuntu <something> off]

Link to comment

As per bubbaq's earlier advice, I hooked up an old drive installed windows and set the NIC to WOL. It is working fine with windows XP. The strange thing though is that the NIC light still goes out while in standby. But, it does wake with a magic packet nicely. After confirming this, I rebooted into unRAID. I telnetted in and checked the NIC using "ethtool eth0". The NIC was set to "Wake-on: g": I stopped the RAID then executed the sleep command "echo 3 > /proc/acpi/sleep". The PC would not WOL at this point. I could still wake it with the keyboard. After I woke it using the keyboard I checked the NIC again. This time it said "Wake-on: d". I believe this means it was disabled. Did it get disabled before it went into sleep?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.