[SOLVED] UPS-Nut Plugin - AutoRestart after Safe Shutdown

  • Hi!

    I have an ups connected via usb with my omv-server. I have installed the NUT-Plugin and it's great! I have set that in case ups goes on battery mode the nas is safely shutdown in 15 seconds.

    I would like that the omv-server also automatically-restart when (and only when) power is restored (ups return in normal mode). How can I do that?

    Browsing the internet I've read that I should set the Power Restart Option in the BIOS on "Always On". Is the correct way? I suspect that if I set "Always On" in case of power failure the omv-server is safely shut down after 15 seconds but if the power outage is persistent with this option the server is restarted with the ups still in battery mode and I don't want it.


  • I have a similar issue/need, which I only noticed yesterday when a black-out occurred.

    I am using the nut plugin as you do and wakealarm to regularly wake up the server (I turn It off every night, then turn it on in the morning).

    When a safe shutdown occurs, the wakealarm plugin does not wake the system at the next schedule, but I think I'll have to open another thread.

    Does your UPS power cycle when the electricity is back? My APC Back-UPS does. If it's the same for you, just go to the BIOS and enable an option called "Turn the system on when power is restored" or something similar.

    EDIT: I didn't fully read your post, you already enabled this option. Well, you don't have to worry about this. The system will safely shut down via the NUT plugin, and the UPS will keep providing energy, so the system won't do anything until the UPS restarts. In this case the server will detect energy was gone, but only because the UPS restarted, interrupting energy for a second or so.

    OMV BUILD - MY NAS KILLER - OMV 5.x + omvextrasorg

    Core i3-8300 - ASRock H370M-ITX/ac - 8GB RAM - Sandisk Ultra Flair 32GB (OMV), 256GB NVME SSD (Docker), 3x4TB HDD (Data) - Fractal Design Node 304 - Be quiet! Pure Power 11 350W

  • I think this is no problem of the OMV settings. It depends on the capabilities of the UPS. Some UPS`s shut itself down when a power outage occures. After sending the shutdown command to the connected system, the UPS still waites a while, e.g. some minutes. If the power outage continuous the UPS switches itself off to avoid a complete discharge of its batteries.

    If the power comes back the UPS switches on and starts charging the batteries. But the power output connected to the load (e.g. OMV system) keeps switched off. The power supply to the load must be manually activated. At least thats the case with my HP UPS (I have to double check this).

    In your case the UPS must be configurered to supply the load automatically when the power comes back. Then with the correct BIOS / UEFI settings the OMV PC should boot automatically, like explained in the post above.

    OMV 3.0.99 (Gray style)
    ASRock Rack C2550D4I C0-stepping - 16GB ECC - 6x WD RED 3TB (ZFS 2x3 Striped RaidZ1)- Fractal Design Node 304

    Edited once, last by cabrio_leo ().

  • Thank you both for the answers. Effectively the problem was that my ups was setted by default to no switches itself off after a power outage. I resolved the problem by connect the ups to my PC and by modify this option via the software provided by the manufacturer. Then I set the restore power policy on the BIOS to "Always ON" and everything work as I want.

    Furthermore, after doing some test and inspecting the parameters visible by the OMV-Web-UI I found that the behaviour of the system is regulated by 3 parameters (see attachments below) and is like this:

    1) Power Outage occures --> the UPS safely shutdown the server after "ShutdownTimer" seconds (in my case 30) and switches itself of after "ups.delay.shutdown" seconds (in my case 30) after the shutdown of the server.

    2) After Power is Restored the UPS come back on (only if a minumum of "ups.delay.start" seconds (in my case 180) have passed) and the omv-server restart.

    The only editable parameter seems the ShutdownTimer . The other two (visible via the services tab of the OMV-Web-UI) seems not editable

    So, problem Solved. Thank's again.

  • CarlB

    Changed the title of the thread from “UPS-Nut Plugin - AutoRestart after Safe Shutdown” to “[SOLVED] UPS-Nut Plugin - AutoRestart after Safe Shutdown”.

Participate now!

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