A problem with power outages

Home » CentOS » A problem with power outages
CentOS 6 Comments

I did an experiment which I probably should have done before, to find out exactly what happens if the power is cut off, and then restored.

You were completely correct.

My server is an HP MicroServer (running CentOS-6.2). If the machine was running before being cut off then it reboots normally when power is restored.

If however it is shutdown before the power is cut then it does not reboot when power is restored. As you say, it always returns to the state it was in when the outage occurs.

I looked in the BIOS, but there is no option on this machine to change that.

So I shall know what to do when I get a UPS. If there is no better setting I can just allow the UPS to become exhausted if the outage lasts longer than the life of the UPS.

6 thoughts on - A problem with power outages

  • in the apc software(or nut worst case) you’ll be able to specify that
    after x minutes it will shutdown. Better to have a clean shutdown and
    have to hit the power button than a dirty one and risk corrupting your

  • William Warren wrote:

    Unfortunately I won’t be there to “hit the power button”.
    If I were there would be no need for UPS.

  • Another approach is to buy a remote power switch.
    With it, basically you can remotely “power cycle” the server :)
    It will solve any hang problem just as if you are there :)

  • An advice among all others:
    – When the machine gets stable, disable FS checks (in fstab, I dont
    remember what field to set to 0)
    – Have a “netboot” available when things get really bad, so that you can
    mount you usual “/” via the netbooted system

  • Mihamina Rakotomandimby wrote:

    Thanks for your response.

    Touch wood, I’ve found filesystem corruption seems to have become
    a thing of the past.
    I assume this is something to do with journaling.
    My laptop (Fedora-16/KDE) freezes about once a week.
    I’m not sure why, it doesn’t seem to be associated with any application.
    In any case, I have to stop the machine by pressing the power button.
    When I re-boot there has not been any problem with the filesystem.
    As I say, touch wood.

    Thanks. I’ll look into that.
    Though I don’t think that I have any choice except to hope the machine
    reboots nicely when power returns,
    since I can’t “see” it from a remote location until it has re-booted.

    One possibility I’ve considered is to have a UPS stop the machine,
    and then use Wake-on-LAN to start it again.
    But to date I haven’t been able to get Wake-on-LAN to work
    on my HP PowerServer, though it is supposed to be an option.

  • Fajar Priyanto wrote:

    I have actually tried this.
    I bought a very cheap ($20) device from China
    which is supposed to switch the power on and off
    when it receives a GSM message.
    But to date I haven’t been able to get it to work.
    (The instructions are in a language midway between English and Chinese.)

    I’ve decided UPS is a more reliable solution.