I have an APC UPS BR550GI, an Intel NUC with Linux Debian on it and a WD 3.5" drive in an external enclosure with power supply, turn on/off switch and it is connected to the NUC via USB 3.0. Both the NUC and the external drive get power from the UPS.

Right now, I've set the NUC to automatically turn off when the UPS is using its battery and it's running low; in this case, the computer will remain on only if the UPS sends a cancel message before the NUC turns off.
Is there a way to automatically turn on the NUC when the UPS returns online?
Instead, talking about the external hard drive, is there a way to tie its turn on/off cycle to the computer's? Basically, I would like to put its hardware switch always to ON and let the computer turn if off/on based on its status (independently from the ups status).
My main goal is the hard drive to turn on with the NUC as it is required inside /etc/fstab.
In case this is not possible, what is the best way to protect the hard drive from sudden power loss and restart when power is back?

Any kind of suggestions or solutions are welcome, like scripts, DIY hardware, anything.
Thank you so much!

  • 2
    The BIOS should have a setting that says: state after power loss. By default this is set to: last state. You should change this to always On. Do note, if the UPS power is restored before the battery runs out, the PC will not turn on. I don't know any way that could work otherwise, other than building a remote controlled on/off switch and use something like an Arduino with some programming to control that switch. – LPChip Sep 23 '17 at 17:02
  • Thank you! I didn't know about that BIOS settings and the warn you told me... Anyway, the UPS will send a shutdown message only when the battery level is critical (about 3/4 minutes left), so the problem you're letting me know applies only if the computer has been turned off and the power's restored during these 3/4 minutes, right? Because, otherwise (power is restored before critical level), the UPS will cancel the shutdown and notify the computer. Also, have you got any tips/resources about the switch using the Arduino? Thanks again! – matteodv Sep 23 '17 at 17:11
  • I am indeed talking about those 3/4 minutes. I have no further information about the Arduino. I just know it is possible, as I know a few people who use them for all sorts of things. – LPChip Sep 23 '17 at 19:27

It is entirely possible to turn off other devices with your UPS.

Look at the back of the unit here: http://www.apc.com/salestools/DFAH-84RL3T/DFAH-84RL3T_R1_EN.pdf

enter image description here

You see the "MASTER" port and the "Controlled by MASTER" ports?

That's the key.

Check your manual here - Page 3: http://www.apc.com/salestools/EALN-7PTMAJ/EALN-7PTMAJ_R0_EN.pdf

The UPS will turn off the controlled ports when the device plugged in to the MASTER port is off. However, it is marked as Surge Only - so this might be problematic, as if that is true, the device will turn off when the power goes out anyways.

In your case, you mention an external HD. There is no "proper" shutdown procedure for a hard drive. If the computer has turned off and saved it's data, then the hard drive can be powered down instantly at any time. So, there is really no need for this feature at all.

As far as turning your computer back on after power is restored - all computers can turn back on when AC power is LOST and then RESTORED if you change the BIOS settings. The problem is that it requires that the UPS to turn completely off before this will actually work. So if you only have a brief interruption of power and the computer and hard drive turn off, the UPS will essentially "NEVER" run down and turn off completely.

Higher end APC and other UPS units support an auto-restart feature. Once the systems shut down, and the AC power is restored, the UPS will power off and back on to "trigger" the automatic powering on of the attached computers.

It appears your UPS does NOT support this feature. However, if it was available, this feature would be controlled through the PowerChute software in my experience.

  • Thank you so much for your answer! So for the drive, I can just let it finish its operations and unmount it from the computer when the battery level is critical and then let it shutdown. About the computer, I set that BIOS setting and works well without the UPS (have to try with it)... I also find this Tech FAQ on APC website (apc.com/us/en/faqs/FA158943) which should be the auto-restart feature you're talking about but it seems to be available on all Back-UPSes... I have to investigate... – matteodv Sep 23 '17 at 22:45
  • Ok no, the feature you're referring to is relative to those 3/4 minutes of critical battery level, when the UPS made the computer turn off; so if power is back in this small period the computer remains turned off... It seems there isn't much to do unfortunately... – matteodv Sep 23 '17 at 23:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.