Change the Network UPS Tools EX2 powerdown trigger

is there any way (ssh) to make an adjustment to NUT, in order to make the EX2 begin the hibernate/shutdown sequence well before the UPS battery reaches 10% ?

the EX2 is so bare-bones, it offers no UPS controls in the dashboard whatsoever (unlike Synology or QNAP).

but it is running Network UPS Tools, so maybe i can modify the configuration to change the 10% to something like 50%.

howtoraspberry.com artical I am reading has a orderley shudown
will get back to you if you need more info

thanks for the reference ā€¦ will check it out

i did a test and pulled the main to let the UPS do itā€™s thing, with about 45W total load the UPS ran for roughly 25 mins.

but to my surprise and dismay ā€“ the EX2 ā€“ although it was receiving signals and registering them in the alerts on the dashboard ā€“ did not do an orderly shutdown after the battery reserve notification of 15%. as a matter of fact, it did not shut itself down at all and i suspect that it sent a kill power message to the UPS because as soon as the UPS died, so did the NAS. up until that point, all lights on the NAS were solid blue and the dashboard was active/accessible.

my unfortunate mistake to believe that even though the EX2 has a NUT installed, it was never configured to shutdown the NAS properly !! very very disappointed that I must have to ā€˜hackā€™ the NUT and try to figure out whatā€™s going on with this unit ā€“ let alone why WD just wonā€™t add a feature in the dashboard to allow a user to set a NAS shutdown control such as a time lapse or a percentage of power remaining.

iā€™m speechless ā€¦

Speechless. . . .but are you surprised?


Not that WD is the only company with warts. I just spend 5 hours fooling with a router trying to get a seldom used feature to work properly (and failed). (any time you find yourself using Putty on a device is a sign. . .)

1 Like

i actually was a bit surprised, since my initial impression from what iā€™ve read online about the subject is that the NAS would shutdown when the UPS battery registers at 10%, and it did not do this.

i took a look at upsmon.conf, and did not see a line called ā€œMONITORā€ in it, so it is not really monitoring the UPS. at the bottom of the conf, the ā€œFINALDELAYā€ is set to 6000 seconds, which is the time the NUT server waits (after receiving batt low) before initiating an actual shutdown. 6000 seconds is 100 minutes ! that does not make sense.

i would take the time to modify the NUT configuration, but the filesystem is set to read only so i canā€™t change the conf files. actually, i would want to just reinstall NUT on the NAS and configure it from scratch, but there are other things WD might have done that weave into non NUT files that I donā€™t know about.

if someone has successfully modded the NUT conf and can give me some examples, Iā€™d be willing to try it out.

otherwise iā€™m putting this to bed and adding another exclamation point to my notes for buying a synology multi-bay this year.

i would def. invite you to participate in the Office-Space ritual I would do on the EX2 after I replace it ā€¦ ha ha

Hahahaha. . . .I feel your pain.

I just spent a bit too much time trying to bend a Router to my will. Apparently, blocking WAN while allowing VPN is easier said than done. Doesnā€™t seem like very many people try that trick with stock firmware. ,. . . so guess what my next step is?

I think the NAS software the same way. . . the commercial products are fine for what they are - - ā†’ But advanced tricks? Sleep? UPS Integration? Torrents? Yeesh. . .I suspect ā€œBrand Sā€ may do a better job than Brand ā€œWā€ . . .but how far are you from going down the OpenMediaVault path?

Ah. . .if I had much more free time. . . I would simply take one of my EX2 Ultras and go for it. . .but . . .I barely have time to troubleshoot a $@#&ing router. A router that actually seems to work pretty well in almost all regards. So - - - easier to drink whiskey and chat of a forum. Bottom line is that my OS/3 NAS on my WAN-less router is doing just fine for what I need. :slight_smile:

you are right ā€“ more battery time left is needed when starting UPS shutdown

I have 5 APC 1500 watt UPS systems in the home office and give the main NAS system its own unit.
main problem here is wind causing a 3 sec power drop.

The old power Powerchute software has Log4 problems.

I just use the old send a text message on power fail and run home on a long power fail

monitors and printers are not on UPS power

I have tried apcupsd 3.14.14 but need a main control system like the Raspberry Pi to shutdown all the systems and monitor the UPS.

