Todd Benivegna
2020-Aug-14 16:30 UTC
[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
Thanks Larry, no problem. I appreciate the input. Whenever you get a chance I’d really like to compare notes with someone who has NUT and a Synology to see why the heck mine doesn’t work! ;). I’m also using my Pi as the master like you. Thanks. Todd -- Todd Benivegna // todd at benivegna.com On Aug 14, 2020, 11:55 AM -0400, Larry Fahnoe <fahnoe at fahnoetech.com>, wrote:> On Fri, Aug 14, 2020 at 10:31 AM Todd Benivegna <todd at benivegna.com> wrote: > > > I have not edited a single file, including anything to do with NUT, on the Synology via ssh.... ever. How is yours configured in the UI? Do you have it set to go into safe mode after a certain number minutes? > > Hi Todd, > > I misunderstood (have only been casually reading this thread), I thought you had been editing files on the Synology, but good to know that it is still stock. I do not have access to my Synology appliances (away on travel) so I can't give you an accurate answer on how I have it configured. I will let you know in a few days (once I have access to them again). > > --Larry > > -- > Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com > Minneapolis, Minnesota www.FahnoeTech.com-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200814/af05556c/attachment.html>
Todd Benivegna
2020-Aug-14 18:27 UTC
[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
I found something interesting that I think may apply here. Check this out... https://forum.synology.com/enu/viewtopic.php?f=19&t=73960&hilit=ups+slave *I have the latest version of the Windows port of NUT (A UPS management package) installed on my Windows 7 machine. The UPS I am using is a very old APC BK650M which is controlled and sends its status via a special serial cable to the Windows machine.* *I also have my Synology NAS (which uses NUT for its UPS management) connected over the local network as a slave to the Windows NUT master. The Synology slave is configured to immediately go into "safe mode" whenever an FSD (system shutdown message) or OB+LB (On-Battery and Low Battery) indication is received from the Windows NUT master.* *The Windows master machine responds correctly to OB+LB events, correctly shutting down the master machine. The Synology box also responds to the OB+LB events from the master correctly and goes into "safe mode", the expected behavior.* *The problem comes when using the command "upsmon -c fsd" on the Windows NUT master to force a UPS system shutdown to test the system. The Windows master shuts down correctly, but the Synology NAS slave does not go into "safe mode" when it receives the FSD notification.* *I was wondering if there is a bug in the Windows port of NUT such that the FSD notification is not sent to the slaves when "upsmon -c fsd" is executed.* *I then looked into the Synology NAS NUT configuration more closely.* *When configured as a NUT slave device, the Synology responds to an FSD notification from the NUT master by calling a script defined in the Synology's /usr/syno/etc/ups/upssched.conf with an "fsd" argument. The script is /usr/syno/bin/synoups.* *Before causing the NAS to go into "safe mode", the script first retrieves the status of the NUT master with upsc. If the status is "OL" (on-line), the script aborts any action for the received FSD notification. Since the UPS is actually on-line and not in a low battery state when the test FSD is sent from the Windows master, the Synology will not enter "safe mode" - it does nothing.* *If the device was in OB (on battery), LB (low battery), or OB+LB mode, the OL check would fail and the Synology would enter "safe mode", as expected.* *I tried commenting out the OL status check in the Synology script. The Synology slave then enters "safe mode" when a "upsmon -c fsd" is issued from the Windows master, as expected.* *Interesting that Synology disables the test functionality on the NAS.* Roger, do you know where in /usr/syno/etc/ups/upssched.conf the OL status check is as mentioned above? I'd like to comment that out and see if it works. I'd really like to test everything out without waiting for the battery to run out, but if not then I will do that; will just take about 45 minutes or so. I would never have guessed that it would do a check like that, which basically prevents the "upsmon -c fsd" test! On Fri, Aug 14, 2020 at 12:30 PM Todd Benivegna <todd at benivegna.com> wrote:> Thanks Larry, no problem. I appreciate the input. Whenever you get a > chance I’d really like to compare notes with someone who has NUT and a > Synology to see why the heck mine doesn’t work! ;). I’m also using my Pi as > the master like you. Thanks. > > Todd > > -- > > *Todd Benivegna* // todd at benivegna.com > On Aug 14, 2020, 11:55 AM -0400, Larry Fahnoe <fahnoe at fahnoetech.com>, > wrote: > > On Fri, Aug 14, 2020 at 10:31 AM Todd Benivegna <todd at benivegna.com> > wrote: > >> I have not edited a single file, including anything to do with NUT, on >> the Synology via ssh.... ever. How is yours configured in the UI? Do you >> have it set to go into safe mode after a certain number minutes? >> > > Hi Todd, > > I misunderstood (have only been casually reading this thread), I thought > you had been editing files on the Synology, but good to know that it is > still stock. I do not have access to my Synology appliances (away on > travel) so I can't give you an accurate answer on how I have it configured. > I will let you know in a few days (once I have access to them again). > > --Larry > > -- > Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com > Minneapolis, Minnesota www.FahnoeTech.com > >-- *Todd Benivegna* // todd at benivegna.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200814/acf875cd/attachment.html>
Todd Benivegna
2020-Aug-14 18:30 UTC
[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
Sorry, I guess it is */usr/syno/bin/synoups* On Fri, Aug 14, 2020 at 2:27 PM Todd Benivegna <todd at benivegna.com> wrote:> I found something interesting that I think may apply here. Check this > out... > > > > https://forum.synology.com/enu/viewtopic.php?f=19&t=73960&hilit=ups+slave > > *I have the latest version of the Windows port of NUT (A UPS management > package) installed on my Windows 7 machine. The UPS I am using is a very > old APC BK650M which is controlled and sends its status via a special > serial cable to the Windows machine.* > > *I also have my Synology NAS (which uses NUT for its UPS management) > connected over the local network as a slave to the Windows NUT master. The > Synology slave is configured to immediately go into "safe mode" whenever an > FSD (system shutdown message) or OB+LB (On-Battery and Low Battery) > indication is received from the Windows NUT master.* > > *The Windows master machine responds correctly to OB+LB events, correctly > shutting down the master machine. The Synology box also responds to the > OB+LB events from the master correctly and goes into "safe mode", the > expected behavior.* > > *The problem comes when using the command "upsmon -c fsd" on the Windows > NUT master to force a UPS system shutdown to test the system. The Windows > master shuts down correctly, but the Synology NAS slave does not go into > "safe mode" when it receives the FSD notification.* > > *I was wondering if there is a bug in the Windows port of NUT such that > the FSD notification is not sent to the slaves when "upsmon -c fsd" is > executed.* > > *I then looked into the Synology NAS NUT configuration more closely.* > > *When configured as a NUT slave device, the Synology responds to an FSD > notification from the NUT master by calling a script defined in the > Synology's /usr/syno/etc/ups/upssched.conf with an "fsd" argument. The > script is /usr/syno/bin/synoups.* > > *Before causing the NAS to go into "safe mode", the script first retrieves > the status of the NUT master with upsc. If the status is "OL" (on-line), > the script aborts any action for the received FSD notification. Since the > UPS is actually on-line and not in a low battery state when the test FSD is > sent from the Windows master, the Synology will not enter "safe mode" - it > does nothing.* > > *If the device was in OB (on battery), LB (low battery), or OB+LB mode, > the OL check would fail and the Synology would enter "safe mode", as > expected.* > > *I tried commenting out the OL status check in the Synology script. The > Synology slave then enters "safe mode" when a "upsmon -c fsd" is issued > from the Windows master, as expected.* > > *Interesting that Synology disables the test functionality on the NAS.* > > Roger, do you know where in /usr/syno/etc/ups/upssched.conf the OL status > check is as mentioned above? I'd like to comment that out and see if it > works. I'd really like to test everything out without waiting for > the battery to run out, but if not then I will do that; will just take > about 45 minutes or so. I would never have guessed that it would do a > check like that, which basically prevents the "upsmon -c fsd" test! > > On Fri, Aug 14, 2020 at 12:30 PM Todd Benivegna <todd at benivegna.com> > wrote: > >> Thanks Larry, no problem. I appreciate the input. Whenever you get a >> chance I’d really like to compare notes with someone who has NUT and a >> Synology to see why the heck mine doesn’t work! ;). I’m also using my Pi as >> the master like you. Thanks. >> >> Todd >> >> -- >> >> *Todd Benivegna* // todd at benivegna.com >> On Aug 14, 2020, 11:55 AM -0400, Larry Fahnoe <fahnoe at fahnoetech.com>, >> wrote: >> >> On Fri, Aug 14, 2020 at 10:31 AM Todd Benivegna <todd at benivegna.com> >> wrote: >> >>> I have not edited a single file, including anything to do with NUT, on >>> the Synology via ssh.... ever. How is yours configured in the UI? Do you >>> have it set to go into safe mode after a certain number minutes? >>> >> >> Hi Todd, >> >> I misunderstood (have only been casually reading this thread), I thought >> you had been editing files on the Synology, but good to know that it is >> still stock. I do not have access to my Synology appliances (away on >> travel) so I can't give you an accurate answer on how I have it configured. >> I will let you know in a few days (once I have access to them again). >> >> --Larry >> >> -- >> Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com >> Minneapolis, Minnesota www.FahnoeTech.com >> >> > > -- > *Todd Benivegna* // todd at benivegna.com >-- *Todd Benivegna* // todd at benivegna.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200814/98b6df5e/attachment-0001.html>
Roger Price
2020-Aug-14 20:52 UTC
[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
On Fri, 14 Aug 2020, Todd Benivegna wrote:> https://forum.synology.com/enu/viewtopic.php?f=19&t=73960&hilit=ups+slave > > I have the latest version of the Windows port of NUT (A UPS management package) installed on my Windows 7 machine. The UPS I am using is a > very old APC BK650M which is controlled and sends its status via a special serial cable to the Windows machine. > > I also have my Synology NAS (which uses NUT for its UPS management) connected over the local network as a slave to the Windows NUT master. The > Synology slave is configured to immediately go into "safe mode" whenever an FSD (system shutdown message) or OB+LB (On-Battery and Low Battery) > indication is received from the Windows NUT master. > > The Windows master machine responds correctly to OB+LB events, correctly shutting down the master machine. The Synology box also responds to the > OB+LB events from the master correctly and goes into "safe mode", the expected behavior. > > The problem comes when using the command "upsmon -c fsd" on the Windows NUT master to force a UPS system shutdown to test the system. The Windows > master shuts down correctly, but the Synology NAS slave does not go into "safe mode" when it receives the FSD notification. > > I was wondering if there is a bug in the Windows port of NUT such that the FSD notification is not sent to the slaves when "upsmon -c fsd" is > executed. > > I then looked into the Synology NAS NUT configuration more closely. > > When configured as a NUT slave device, the Synology responds to an FSD notification from the NUT master by calling a script defined in the > Synology's /usr/syno/etc/ups/upssched.conf with an "fsd" argument. The script is /usr/syno/bin/synoups. > > Before causing the NAS to go into "safe mode", the script first retrieves the status of the NUT master with upsc. If the status is "OL" (on-line), > the script aborts any action for the received FSD notification. Since the UPS is actually on-line and not in a low battery state when the test FSD > is sent from the Windows master, the Synology will not enter "safe mode" - it does nothing.Not quite true. Script /usr/syno/bin/synoups calls command /usr/sbin/upsmon -c fsd and then calls function UPSSafeMode fsd. This function reads the UPS status ups.status into variable $St. If $St is exactly "OL" the function logs "UPS is On-Line" and exits. But if $St = "OL FSD" then the function goes into Safe Mode, stops all services and unmounts volumes.> If the device was in OB (on battery), LB (low battery), or OB+LB mode, the OL check would fail and the Synology would enter "safe mode", as > expected. > > I tried commenting out the OL status check in the Synology script. The Synology slave then enters "safe mode" when a "upsmon -c fsd" is issued from > the Windows master, as expected. > > Interesting that Synology disables the test functionality on the NAS. > > Roger, do you know where in /usr/syno/etc/ups/upssched.conf the OL status check is as mentioned above? I'd like to comment that out and see if it works. > I'd really like to test everything out without waiting for the battery to run out, but if not then I will do that; will just take about 45 minutes or so. > I would never have guessed that it would do a check like that, which basically prevents the "upsmon -c fsd" test!In /usr/syno/bin/synoups function UPSSafeMode you need to change if [ "$St" = "OL" ]; then SYSLOG "WARNING: UPS is On-Line" return to something like if [[ "$St" =~ "OL" ]]; then SYSLOG "WARNING: UPS is On-Line" return This assumes that the NAS supports the =~ operator of Bash 4. To reduce the long wait: in the NAS you need to execute upsrw -s battery.charge.low=85 -u <upsuser> -p sekret <myups> Better is to set this value in the NAS ups.conf. Roger
Larry Fahnoe
2020-Aug-18 11:50 UTC
[Nut-upsuser] Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
Hi Todd, On my Synology boxes which are currently running DSM 6.2.3 Update 2, Control Panel / Hardware & Power / UPS: Enable UPS support Network UPS type: Synology UPS server Time before DiskStation enters Safe mode: 15 min Network UPS server IP: x.x.x.x I should probably lower the Safe mode setting as the NUT config is currently shutting things down after 10 min on battery; I used to let it run on battery for 20 min, thus the longer Safe mode.>From upssched.conf on the RPi master:# Shut down after 10min on battery AT ONBATT * START-TIMER shutdown-timer 300 AT ONLINE * CANCEL-TIMER shutdown-timer --Larry On Fri, Aug 14, 2020 at 11:30 AM Todd Benivegna <todd at benivegna.com> wrote:> Thanks Larry, no problem. I appreciate the input. Whenever you get a > chance I’d really like to compare notes with someone who has NUT and a > Synology to see why the heck mine doesn’t work! ;). I’m also using my Pi as > the master like you. Thanks. > > Todd > > -- > > *Todd Benivegna* // todd at benivegna.com > On Aug 14, 2020, 11:55 AM -0400, Larry Fahnoe <fahnoe at fahnoetech.com>, > wrote: > > On Fri, Aug 14, 2020 at 10:31 AM Todd Benivegna <todd at benivegna.com> > wrote: > >> I have not edited a single file, including anything to do with NUT, on >> the Synology via ssh.... ever. How is yours configured in the UI? Do you >> have it set to go into safe mode after a certain number minutes? >> > > Hi Todd, > > I misunderstood (have only been casually reading this thread), I thought > you had been editing files on the Synology, but good to know that it is > still stock. I do not have access to my Synology appliances (away on > travel) so I can't give you an accurate answer on how I have it configured. > I will let you know in a few days (once I have access to them again). > > --Larry > > -- > Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com > Minneapolis, Minnesota www.FahnoeTech.com > >-- Larry Fahnoe, Fahnoe Technology Consulting, fahnoe at FahnoeTech.com Minneapolis, Minnesota www.FahnoeTech.com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200818/db2b1f93/attachment.html>
Reasonably Related Threads
- Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
- Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
- Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
- Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)
- Synology NAS is shutting down Ubuntu servers after very brief power outage (fwd)