I’m having some problems when I try to shutdown the EX2 via SSH. I login and issue the poweroff command, and get immediately disconnected from ssh. ALL lights remain on, and I can’t ping the EX2. The only way to recover is to pull the power cord.
Am I issuing the incorrect command? Is anyone having the same issue?
i’m using Depicus Wake On Lan , tested it in both LAN & WAN and it works correctly
Thank you David for telling me about this. I just tried it and it works. I was all along under the impression that WOL does not work on EX2 but you are absolutely correct, sir. It does work on EX2. Sometimes even veteran EX2 users can learn useful stuff from others I always could restart or shutdown the EX2 over the Internet via the dashboard but with this capability, I can now shut it down and restart much later at any time. This is really useful. Thanks again.
For others interested, check out this quick YouTube tutorial on how to use the free tool David001 mentioned, here → https://www.youtube.com/watch?v=onP-lo-6V3Q The relevant part of the tutorial starts at the 2:35 mark (making the batch file part - but the part between 1:27 to 1:57 is also needed and relevant…skip all the other stuff until the 2:35 mark).
To get the MAC address of your EX2, SSH in, type the command shown in the pic below and press enter. The EX2’s MAC address will be the six pairs of alphanumeric characters separated by colons (redacted partially in the pic for security reasons). The MAC address can then be used as demonstrated in the YouTube tutorial (above) but leave out the colons. Another thing, this will work best if you assign a static IP to the EX2 on your router beforehand (some call it reserving an IP on the router). This gives you the capability to remotely startup your EX2 over the Internet if it crashed for some reason or was shut down deliberately by you. Of course to do this over the Internet you’ll also have to setup port forwarding for port 3389. Without that port forwarding, you can still use this to remotely start up the EX2 as long as your other computer is within the same network as the EX2 is. Good luck!
david001, so excited to stumble upon this thread! I have a question for you. I am successfully using the same utility as you for wake on lan, after using the shutdown.sh command to shut down. It works, but when it wakes and I try to log in to the My Cloud home page, it gives me this error message:
Note that I have not removed power by unplugging it, but just issued the shutdown.sh command. Does this mean the drive is shutting down dirty? It makes me nervous to use the shutdown.sh command…
it will shutdown the NAS and then not hang up the bash
you can then put the command inside other scripts if you want (can only be run as root on your host machine, though, unless you’re cool with having the password for your NAS dangling out there…)
***** DO NOT USE HALT *****
Use shutdown.sh as some have already suggested. This is not the same Linux shutdown, it is a shell script that executes many procedures before shutting the device down. Otherwise, you are very likely to corrupt your disks and losing data. @Matt87 solution is the best one if you want to do it remotely.
Do please correct me if I’m wrong, but isn’t it overstating it to say that with a “hard” shutdown, you are “very likely to corrupt your disks and lose data”. In the knowledge base article on “How to Shut Down a My Cloud Device”, it says…
“Removing the power cord from the unit or the power outlet can be used to Power Off”
Of course that doesn’t seem the ideal way to do it! But I had some electricians cut power to my NAS drive unexpectedly and it was shut down in this manner. I came across this thread in my subsequent searches on how to actually shut the NAS drive down properly.
it’s been a while since you posted this, but maybe if you’re still listening you could help me ?
i want to add a script to my EX2 that runs at startup - that can listen to messages from the UPS and take action … is that possible ?
i tested my EX2 running on and connected to a UPS and it receives messages when the UPS disconnects from main power, when the battery is at 50%, then 15%, then critical. But the NAS is not doing any controlled shutdown … it dies along with the UPS battery.
i was hoping to add a script that allows the nas to execute “shutdown.sh” when it senses that the UPS has lost mains power and is running on battery.
should be a basic function of NUT on the backend, but for some reason WD didn’t provision it correctly or there is something wrong with OS5.