Also if you do NOT calibrate the UPS the battery run time can be VERY wrong- I try to shutdown at 50% battery.

The UPS running the Modems and wifi are set to go to 5% to 10 %

. . .and the question is. . . . just how unreliable IS the power?

How much is the hassle worth?

not sure what youre trying to accomplish with wan isolation snd vpn.

i have an asus router and to their credit the brand offers some of the most robust functionality iā€™ve seen in consumer routers. the main selling point for asus is the lifetime ai protection updates ā€” some of their routers have it, while others donā€™t.

in the 6+ yrs ive been using asus rt routers, iā€™ve never experienced a bona-fide breach or issue. firewall signature updates come in at least monthly and there is also merlin firmware thats fully ā€˜insuredā€™, i.e., asus honors your hardware warranty if you loaded a router with merlin fw. for the most part, ai protection blocks a lot of the malicious sites events and 2-way ips. it is so anal that it blocks some of the packets that flow in the background related to normal app use and you get to see what devices are subjected to that you otherwise would be oblivious had you not had the firewall working on the router.

back to the notion of vpn, my router has vpn server built in. iā€™ve been using it with openvpn clients on the devices i want to access my network (pcā€™s, macs, tablets, phones), itā€™s worked flawlessly and i was able to ditch wd cloud access alltogether. i can see my nas from my iphone when im not on my home network (out and about) by starting up openvpn and just using the built-in files app. it browses just like it would in file explorer or finder.

just my 2 cents worth on the subject.

the thought of calibration crossed my mind, i have yet to do that but will when i can spare time for it.
calibrating of course means having a dedicated box with an agent always monitoring the upsā€™s. if they dont have the smart/network cards installed (expansion capable ups), then without an agent connected to them they are as dumb as bricks and like you indicated youā€™re hustling to power down your gear in-person before the upsā€™s kick the bucket.

i bounced this topic around on snb forum, but over there im dealing with IT pros that wont give wd hardware the time of day. all feedback and things iā€™ve learned so far, i will wind up with brand Q or brand S. ability to tell the nas when to shutdown, ability to run a vm fulltime on it, ability to run more advanced volume pools and mix drive and raid sizes ā€¦. basically theyā€™re ferarris and my clouds are nissans ā€¦ he he

curious, how can i get my SMS URL proper, in order to use the sms feature on the ex2 ? tried to figure out the url for my carrier but canā€™t find info on that. otherwise, for the alerts i use email and to my surprise the nas actually notifies instantly when it gets signals from the ups. but push email unfortunately can lag a few minutes in poor reception/dead zones whereas an sms could come thru faster.

I have been pleased with my Asus.

What I am trying to do is to block internet access to the NAS, while allowing VPN access.
If I block access with the ā€œClient Statusā€ page, it blocks BOTH.
If I block access from ā€œNet Services Filtersā€, well. . .it seems like nothing is blocked (which isnā€™t right).

I puttyā€™d in and looked at IPTABLES.
ā€œClient Statusā€ blocks all adapters based on MAC address in FORWARD chain
ā€œNet Services Filterā€ seems to block ā€œEth0ā€ in FORWARD chain, but somehow with this in place, I still am able to SSH into the NAS from the internet.
Maybe I am testing it wrong? I am using a laptop hotspotted to my phone. . .then Puttying into a WAN port that is forwarded to the NAS 22 port.

Dunno.
Other than this little issue, I have been quite happy with my various ASUS routers.
I would buy one tomorrow if I needed one.

I want to fool more with IPTABLES, but I think I am limited by stock firmware. Next step (not this week) will be to install merlin on the router and try again.

Meanwhile, I moved the NAS back to my ā€œsecureā€ router that doesnā€™t have a WAN cable. . .so I know that firewall works.

interesting ventures ā€¦ not sure how sensitive what youā€™re storing is, but iā€™m sure youā€™ll find some solution. maybe filesystem encryption could be handy in your case in order to relax the routing methods youā€™re trying. but not sure if My Cloud does that and i also donā€™t care much about what this NAS is capable of anymore. it just has to get me through to later in the year when i replace it with something else.

in the meantime, for mac users i found an app in the app store thatā€™s called UPS Power Monitor. it located the UPS connected to my NAS and puts out all the NUT data that the server is reporting, so I see it on my desktop without going ssh or plugging in to the UPS directly. supposedly it has functionality to add a shutdown trigger to whatever networked device i want and iā€™m trying to get that to work for the NAS itself, so that this tool can monitor the UPS state and shutdown my NAS ā€“ basically doing the job that NUT is supposed to be doing, but isnā€™t for some reason.

regarding the UPS monitor app i am trying to get working, during the process of adding the monitoring tool in ssh on the NAS, it calls upon the command

update-rc.d

this is not present in the build, and am trying to add sysv-rc or file-rc to the build but trying to do a dpkg on one of them which iā€™ve downloaded is giving another error: cannot extract control package.

i think the command update-rc.d is needed to install the ups monitor tool completely and then get a clean connection between the app on my mac and the nas.

any suggestions or ideas about how i can install either the sysv-rc or file-rc deb packages correctly in ssh on the NAS ?

An alternative, if one was unaware of it, to using NUT on the My Cloud. If one is using an Asus router, one that is supported by Asus-Merlin; one can install NUT to the router instead.

One will likely have to setup a USB drive and swap file on the router to use Entware/NUT. If so, see the section ā€œPrepare the USB Drive for the swap file, Entware, and scriptsā€ in the following link which details how to setup a USB drive and swap file.

this is a really interesting find ā€¦ is the goal to connect a ups to the router directly or monitor a ups somewhere within the LAN ?

truth be told that i keep circling back to the simplest way i can find to get the ups triggers to ultimately shutdown the nas before the battery dies. but any way i look at this i see challenges and more ssh work and issues.

like i mentioned before, i will enjoy doing an office space job on this wd device. i learned my lesson that bargian basement hardware cannot compete with the likes of the competitors who actually make this functionality very easy to get to without having to have a degree in computer science.

Donā€™t know about monitoring across the LAN but it does apparently allow the Asus router to monitor the UPS. I really havenā€™t investigated it fully other than a quick glance at how to do it on a Asus router as i have my UPS connected/monitored by a Synology NAS. See this link for what Synology DSM 7 says about the UPS feature on their NASā€™s.

Edit to add: Iā€™d assume at the very least one could do a SSH batch script into the Asus router to trigger a query of the NUT program to list the status of the UPS.

have you seen controlled shutdowns of you EX2ā€™s before the UPSā€™s shutdown battery power ?
assuming you connected them via serial/usb to the EX2 ā€¦

im curious to see if functionality of NUT is broken in OS5

im close to getting UPS Power Monitor setup but just canā€™t install it in ssh because update-rc.d isnā€™t present and I canā€™t install init-system-helpers deb because dpkg tells me it canā€™t extract the control files.

thats where im stuck with this situation

i doubt wd cares to look into it, and last time i started a support ticket it took more than a week to hear back from a bot.

here is an example of the app on my mac, what you see here is what is reported by NUT from the NAS:

would you say as a synology user that you have about as much freedom as the average linux distro running on a computer, or is the linux interface as locked down/limited as with My Cloud devices ?

i am trying to decide if syno or qnap is the better choice moving forward.

there are many commands i found are not present in ssh on my cloud and the debian version in OS5 is quite old - version 8.

The Synology DSM is customized Linux as I understand it. No idea if it is more locked down than OS5 but so far the few times Iā€™ve used SSH on it, the Linux commands are there that Iā€™ve used.

In quick googling it appears there is a form of NUT on the Synology. Various articles discuss trying to use or access it. Not sure if these articles apply to DSM 7 however.

https://blog.filegarden.net/2020/05/14/setup-nut-server-on-synolgoy-setup-router-and-xcp-ng/

https://diktiosolutions.eu/en/synology/synology-ups-nut-en/

Currently I have the Synology DSM UPS setting configured to put the NAS into standby mode after five minutes when there is a power outage. It has a Network UPS Server option but I havenā€™t used it.

Edit to add: The Synology DSM has so many features and options that I barely scratched the surface with how I use them. From the Package Center to using Docker and containers. Plenty of options to configure the thing to oneā€™s hearts content.

Version 8?

Debian ā€“ Debian ā€œjessieā€ Release Information

Huh. That is . . . .ā€œinterestingā€